Welcome Guest, Not a member yet? Register   Sign In
Do I use a model, library or helper?
#5

[eluser]Lpeek[/eluser]
thanks noslen! Looks good!

Although it is confusing me as to why this is a good idea? Why is it better to have 2 separate files for the product data, and the product manipulation in the database? I've always used functions and variables in one class for a certain object like a product, and it has never occurred to me that it would be better separated.

It just makes it awkward, instead of creating a product object, and running everything I need on that object, first I have to load the model to get info from the database, I then pass that to the library to use, when I need to go back to the database then go back to the model, then pass that info back to the library again.

It just seems like a lot of pointless backwards & forwards?

There must be a good reason? It's not as obvious as views are for splitting logic from layout.


Messages In This Thread
Do I use a model, library or helper? - by El Forum - 10-17-2012, 08:37 AM
Do I use a model, library or helper? - by El Forum - 10-17-2012, 02:23 PM
Do I use a model, library or helper? - by El Forum - 10-18-2012, 01:22 AM
Do I use a model, library or helper? - by El Forum - 10-18-2012, 01:34 AM
Do I use a model, library or helper? - by El Forum - 10-18-2012, 01:41 AM
Do I use a model, library or helper? - by El Forum - 10-18-2012, 02:05 AM
Do I use a model, library or helper? - by El Forum - 10-18-2012, 02:11 AM
Do I use a model, library or helper? - by El Forum - 10-18-2012, 02:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB