Dojo and Zend Framework Partnership Announcement
The Zend Framework team is excited to announce a partnership between Dojo and Zend Framework. The goal is to deliver an out-of-the-box solution for building Ajax-based Web applications with Zend Framework. This is mainly targeted at users who rely on us to provide them with a best practice and an out-of-the-box experience for Ajax and don't want to have to deal with evaluating a solution (e.g. toolkits, licenses, etc.).
Below is an FAQ which sheds some more light on this announcement:
Zend Framework and Dojo Partnership FAQ
-
What are the Zend Framework and Dojo Toolkit teams announcing?
Zend Framework and Dojo are announcing a strategic partnership to deliver an integrated solution for building modern PHP-based Web applications. In order to deliver an out-of-the-box experience Zend Framework will bundle the Dojo Toolkit and will feature Dojo-specific components.
-
Why did the Zend Framework and Dojo teams decide to work together?
There are many synergies and similarities between the two projects and their communities, including:
-
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.
-
IP Purity
The Zend Framework and Dojo project 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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
Communities
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.
-
-
What if my favorite Ajax toolkit is not Dojo? How does this fit in with your use-at-will philosophy?
Zend Framework will continue to be largely Ajax toolkit agnostic. While we will ship Dojo with Zend Framework as our preferred Ajax toolkit, 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.
While the Zend Framework team feels that Dojo is the right choice of JavaScript toolkit to build our Ajax experience on, it is not necessarily the case that Dojo is the right toolkit for you or your project. In addition, it may not be worthwhile to refactor existing code to standardize on Dojo. You may find that features found in other JavaScript toolkits far outweigh any benefits of our collaboration.
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.
-
What components in the Zend Framework will be affected by this integration? Will any of this work benefit integration projects for other Ajax libraries?
Currently, we intend to add the following components:
- 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 work will support and enhance Dojo's modularity at the application level.
- Zend_Form elements that utilize Dijit, Dojo's widget collection and platform. This will simplify creation of Zend_Form elements that can be rendered as Dijits. For instance, highly interactive widgets such as calendar choosers, color pickers, time selectors, and combo-boxes will be provided in the initial integration project.
- 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. 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 will provide a JSON-RPC implementation that is compatible with Dojo.
These features will be added to Zend Framework; no components will be re-written to make use of Dojo.
With Dojo support in Zend Framework, we hope to see ZF community contributions that follow this blueprint to add similar functionality for other Ajax toolkits.
-
I have feedback regarding the proposed method for integrating Dojo and Zend Framework. How can I deliver this feedback?
The Dojo integration will undergo the standard Zend Framework proposal review process. Please watch the main developer's mailing list in the coming days for a proposal. You will be able to give feedback as with any proposal.
-
Could I contribute support for my favorite Ajax toolkit to Zend Framework?
Absolutely. However, we will only officially support Dojo components for the foreseeable future.
-
Will Zend Framework ship Dojo?
Yes.
-
Is Zend joining the Dojo foundation?
Zend has signed a corporate CLA with the Dojo Foundation in order to enable Zend staff to contribute to Dojo as needed and has begun the process of becoming a new Dojo Foundation member.
-
Is the Dojo team joining Zend Framework as contributors?
Yes; the Zend Framework project already has CLAs on file for Dojo contributors.
-
If I have signed a Zend Framework CLA will I be able to contribute to the bundled Dojo library?
We will not allow contributions to the bundled Dojo library through the Zend Framework project. We will bundle the latest, unmodified version of the Dojo library in Zend Framework; all contributions to that library should be done through the Dojo Foundation according to their policies. However, we may create custom modules to extend Dojo that contain contributions from Zend and the Zend Framework community. The Zend Framework team does not expect to ship custom extensions as part of our initial Dojo integration project.
-
What license governs Dojo?
It is dual licensed under the modified BSD License and the Academic Free License version 2.1. For details see http://dojotoolkit.org/license
-
Will Zend Studio add support for Dojo? Will Zend Studio also support other Ajax toolkits?
Zend Studio will continue to enhance its Ajax support in upcoming versions. As part of these enhancements it will likely also support individual toolkits including Dojo. We are evaluating enhanced support for Dojo widgets used in Zend Framework components.
-
I have questions which you haven't answered in this FAQ. How can I ask them?
On Tuesday May 27th Zend Framework and Dojo team members will hold a joint Q&A webinar. In the webinar the Zend Framework team will deliver a short overview of the proposed integration. Following this short presentation we will open up the Webinar to questions from the audience. In addition, Zend Framework and Dojo community members can email the main development lists of either project.
Matthew Weier O'Phinney has written up some of the technical details of the integration for those interested.

Comments
On the other side, IBM and Sun backed it up, it was o no-brainer that Zend will follow the path.
Having a big company behind a beautiful project like Zend Framework is very productive and promising, but maybe you should ask the users of the product as well before making some of the decisions.
Although, I love jQuery, i don't think you can compare it with Dojo or YUI, mainly because it's core functionality (without officially supported plugins) doesn't do some things out of the box (for example autocomplete functionality).
If you ask me, YUI would be a great choice.
I really hope the community will have interest in duplicating Dojo's functionality built into the ZF to YUI, jQuery and other JS toolkits/libraries.
http://www.philipandrew.com/?p=48
I am well versed with the <a href="http://dojotoolkit.org/forum/dojo-and-html-doctype-validation">debate</a> about the relevance of validators as tools. I fully appreciate the <a href="http://www.mikeindustries.com/blog/archive/2004/06/march-to-your-own-standard">idea</a> behind ignoring validation, and I even understand that dojo provides ways around using their encouraged method.
However, it means nothing to my clients who expect fully validated, standards compliant sites. It's what they pay me for. So, while
dojo may be interesting for development personally, I would avoid it entirely in my work.
It seems the ZF strives hard to adhere to best practices and encourage that in its users, but then with this announcement, seems to undo that reputation (which may be just as powerful as the quality of its code).
ZF has weight. I wish they would throw it in another direction or at least had even polled the users.
Sorry for the delay in responding; the DevZone announcement went out just prior to a long weekend in the United States.
Many of the questions asked here have been asked before, either on my own blog or by the Dojo team. I'll give short answers to these now.
First off, any choice we made regarding a Javascript toolkit was going to be wrong. Why? Because the choice of a Javascript toolkit is akin to the choice of PHP framework, or choice of programming language; everybody has their favorite, and that favorite is the best. While we are choosing to ship with Dojo and provide specific integration with that particular toolkit, we are also still staying primarily Javascript toolkit agnostic. You will continue to be able to use other toolkits with ZF; we in fact will encourage community contributions that target other toolkits. We just won't support them directly as we do the Dojo integration, and we will not be shipping with those toolkits in the foreseeable future.
JQuery fans: JQuery was indeed evaluated. However, while the MIT license will work for us, we also wanted assurances that the IP involved is clean -- which usually requires a Contributor License Agreement. Additionally, the sheer depth of the Dojo offering, frankly, dwarfs that of most Javascript toolkits out there. That said, we are strongly encouraging contributors to watch how the Dojo integration unfolds, and to use it as a blueprint for integrating other Javascript toolkits. We are open to, and in fact encouraging, such future contributions. This is clearly outlined in the FAQ above.
Regarding the allegations that Dojo encourages mixing non-standard attributes into XHTML: this is true. However, there are a couple points to make regarding this. First, while the markup does generate warnings when validating, there are no graphical browsers currently that have any trouble rendering such elements; it's a pragmatic approach for associating behavior directly with the element. Alex Russell of Dojo has written about this previously. Second, all effects that can be accomplished by using element attributes can also be accomplished programmatically by Dojo instead. In other words, using non-standard attributes is a convenience feature only, and completely optional. My goal when creating the targetted form elements is to give the developer the option of using either approach.
If you have further questions, please join the webinar today, as listed in the article; join the #zftalk and #dojo IRC channels; or join one of the ZF or Dojo mailing lists.
So what exactly *was* the decision we made. We will ship the Dojo lib with at least one of our distributions (we're considering multiple distros with varying sizes in the future) + Dojo components will be part of the standard library, indicating that they are supported by Zend.
I'd like to be very clear so that everyone can set their expectations accordingly. Zend reserves the rights to alter the Zend Framework distributions we make available on our web properties and to determine what we can or can not support. We will continue to ask for community input where possible to determine ZF direction, but there are some cases where we simply can not. In this case, we needed to search for the appropriate toolkit, then define our relationship, then finalize all the details about co-promotion, support, etc.
I also like to say this:
Everyone seems to be getting hung up on the invalid XHTML thing. As Matthew mentioned, there is another way to do it; it is simply provided as a convenience. There is a lot more to Dojo than just non-compliance :), I would strongly encourage everyone who hasn't already to dig a little deeper.
The complaints about invalid xhtml are invariably ill-informed (as in: I have yet to hear anyone who has actually used dojo complain about it).
There is a major difference between *semantic* and *valid* x/html. The former is extremely important, while the latter is less so to a point. Invalid code in the form of extra attributes is really a minor infraction and in no way stops a page from rendering in any modern browser, and I've also yet to see such attributes cause any problems in older browsers either.
It should also be noted that the extra attributes are used for dojo widgets (aka "dijit"), and not needed for any of the core dojo library functionality. The difference between the two is something like prototype (~= dojo core) and scriptaculous (~= dijit).
Dojo is also extremely good at not polluting the javascript environment, in a very similar way to YUI ... it's a few more characters to type dojo.byId() than $(), but the $ function is real PITA if you (or some other developer) end up trying to have two libraries on the same page competing for it. This is a common enough situation that jQuery even have functionality to try and take $() back from other libraries!
Dojo also comes with some amazing extra features, such as a complete testing framework (DOH) and a top-flight package / build / compression system.
None of this is to say that Dojo doesn't have it's problems. I've been somewhat less than impressed with a few of the Dijit's - but since it's *so* easy to start building your own widgets, one can hardly complain!
Well done Zend, looking forward to seeing more.
When I was using .NET in my last job, I relied on AJAX.NET so I haven't had to code any major JS till I started developing apps with PHP .. so my point is that I'm pretty fresh to this stuff and not particularly bias :P.
When I heard they were using DoJo I was a bit disappointed because I was used to scriptaculous or mootools. But I've realized they are not that great if you want to do real heavy development.
So I've just recently explored DoJo and I'm quite happy with it... it takes a lot more time to get into, probably the best con about it... but it's powerful, modular, and backed by some gurus (it seems). You can tell the DoJo guys know what they are doing.
It's also a great fit for their JSON support, and the dijit validators/forms really fall in line well with the zend framework (I think).
Also to achieve data portability we must have valid code. Semantic code is important but you can't say it much more important than valid code. Anyway i never use those kind of view helpers that generates inline javascript. I've javascript file for each of my controller that handles all scripting by the page load.
Also I think Dojo was probably the solution evaluated and liked by people on the Zend Framework team, it would be good to hear from them, why they choose it other then the Licensing issues? If Dojo provides a greater depth over JQuery, ExtJS and others, can you explain what makes it unique and of choice?
I have used JQuery, ExtJS, and Behaviour and found ExtJS to be very frustrating, super powerful, but very cumbersome to use in a willy-nilly loose fashion, I much prefer the use at will capabilities of JQuery and am glad to see Zend felt a loosely coupled Javascript Framework was best.
All of these frameworks essentially do the same thing, so getting used to a new one isn't that hard, but granted the invested time that you have in learning the new techniques of another one sucks, and one framework may make something really simple, where another one is much much harder to do the same thing.
http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-dojo/manipulating-widgets-through-code/displaying-w
While the syntax is a bit longer then others, from what I have scene of the Zend Framework integration in this example:
http://blog.justanotherdeveloper.co.uk/2008/07/23/zend-framework-and-dojo/
Its going to be a pleasure to use! ; )