News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPied.com:
AJAX MVC (so to speak)
September 20, 2006 @ 07:23:22

On PHPied.com, there's a new tutorial that combines the power of Ajax with the flexibility of PHP to create a more Ajax-centric version of an Model/View/Controller structure.

This is sort of a framework thing to create AJAX applications, based on the MVC design pattern. Yep, I have a lot of buzzwords here, I admit, but this shouldn't be taken too seriously. I was doing a bunch of small projects lately and I found myself using something like this little framework, without even thinking about it.

Then I thought about it and I found that the scripts and the organization of them may resamble MVC a bit. So how does MVC fit when you mix things like thin and fatter client, HTML, JavaScript, XMLHttpRequest, PHP and CSS?

He compares the "usual flow" of Ajax applications verus how an MVC-like app would work and shows a simple version of one in action. It uses PHP for the Model, Javascript/PHP for the Controller logic, and strictly HTML/CSS/Javascript for the View to output to the user. He incorporates some of the Yahoo! UI functionality to help capture events and make the backend Ajax connection. His sample sends off an Ajax request to the PHP backend when the button is pressed and takes in the message (HTML) and pushed it back out into the current page.

The demo is here and you can download the source as well.

0 comments voice your opinion now!
ajax model view controller framework flow css demo ajax model view controller framework flow css demo


blog comments powered by Disqus

Similar Posts

Christian Wenz's Blog: WSO2 Web Services Framework (WSF)/PHP v1.0.0 Released

Community News: Zend Framework Preview 0.1.2 Released

Joris de Wit's Blog: Extending different layouts for Ajax requests in Twig, Symfony2

Query7.com: Writing a module for Kohana3

Matthew Weier O'Phinney: On php-fig and Shared Interfaces


Community Events





Don't see your event here?
Let us know!


framework list zendserver series bugfix interview api introduction podcast release opinion threedevsandamaybe library language symfony tips community laravel deployment developer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework