Welcome Guest, Not a member yet? Register   Sign In
Ajax and MVC
#1

[eluser]JosGo[/eluser]
You are on a CI-screen, hit a button and through a url and posting some variables you get at a controller which uses a model and a view. A new CI-screen is built with probably the same menu and a different content. That's how mvc using CI appears to me. Schematic it's like in the attached file mvc2.png. At least that's how I see things.

When you're using Ajax you do not want an entirely new screen. You just want a part of the screen replaced by a new list of data or new details or whatever. I would like it if I could make an Ajax-call, then dependending on the Ajax-call, start a specific controller, use a model (possibly) and after that use a view. But this view should not send it's output to the user's browser but to a specified DIV. I tried to schematize this in the attached file ajaxmvc2.png. This seems the correct way to me, as it makes it possible to create an entirely Ajax-driven application and still use the MVC-approach. I took quite some time but I have still not found a way to do this. Anybody having ideas? Are extensions needed to do this? Is this not what we should want with CI? Does CI have to be rewritten for this methodology?


Messages In This Thread
Ajax and MVC - by El Forum - 07-11-2007, 12:45 PM
Ajax and MVC - by El Forum - 07-11-2007, 02:34 PM
Ajax and MVC - by El Forum - 07-11-2007, 03:28 PM
Ajax and MVC - by El Forum - 07-12-2007, 10:28 AM
Ajax and MVC - by El Forum - 07-12-2007, 08:39 PM
Ajax and MVC - by El Forum - 07-12-2007, 10:43 PM
Ajax and MVC - by El Forum - 07-13-2007, 01:10 PM
Ajax and MVC - by El Forum - 07-13-2007, 01:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB