Announcements

Zend Framework and Dojo Partner Up

In May 2008, we announced a partnership between Dojo and Zend Framework. The goal was to deliver an out-of-the-box solution for building Ajax-based Web applications using Zend Framework. This integration is mainly targeted at users who rely on us to recommend a JavaScript toolkit and some Ajax best practices along with it.

Zend Framework 1.6 is the first release to include features developed as part of this partnership. These features include:

  • A dojo() placeholder view helper to facilitate Dojo integration in your views, including setting up the required script and style tags, dojo.require statements, and more. In essence, this supports and enhances Dojo's modularity at the application level.
  • Zend_View helpers and Zend_Form elements and decorators that utilize Dijit, Dojo’s layout and widget platform. This simplifies creation of Zend_Form elements that can be rendered as Dijits. For instance, highly interactive widgets such as calendar choosers, time selectors, and combo-boxes are provided.
  • Zend_Dojo_Data, a component for creating dojo.data-compatible response payloads. dojo.data defines a standard storage interface; services providing data in this format can then be consumed by a variety of Dojo facilities to provide highly flexible and dynamic content for your user interfaces.
  • A JSON-RPC server component: Zend_Json_Server. JSON-RPC is a lightweight remote procedure call protocol, utilizing JSON for its serialization format; it is useful for sites that require a high volume of interaction between the user interface and server-side data stores, as it allows exposing your server-side APIs in a format directly accessible via your client. Dojo has native JSON-RPC capabilities, and Zend Framework provides a JSON-RPC implementation that is both compatible with Dojo and the published specifications.

We evaluated several JavaScript toolkits and decided to recommend Dojo for several reasons:

  1. Licensing

    Zend Framework and Dojo are both licensed under the new BSD license, allowing end users to integrate, alter, and distribute each project as they wish. In integrating with Dojo, Zend Framework continues to deliver business-friendly licensing along with its full Ajax support.

  2. IP Purity

    The Zend Framework and Dojo projects both require all contributors to sign Apache-style Contributor License Agreements, which mitigates the risk of accepting contributions that infringe upon third parties' intellectual property rights.

  3. Design Affinity

    Both projects have similar design philosophies, including a strong emphasis on use-at-will architecture. Additionally, each has rigorous quality guidelines with strict unit testing and coding standards.

  4. JSON Format

    While Dojo can accept XHR responses in a variety of formats, JSON is the preferred response format. Zend Framework fully supports JSON for Ajax interactions, and already has a variety of helpers to facilitate data transmission via JSON. JSON is a lightweight format, can be evaluated directly in JavaScript, and presents an elegant solution to the problem of data representation in XHR requests.

  5. Comprehensive Ajax Solution

    Dojo provides a comprehensive solution for rich web user interfaces. Many other toolkits either abstract common DOM-related actions to make remoting more efficient or focus solely on the UI layer; Dojo provides utilities for all of these.

  6. Use of Standards

    Dojo not only implements published standards, but also drives them. For example, members of the Dojo Foundation are working on draft versions of the JSON-RPC, JSON-Schema, and Bayeux Protocol specifications to promote interoperability among JavaScript libraries. In addition, Dojo is adopting and implementing standards driven by the OpenAjax Alliance including the OpenAjax Hub for interoperability.

  7. Support

    There are dedicated organizations behind both that allow customers to benefit from a fully supported stack. Zend offers support for PHP, Zend Framework and its application server offering while SitePen has support offerings for Dojo. Depending on customer demand the companies may also create joint support offerings in the future.

  8. Community

    Both projects foster very strong and active communities that can support each other. Visit http://dojotoolkit.org/community and http://framework.zend.com/community for more information on how to participate.

While we will recommend and build integration points with Dojo, Zend Framework will continue to be largely Ajax toolkit agnostic. Only those who seek out-of-the-box Ajax functionality in the standard library will require Dojo. Additionally, we expect that the various Dojo-related components and helpers added to Zend Framework will serve as a blueprint for similar components serving alternate Ajax toolkits developed by the Zend Framework community. While we don't have immediate plans to support them directly, we may ship such community contributions in the future.

The Dojo Toolkit project will, for its part, also continue being server-side framework agnostic. In essence, this collaboration should not be taken as a move towards exclusivity in either project; rather, it adds features in each project to facilitate interoperability between Zend Framework and the Dojo Toolkit.

If you are interested in seeing some of the layout and form dijits supported by Zend Framework, we have prepared a demonstration application.