Skip navigation.
Home
That which cannot be rendered in binary is by definition a delusion
 

The Zend Framework Dojo Round Trip

The Zend Framework has adopted Dojo as its Ajax foundation du Jour and for good reason; Dojo may do the same thing that many other AJAX libraries, it does so with a level of completeness and extensibility you just don't see in the other offerings. This is especially true because, other than forms, the Zend Framework steers clear of providing visual solutions. This is by design -- the framework is developed for people who want to build things like CMS's, and to be as implementation agnostic as possible. But it does mean that you have to be comfortable with ground-up development.

But the combination of Dojo and the Zend Framework gives you one of the most painless paths to rapid application development that exists this side of Rails. This predicates that you have a problem within which custom coding and source quality matters, as is the case with a professional application.

There are two modules in Dojo that I find especially useful: the forms and the grid. Forms extend the Zend_Form library, adding hooks for validation and cross-widget interaction. The grid gives you a pagination-free way of displaying data -- even vast tracts of data -- lazy loading the portion of the data that the user scrolls to, with options for client side sorting, embedded form controls, and irregular layouts.

This is a very "Fast pass" through Zend Framework, focusing on the elements that matter to this example. Zend has more comprehensive tutorials for the overall framework.

Also, this is not a fully tested example but is an amalgam of a different application; don't be surprised if you have to do a little shaking down of the code to get it to work as advertised.

A use case example: an admin layer for users

This shows an example of creating a quick interactive list of a database table. It could be considered "Scaffolding", an area in which Zend is kind of deficient.

Presming your app has a typical user database --

Field
type mods index
id int autoincrement primary
email varchar(50)    
username varchar(20)   index
passwordMD5 varchar(100)    
comments tinytext    

 

You want to create an admin layer and your first task is to control your userbase. Naturally you want this to be quick and dirty so having stock solutions is a major bonus.

The pages below detail the steps necessary to implement a zend admin section for a typical site.

0
Your rating: None

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <p> <span><small> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <embed> <object> <param> <strike> <caption>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options