Welcome Guest, Not a member yet? Register   Sign In
Extended Views
#7

mwhitney, Thanks for your thoughtful post.

Your hint about using the Controller to load libraries was very helpful.

With this in mind, and to potentially help others, my strategy is as follows:
1. Use the controller to obtain as much data as possible for the view.
2. Have the controller use models as much as possible.
3. Use database views to support the models. This seems a little more elegant than placing all the SQL code in the php.
4. Pass data (not html) from the controller to the main view.
5. Have the view call upon libraries to generate HTML widgets. Note: these are libraries versus ci views. The main view will pass data received from the controller to the libraries.
6. The main view would compile the HTML widgets together to build the main page.

A couple of observations:
1. Some data will be obtained in the main view (i.e. Ajax data for javascript tables). This is to reduce the size of the browser file since php must 'echo out' data used by javascript in some cases.
2. Not exactly MVC, but it seems to be a consist approach--at least until tomorrow Smile

Comments are very welcome. Thanks.
Reply


Messages In This Thread
Extended Views - by ad11 - 09-13-2015, 04:23 PM
RE: Extended Views - by PaulD - 09-15-2015, 04:09 PM
RE: Extended Views - by ad11 - 09-15-2015, 07:04 PM
RE: Extended Views - by mwhitney - 09-16-2015, 08:09 AM
RE: Extended Views - by ad11 - 09-16-2015, 11:32 AM
RE: Extended Views - by mwhitney - 09-16-2015, 01:06 PM
RE: Extended Views - by ad11 - 09-22-2015, 02:25 PM
RE: Extended Views - by mwhitney - 09-23-2015, 07:19 AM
RE: Extended Views - by cartalot - 09-23-2015, 03:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB