Welcome Guest, Not a member yet? Register   Sign In
Multiple functions for a single view. Need help!
#3

[eluser]AlexandrosG[/eluser]
My friend, the fact that you need some methods to be available in all models is not a reason to have only one model or controller or view. For example, if you want a method to be available in every model, you can extend the CI_Model class.

Having only one view for many "pages" leads you to put business logic inside your views and destroys your MVC architecture. Furthermore, i don't undestand why you need many models (or controllers) to implement CRUD for a single table (products). I would say that you can have one controller and one model for operations that relate to certain table, and a separate view for each "page". This is not an absolute rule, but something you can rely on for the start.


Messages In This Thread
Multiple functions for a single view. Need help! - by El Forum - 08-02-2013, 10:59 AM
Multiple functions for a single view. Need help! - by El Forum - 08-05-2013, 11:03 AM
Multiple functions for a single view. Need help! - by El Forum - 08-06-2013, 06:12 AM
Multiple functions for a single view. Need help! - by El Forum - 08-06-2013, 10:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB