News Feed
Sections




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

Kevin Schroeder's Blog:
Zend_Server
September 06, 2010 @ 09:47:22

In a new post to his blog Kevin Schroeder shows how to use the Zend_Server component of the Zend Framework to make a script that automatically makes the server you need based off of the request type.

I've been doing some work with Adobe on some articles and one of them was on working with mobile clients with Flash. Well, me being the masochist I did more. What I did was write an example that worked as a full website, an Ajax website, a Flash service and an XML-RPC service. [...] In a plugin, which I will show you in a bit, I attached an instance of Zend_Server_Interface. Then in the controller I simple told it to do its thing, with the exception of handing the Service Mapping Description for JSON-RPC ($smd). That's it.

Because of how the XML-RPC, JSON and AMF servers are handled, they extend the main Zend_Server_Interface, making it easy to create them on the fly. He includes the code for both the sample controller and the plugin mentioned above. It checks for Ajax, AMF, XML and JSON request types and sets the service handler correctly. If there's not one, it falls back on the mapping.

0 comments voice your opinion now!
zendserver zendframework xml json xmlrpc ajax tutorial autodetect


blog comments powered by Disqus

Similar Posts

AnyExample.com: PHP AJAX example: asynchronous file upload

IBM developerWorks: MVC with Agavi - Add forms and database support with Agavi and Doctrine

Anis uddin Ahmad's Blog: Advanced bootstrapping : Configure your Zend Framework application for mult

SitePoint Web Foundations Blog: Quick Tip: Install Zend Server 7 on an Ubuntu 14.04 Vagrant Box

Evan Coury's Blog: Using Zend\Dbs TableGateway & HydratingResultSet to return rows as custom enties


Community Events





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


threedevsandamaybe interview laravel library language project release code list wordpress podcast bugfix application framework introduction community series developer api configure

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