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

[eluser]esra[/eluser]
Take a look at Coolfactor's View library:

http://ellislab.com/forums/viewthread/49910/

This will allow you to use a master view (PHP template) to handle the physical structure of your pages and each page (master view) could be composed of numerous partial views--some visible and some hidden. Some of the logic for loading and switching between partial views can remain in your controllers.

I'm working on something similar using a combination of EXT widgets and JQuery. Each set of partial views managed by your controller could have an associated Javascript and CSS file, as well as your master templates.

You can experiment with this using the sample layout examples included with EXT. Just disassemble them into a master view and collection of partial views. Then reassemble them using Coolfactor's View library. Get the master views and partial views working to your satisfaction using the views and javascript, then write helpers to use in your views to wrap your javascript functions in PHP.

The JQuery.php library on the wiki is a special version written for CodeIgniter. At least one other JQuery wrapper for PHP has been released in recent weeks. At this point, I have not used either JQuery wrapper (just Javascript).


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