• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

distinction between facade and model

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"model business methods"
Isn't that a contradiction? The Model to me is the data values. No business methods at all.
Mark
 
estoy Qiu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi mark:
sorry i didn't get it. Does your model means the table model? I was talking about the app level Model.I once took facade as Model
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic