7

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.

2 Answers 2

4

@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.

Sign up to request clarification or add additional context in comments.

Comments

0

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 :)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.