Welcome Guest, Not a member yet? Register   Sign In
Making things DRY. Some feedback please.
#7

[eluser]nmweb[/eluser]
Where did that idea come from that models only do database stuff? It's nonsense. Let me quote wikipedia on MVC
Quote:Model
The domain-specific representation of the information on which the application operates. Domain logic adds meaning to raw data (e.g., calculating whether today is the user's birthday, or the totals, taxes, and shipping charges for shopping cart items).
Many applications use a persistent storage mechanism (such as a database) to store data. MVC does not specifically mention the data access layer because it is understood to be underneath or encapsulated by the Model.
The data access layer is encapsulated by the model. You ask the model for the last ten articles and it gives them back to you, how is of no importance, be it a database, text, or even randomly generate ten articles. You should be able to change the data storage of your application just by changing the models.

Granted, libraries do not have a set place in MVC, but most of them probably resemble a model. Thumbnailing, i.e. representation of an image information is imo done in the model.


Messages In This Thread
Making things DRY. Some feedback please. - by El Forum - 08-08-2008, 01:00 AM
Making things DRY. Some feedback please. - by El Forum - 08-08-2008, 01:00 AM
Making things DRY. Some feedback please. - by El Forum - 08-08-2008, 02:13 AM
Making things DRY. Some feedback please. - by El Forum - 08-08-2008, 04:39 AM
Making things DRY. Some feedback please. - by El Forum - 08-08-2008, 05:00 AM
Making things DRY. Some feedback please. - by El Forum - 08-08-2008, 07:20 AM
Making things DRY. Some feedback please. - by El Forum - 08-08-2008, 11:51 AM
Making things DRY. Some feedback please. - by El Forum - 08-08-2008, 11:58 AM
Making things DRY. Some feedback please. - by El Forum - 08-08-2008, 12:08 PM
Making things DRY. Some feedback please. - by El Forum - 08-08-2008, 12:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB