posted 20 years ago
Hi Eugene
I have read the brilliant post of you and mark about gui design with MVC . your suggestion that facade and model be seperate seems very reasonable and I try to follow it. In my original design,the facade acts as a model.
Now I divided it into two classes: facade is to provide access to database such as methods close(), getSchema(), and getAllRecords(),getUniqueFieldData() and the model whose responsibilty is to implement business methods such as bookFlight() and searchFlights(),getAllFlights(),getArrivalAirports()..
Now I have a question, in my bookFlight() method I called such methods as lock(),unlock(),modify(),find().. from dataAccessor,which is created by DataAccessFactory to get a reference of local/remodate database. Becasue only my facade uses dataAccessor, It seems I should wrap the methods including lock(),unlock(),modify() again in the facade class so that my model business methods can use them?
Is there another way around? I am quite confused now. Pls. help me out