LogoPhly, boy, phly
the weblog and site of Matthew Weier O'Phinney

Thursday, March 4. 2010

Responding to Different Content Types in RESTful ZF Apps

In previous articles, I've explored building service endpoints and RESTful services with Zend Framework. With RPC-style services, you get to cheat: the protocol dictates the content type (XML-RPC uses XML, JSON-RPC uses JSON, SOAP uses XML, etc.). With REST, however, you have to make choices: what serialization format will you support?

Why not support multiple formats?

There's no reason you can't re-use your RESTful web service to support multiple formats. Zend Framework and PHP have plenty of tools to assist you in responding to different format requests, so don't limit yourself. With a small amount of work, you can make your controllers format agnostic, and ensure that you respond appropriately to different requests.


Continue reading "Responding to Different Content Types in RESTful ZF Apps"

Posted by Matthew Weier O'Phinney in PHP at 15:28 | Comments (20) | Trackback (1)
Defined tags for this entry: php, rest, zend framework

Wednesday, February 17. 2010

Symfony Live 2010

This week, I've been attending Symfony Live in Paris, speaking on integrating Zend Framework with Symfony. The experience has been quite rewarding, and certainly eye-opening for many.

To be honest, I was a little worried about the conference -- many see Symfony and ZF as being in competition, and that there would be no cross-pollination. I'm hoping that between Fabien, Stefan, and myself, we helped dispel that myth this week.


Continue reading "Symfony Live 2010"

Posted by Matthew Weier O'Phinney in PHP at 11:39 | Comments (9) | Trackbacks (0)
Defined tags for this entry: php, sflive2010, symfony, zend framework

Thursday, February 4. 2010

Creating Re-Usable Zend_Application Resource Plugins

In my last article, I wrote about how to get started with Zend_Application, including some information about how to write resource methods, as well as listing available resource plugins. What happens when you need a re-usable resource for which there is no existing plugin shipped? Why, write your own, of course!

All plugins in Zend Framework follow a common pattern. Basically, you group plugins under a common directory, with a common class prefix, and then notify the pluggable class of their location.

For this post, let's consider that you may want a resource plugin to do the following:

  • Set the view doctype
  • Set the default page title and title separator

Continue reading "Creating Re-Usable Zend_Application Resource Plugins"

Posted by Matthew Weier O'Phinney in PHP at 14:55 | Comments (12) | Trackbacks (2)
Defined tags for this entry: mvc, php, zend framework

Friday, January 8. 2010

Quick Start to Zend_Application_Bootstrap

We added Zend_Application to Zend Framework starting in version 1.8.0. The intent behind the component was to formalize the application bootstrapping process, and provide a simplified, configuration-driven mechanism for it.

Zend_Application works in conjunction with Zend_Application_Bootstrap, which, as you might guess from its name, is what really does the bulk of the work for bootstrapping your application. It allows you to utilize plugin bootstrap resources, or define local bootstrap resources as class methods. The former allow for re-usability, and the latter for application-specific initialization and configuration.

Additionally, Zend_Application_Bootstrap provides for dependency tracking (i.e., if one resource depends on another, you can ensure that that other resource will be executed first), and acts as a repository for initialized resources. This means that once a resource has been bootstrapped, you can retrieve it later from the bootstrap itself.


Continue reading "Quick Start to Zend_Application_Bootstrap"

Posted by Matthew Weier O'Phinney in PHP at 12:57 | Comments (25) | Trackback (1)
Defined tags for this entry: php, zend framework

Thursday, December 10. 2009

Real-time ZF Monitoring via Zend Server

When keeping tabs on your ZF applications, it's often difficult to separate application errors from general PHP errors, and if you aggregate them in the same location as your web server errors, this can become more difficult still.

Additionally, PHP's error reporting doesn't provide a ton of context, even when reporting uncaught exceptions -- typically you'll only get a cryptic exception message, and what file and line emitted it.

Zend Server's Monitor extension has some capabilities for providing more context, and does much of this by default: request and environment settings available when the error was logged, the function name and arguments provided, and a full backtrace are available for you to inspect. Additionally, the Monitor extension includes an API that allows you to trigger custom Monitor events, and you can provide additional context when doing so -- such as passing objects or arrays that may help provide context when debugging.


Continue reading "Real-time ZF Monitoring via Zend Server"

