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.
- 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?never_had_a_name– never_had_a_name2010-04-09 12:26:43 +00:00Commented 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.Gordon– Gordon2010-04-09 12:27:59 +00:00Commented 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?never_had_a_name– never_had_a_name2010-04-09 12:30:14 +00:00Commented 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?Gordon– Gordon2010-04-09 12:40:27 +00:00Commented 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?never_had_a_name– never_had_a_name2010-04-09 13:01:44 +00:00Commented Apr 9, 2010 at 13:01
| Show 1 more comment
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. python-3.x), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-php