Another article has been posted on KillerPHP. This one is about Zend View_Helpers. I've been struggling with a good Zend Framework architecture that provides a development roadmap where controller logic can be easily refactored into AJAX controls. At work I've been researching web services for AJAX integration on the ASP.NET tip of things due to the lack of user-control support for AJAX.NET controls. I'm also not very impressed with the AJAX.NET Extenders since they seem to mix data that would be gathered from a web service and its presentation on the client.
This has lead me to thinking about AJAX as a two-tier model.
This approach is very appealing from a development perspective since you can essentially develop a partial template, render it (using Zend_View if you're working in PHP) and send it down the pipe to the AJAX caller.
Usually there's an intermediate step on the client before display, whether it means parsing JSON / XML into XHTML or applying a fancy effect.
I think the latter approach will win out as a best practice since it lends itself to greater flexibility on the client side. With the push towards Service-Oriented Architectures, AJAX calls to webservices make more sense than simply relying on pre-built templates. Lastly, the jump from XML to XHTML isn't huge on a client-side and with rich javascript frameworks, parsing JSON and XML is a given.
{ 1 comment… read it below or add one }
Much the interesting has found here