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

(09-22-2015, 02:25 PM)ad11 Wrote: 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.

From the point of view of the web server, an AJAX request for data is just another MVC triad. The controller receives the request from the script, it gets the data from a model, it passes the data to a view. The biggest difference is that many people just output JSON straight from their controller rather than using a view, and the JavaScript in the original view does a little more work to display the data and make additional requests in response to user actions.

In the end (again, from the point of view of the web server), no matter how complicated the JavaScript becomes, it's still just part of the view. You could start creating MVC triads in JavaScript (as a few JavaScript frameworks do), and it would still just be part of the view to CodeIgniter.
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