12-13-2007, 11:17 AM
[eluser]Unknown[/eluser]
Hello,
I'm trying to keep this post short so I'll jump right in.
I'm new to MVC/CodeIgniter, currently on the learning process. I have a major issue in how to implement the following:
-webpage with a lot of different modules (e.g.: login, etc.)
-many of the modules have their own submit button and complex behaviour
-many modules will use JavaScripting to simulate drag&drop;, or alerting etc.
-this JavaScript code goes in the View, as it has nothing to do with any content/ data, it simply makes the page easier to interact with/ read; correct?
>> How do I do this in terms of MVC design? <<
I want to implement all modules separately.
This is a problem to me because I know I shouldn't call Controllers from Views, and also I don't want to have one single huge Controller which passes tons of data to a single view, because it will become very hard to maintain/ re-use that code.
I was thinking each module should somehow have a separate View and maybe even Control, but then how do I exactly glue all of those pieces together in CodeIgniter?
Thanks
Hello,
I'm trying to keep this post short so I'll jump right in.
I'm new to MVC/CodeIgniter, currently on the learning process. I have a major issue in how to implement the following:
-webpage with a lot of different modules (e.g.: login, etc.)
-many of the modules have their own submit button and complex behaviour
-many modules will use JavaScripting to simulate drag&drop;, or alerting etc.
-this JavaScript code goes in the View, as it has nothing to do with any content/ data, it simply makes the page easier to interact with/ read; correct?
>> How do I do this in terms of MVC design? <<
I want to implement all modules separately.
This is a problem to me because I know I shouldn't call Controllers from Views, and also I don't want to have one single huge Controller which passes tons of data to a single view, because it will become very hard to maintain/ re-use that code.
I was thinking each module should somehow have a separate View and maybe even Control, but then how do I exactly glue all of those pieces together in CodeIgniter?
Thanks