Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • yes maybe i was not clear about that point. i know mvc has nothing to do with library classes, so i wanted to know if those 2 classes were MODELS or LIBRARY classes that i should use in the models. cause i know that those 2 could be used in other applications, which make them more like independent library classes? so i should create one model class where i use these 2 library classes? Commented Apr 9, 2010 at 12:26
  • @ajsie Since the mentioned classes do things that make no sense outside this specific application, they are models in my book. You have written them for this very application. They are not abstractions, but concrete classes for a concrete usecase. Commented Apr 9, 2010 at 12:27
  • @gordon, read my updated first-comment. hmm i thought they could be used for other applications to create an address book? Commented Apr 9, 2010 at 12:30
  • 2
    @ajsie yes, you could probably reuse them, but then they would be library classes in an addressbook framework. you have to understand the key difference. The model contains everything that makes up the heart of your application. It's all the business logic, service layers, database adapters and so on specific to your app. The library, so to say, is the model of the framework, used to built your app. Does that make sense? Commented Apr 9, 2010 at 12:40
  • yes it does, just have difficulty to know the exact difference. could you say a rule of thumb to make it clear where the line goes between mvc classes and library classes is if you have to modify the code to fit your application, then it sure is a application-specific class, with other words, a mvc class. cause library classes dont have to be changed i guess? and as you said, i could reuse the address book as a component in other applications, and the database structure comes along, so then it should be called a component with mvc (and those 2 are models). im correct? Commented Apr 9, 2010 at 13:01