• 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:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Model View Controller

 
Ranch Hand
Posts: 537
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What exactly is a Model? Is model considered as a Bean/Java Class which encapsulates the data? Also if have to create a model for a file Lister, how would i proceed?
 
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the model is how you do what you need to do. For example, let's look at a device to tell the time.

The model could be a pendulum/escapement, an oscilating quartz crystal, sand falling through a small hole, or a candle of a fixed diameter burning down. all of these can be used to measure the passing of time.

the View is how that data is presented to the user. They could be hands on a clock face, or digits representing HH:MM:SS, or a few other ways.

And the controller is how someone makes adjustments to things. Buttons you press, a stem you pull in/out and twist, a fully functioning keyboard, etc.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Nitish Bangera wrote:Is model considered as a Bean/Java Class which encapsulates the data? Also if have to create a model for a file Lister, how would i proceed?


Yes. The model would contain objects (not always beans) which encapsulate the data. A file lister model would contain File objects. Check out the File API where you will find useful methods to help you build the model.
 
Whatever you say buddy! And I believe this tiny ad too:
The new gardening playing cards kickstarter is now live!
https://www.kickstarter.com/projects/paulwheaton/garden-cards
reply
    Bookmark Topic Watch Topic
  • New Topic