Posted by Matthew Weier O'Phinney in PHP at 15:51 | Comments (8) | Trackbacks (0)
Defined tags for this entry: php, zend framework, zend server

Monday, November 9. 2009

Building RESTful Services with Zend Framework

As a followup to my previous post, I now turn to RESTful web services. I originally encountered the term when attending php|tropics in 2005, where George Schlossnaggle likened it to simple GET and POST requests. Since then, the architectural style -- and developer understanding of the architectural style -- has improved a bit, and a more solid definition can be made.


Continue reading "Building RESTful Services with Zend Framework"

Posted by Matthew Weier O'Phinney in PHP at 09:00 | Comments (25) | Trackback (1)
Defined tags for this entry: php, rest, zend framework

Friday, October 23. 2009

Exposing Service APIs via Zend Framework

The hubbub surrounding "Web 2.0" is around sharing data. In the early iterations, the focus was on "mashups" -- consuming existing public APIs in order to mix and match data in unique ways. Now, more often than not, I'm hearing more about exposing services for others to consume. Zend Framework makes this latter trivially easy via its various server classes.


Continue reading "Exposing Service APIs via Zend Framework"

Posted by Matthew Weier O'Phinney in PHP at 19:42 | Comments (14) | Trackback (1)
Defined tags for this entry: php, zend framework

Monday, October 12. 2009

Speaking at ZendCon 2009

It's probably already a foregone conclusion, but I'm speaking once again at ZendCon this year -- one week from today!


Continue reading "Speaking at ZendCon 2009"

Posted by Matthew Weier O'Phinney in PHP at 08:30 | Comments (3) | Trackbacks (0)
Defined tags for this entry: php, zendcon09

Wednesday, October 7. 2009

Why UnCons are Important

My good friend, Keith Casey, is once again chairing Zendcon's UnCon. For those who have never attended, it's basically one or more tracks running parallel to the main conference, but with content pitched by attendees -- sometimes presented by them, other times presented by others who are knowledgeable in the field.

Why should you care? There are great sessions already selected for the conference featuring some well-known speakers from the PHP world; why would you want to either attend or present at the uncon?


Continue reading "Why UnCons are Important"

Posted by Matthew Weier O'Phinney in PHP at 08:55 | Comments (2) | Trackbacks (0)
Defined tags for this entry: conferences, cw09, php, zendcon, zendcon09

Tuesday, September 22. 2009

CodeWorks 2009 Begins

Today is the kickoff for CodeWorks 2009, a remarkable PHP road show hitting seven cities in 14 days. While I'm not joining the tour until Atlanta, I'm proud to be joining up at that stop and presenting a Zend Framework tutorial during the tour.

CodeWorks'09


Continue reading "CodeWorks 2009 Begins"

Posted by Matthew Weier O'Phinney in PHP at 13:08 | Comments (2) | Trackbacks (0)
Defined tags for this entry: conferences, cw09, php, zend framework
(Page 1 of 19, totaling 187 entries) » next page
  • Home
  • Resume
  • Blog
  • Phly PEAR Channel
  • Contact Me
  • About this site

ZCE

Zend Education Advisory Board Member

Add to Technorati Favorites

Calendar

Back March '10 Forward
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Quicksearch

Links

  • PHLY - PHp LibrarY
  • Paul M. Jones
  • Mike Naberezny
  • Shahar Evron
  • Planet PHP
  • Zend Where I now work
  • Garden.org Where I once worked

Archives

March 2010
February 2010
January 2010
Recent...
Older...

Categories

XML Linux
XML Personal
XML Aikido
XML Family
XML Programming
XML Dojo
XML Perl
XML PHP

All categories

Syndicate This Blog

XML RSS 0.91 feed
XML RSS 1.0 feed
XML RSS 2.0 feed
ATOM/XML ATOM 0.3 feed
ATOM/XML ATOM 1.0 feed
XML RSS 2.0 Comments

Show tagged entries

xml best practices
xml books
xml conferences
xml cw09
xml decorators
xml dojo
xml dpc08
xml file_fortune
xml git
xml linux
xml mvc
xml oop
xml pear
xml perl
xml personal
xml php
xml phpworks08
xml programming
xml rest
xml ubuntu
xml vim
xml webinar
xml zendcon
xml zendcon08
xml zendcon09
xml zend framework
© 2004 - present, Matthew Weier O'Phinney
matthew-web <at> weierophinney.net