Dojo and Zend Framework Partnership Announcement

May 23, 2008

News, Zend Framework

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

  1. 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.

  2. 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:

    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 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.

    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. 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.


  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. Will Zend Framework ship Dojo?

    Yes.

  8. 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.

  9. Is the Dojo team joining Zend Framework as contributors?

    Yes; the Zend Framework project already has CLAs on file for Dojo
    contributors.

  10. 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.

  11. What license governs Dojo?

    It is dual licensed under the modified BSD License and the Academic Free
    License version 2.1. For details see href="http://dojotoolkit.org/license">http://dojotoolkit.org/license

  12. 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.

  13. 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.

About Matthew Weier O'Phinney

Matthew is an open source software architect, specializing in PHP. He is currently project lead for Zend Framework, a project with which he has been involved since before the first public preview release. He is a Zend Certified Engineer, and a member of the Zend Education Advisory Board, the group responsible for authoring the Zend Certification Exam. He contributes to a number of open source projects, blogs on PHP-related topics, and presents talks and tutorials related to PHP development and the projects to which he contributes. You can read more of his thoughts on his blog, weierophinney.net/matthew/.

View all posts by Matthew Weier O'Phinney

22 Responses to “Dojo and Zend Framework Partnership Announcement”

  1. dvershinin Says:

    My vote goes to jQuery. Best library out there. Looking forward for integration with ZF!

  2. edoggie Says:

    Creating widgets programmatically, just like JQuery, ExtJS and probably others.

    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! ; )

  3. edoggie Says:

    While I find references to being able to use dojo without markup, I’ve hunted up and down the internet for a easy simple explanation of using DOJO without the dojoType declaration in the HTML markup? It is not easy to find in the DOJO documentation? Anyone with a URL would be helpful.

    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.

  4. _____anonymous_____ Says:

    prefer JQUERY still…

  5. sempsteen Says:

    I’m John Resig fan, and my vote goes definitely for jQuery!
    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.

  6. andreliem Says:

    Just my own two cents.

    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).

  7. inbox0003 Says:

    Hi, I’m a seasoned PHP developer (since 2001) and have been tasked with creating a pretty serious Web 2 application. I like the level of professionalism Zend has brought to the PHP community. It "looks" like Zend Framework and Dojo can do my application, but I am reluctant to start coding before ZF 1.6 comes out. I would really appreciate 1) an advance look at the planned integration details, especially what code will look like; and 2) Have an idea of when ZF 1.6 will be available. 3) I would also like a million dollars, but I will settle for 1 and 2 :o) Cheers!

  8. peteotaqui Says:

    Having developed a fairly weighty application with Dojo, I can assure readers that it is an excellent choice for partnering with the Zend Framework.

    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.

  9. aydin Says:

    I have checked a lot of frameworks and finaly i use jQuery and ExtJs.

  10. wllm Says:

    I’d like to add a couple of points to Matthew’s comment. First off, while we believe Dojo is a great choice based on its technical merits alone, the decision was largely a business decision for Zend. We had to chose a framework that offered IP guarantees consistent with our own, plus the Dojo foundation is a great entity for Zend to collaborate with on support. We typically do not involve community members in Zend business decisions for obvious reasons.
    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.

  11. weierophinney Says:

    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.

  12. _____anonymous_____ Says:

    I think dojo is quite powerful, but I will never use it within our projects since dojo best practices encourage non validating markup.

    I am well versed with the <a href="http://dojotoolkit.org/forum/dojo-and-html-doctype-validation">debate</a&gt; 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&gt; 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.

  13. _____anonymous_____ Says:

    Zend Framework Team, will you give an answer for the community voice?

  14. wfiers Says:

    I’m with these guys here. I’ve been disapointed in the way Dojo tends to introduce it’s own attributes to HTML. I don’t know it very well but the examples i’ve seen don’t parse through the validator and valid code is something rather high on my own priority list. I was sortof hoping for something more light weight like DomAssistent, though I guess that’s far too small for a big project like ZF.

  15. _____anonymous_____ Says:

    Since the ZF is a PHP framework why don’t you combine it with XAJAX, which implements Ajax functionalities in pure PHP with a minimum of JavaScript.

  16. _____anonymous_____ Says:

    Why not Jquery, the Prototype killer?

  17. nortbot Says:

    Here’s another comment disappointed with the choice to go with Dojo. Dojo is not bad, it’s just not nearly as good as JQuery or ExtJS.

  18. skyblaze5 Says:

    I also love jquery and looked at dojo after this news. I really don’t like it at a first glance expecially for its non standards methods that break up xhtml doctypes…

  19. _____anonymous_____ Says:

    I wrote up a description of how I do AJAX in Zend Framework using JQuery. I don’t want to put Dojo down, but its not my favorite AJAX library, so this is how it can be done with JQuery.

    http://www.philipandrew.com/?p=48

  20. _____anonymous_____ Says:

    I really don’t like Dojo because it breaks current XHTML standards polluting tags with Dojo specific attributes. I haven’t dug to deeply into the subject, but I am wondering how is using custom DTD’s and XHTML namespaces going to work on older browsers when they can’t even figure out the standards that are in use for many years now.

    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.

  21. kennu Says:

    jQuery would have been nicer.

  22. internetoutfitters Says:

    Just about any javascript framework I can think of has a far larger user base and developer community than dojo… jQuery, prototype, YUI, Ext, etc. What an odd choice…