Reputation: 4099
I want to create a website. I want to use Ajax for every hyperlink and form. I wanted to use jquery but it is hard to create a general code for every link. I want to know if there is any PHP MVC Framewrok which works with ajax? thanx.
Upvotes: 7
Views: 3937
Reputation: 10664
@Kenan, There wasn't in december but now there is Agile Toolkit. It's open source too.
The way how it works is you put a "View" on your "Page" and then can manipulate with it through javascript. So here is example:
$view=$page->add('LoremIpsum');
$button=$page->add('Button')->setLabel('Reload Ipsum');
$button->js('click', $view->js()->reload());
Clicking button would use AJAX to reload the section of the page.
Please comment and let me know what if this is what you were looking for. As a contributor i'm interested.
Upvotes: 4
Reputation: 829
Currently they're no "full" ajax mvc's for PHP - BUT:
Check out atk-framework.com, xisc.com or cakephp.org.
Since they're frameworks, the interfaces you will be using for the application can be implemented onto the platform; you'll be able to use the MVC-framework as platform for a self-written wrapper you put onto it..
[ [FRAMEWORK] <------> [CONTROL] <------> [VIEW] ] <------> [APPLICATION]
If you implement it like that, the application uses a second layer which is managed by the mvc and requestable via an internal API.
Might seem complicated, but well, the only and to me most logical solution :)
Upvotes: 0