We talked a few months ago about something new we're doing at the Ajax Experience this year: the "Framework Summit." Basically, we're providing space for Prototype, jQuery, and Dojo to hold their own half-day events on-site, and these events are free and open to the general public.
Since we announced the summit, the frameworks have created their agendas for their events for their events:
Dojo Developer Day:
- Welcome, Introductions (Alex Russell, Dylan Schiemann)
- Tutorial - Progressive Dojo (Peter Higgins)
- Presentation - DojoX GFX and FX (Matthew Russell)
- Presentation - Secrets of DojoX (Tom Trenka)
- Tutorial - Getting going ... Zend + Dojo (Matthew O'Phinney)
- Tutorial - Dijit Layouts In and Out (Nikolai Onken)
- Tutorial - Reusable code, Widgeting (Peter Higgins)
- Community - Getting Involved (Peter Higgins, Nikolai Onken)
- Lightning Demos - What do you have? Show us.
Prototype Developer Day
- Welcome, Introductions (Prototype Core members)
- Contributing docs (Christophe Porteneuve)
- Contributing code (Andrew Dupont)
- Prototype & Performance
- Extended Q&A (Prototype Core members)
jQuery Developer Day
- State of jQuery (Rey Bango)
- Progressively Enhancing the User Experience Using jQuery (Karl Swedberg)
- An In-Depth Look at jQuery UI (Paul Bakaus)
- jQuery Team Code Review (jQuery Team)
Other Frameworks?
Some have asked why we didn't also include Framework X, Y, and Z at the summit. We have a simple answer: we only had room for three frameworks so we choose the three most popular frameworks (according to every survey we've seen). If the concept is successful this time around, we hope to do it on a bigger scale next year.
Obviously we hope you can make it to the entire Ajax Experience event, but if you can't do that, consider coming to one of the Framework Summit events. See you there!
Dojo has some nice new compound effects in the works. Some of the new effects include block fades, disintergrate, explode, shear, and pinwheel.
Each effect can be tweaked with config such as:
You will also see effects that work on the text within divs, as well as pieces of the div itself.
Tom Trenka of SitePen has created a new top-level Dojo package called Deft which "focuses on ActionScript components created in support of the various projects within the Dojo Toolkit (mostly for DojoX). Deft source files are well organized based in part on the organization of other Dojo Toolkit projects, as well as the package structure required by the Flex compiler. Most Flex applications are based on the Flex AS3 Application class, which forces you to write at least one “controlling” MXML file in order compile your code. Instead of this, Deft components inherit primarily from the Sprite class — which allows you to write pure ActionScript code."
It contains a few goodies in it including the multi-image uploader, and pre-alpha quality support for dojox.gfx. Future plans include support for audio and video. "Hopefully Adobe will continue its current path towards being open source friendly, helping Deft flourish."
The article goes into detail on downloading the Flex SDK so you can build applications with it.
This is an interesting experiment in the melding of Flash and Ajax techniques. I would love to see the Flash player giving us more access via simple JavaScript, so we don't even need to create SWF bridges.
Dojo developers will be pleased to read about the recent update to the Dojo grid control. Version 1.2 of the grid control focuses primarily on improving integration with Dojo data stores, improved grid layout handling and providing advanced in-place editing capabilities. The update was fairly extensive forcing the team to rethink the design of the widget and refactor quite a bit of code. As such, the updated version of the grid has been setup as a new control allowing developers to continue to use the older version while being able to take advantage the updated features. This will ensure that applications based on the previous grid control won't break.
The biggest benefit truly is the tighter coupling between the new DataGrid and Dojo's existing dojo.data stores:
In order to use dojo.data stores with the grid in previous releases, you needed the dojox.grid.data.DojoData model which would bridge the gap between the grid and the store. DataGrid has been engineered to remove that bridge. Instead of using stand-alone models to store data for the grid, any dojo.data store that implements the Dojo Data read API can be used. Additionally, DataGrid can use the write and notification API’s if they are available.
For example, the following code will create a new dojo.data store based off of a JSON file from a URL and populate the new DataGrid by passing it as an option to the DataGrid constructor:
Building a solid grid control isn't an easy task and it seems like the Dojo team have done a great job of enhancing their widget.
Brad Neuberg has built a very easy to use client side search tool called PubTools Search using Gears. The project is open source and provides a great avenue to share knowledge on Gears itself.
To accompany the code, Brad wrote a detailed article:
Did you know that you can use Gearsto do fast, client-side searching of data, similar to a client-side search engine? Gears bundles Full-Text Search (FTS) abilities right into its local, SQLite database. MySpace, for example, uses this feature with their MySpace Mail application, downloading all of a user's messages for fast, client-side search. Because all of the data is local, you can do nifty things like search over the data in real-time as the user types, something that is much harder if you have to query over the network to a server to do the searching.
Would you like to add the same kind of fast, local searching to your own web page and web applications? This article introduces you to PubTools Search and the Gears features that power it, namely Full-Text Search and Workers. PubTools Search is an open source JavaScript library that drops a client-side search engine right into your page. You configure it with basic HTML plus a list of URLs to index. Once loaded, a search form that uses the local Gears full-text search abilities will appear in your page to quickly and locally search over the documents in real time as a user types into the search field.
Brad sat down with me to discuss the project, some of the best practices, and his use of Dojo.
Ever had a situation where you've desperately needed to get API information for your favorite toolkit only to find that the site is offline for some reason? The Dojo Toolbox aims to tackle this through the use of Adobe's AIR runtime. Built using the Dojo framework, the Dojo Toolbox allows for offline viewing of Dojo's API making it easy to have immediate access to the information, internet connection or not.
From search to easy navigation and cross-referencing, the Dojo Toolkit source code documentation can now be viewed everywhere you go. When future versions of the Dojo Toolkit are released, you will have the power to view multiple versions of the API within the Dojo Toolbox. We're also working on allowing you to view documentation for your own source code in a future release!
In addition, the Dojo Toolbox allows you to do custom builds of the Dojo framework as well as get a comprehensive list of learning resources all within the same application. This is a "must-have" for Dojo developers.
Dojo is a framework that you can bend for your needs. You have very fine grained control on what you want in your base dojo.js, how other components are loaded, and a final custom JavaScript file.
Brad Neuberg showed a project, SearchTools, that added local search via Gears, and had a custom Dojo that wasn't Dojo in a very small package.
Alex Russell has taken this further and explained how he got Dojo to 6k by implementing a stub loader, so many of the functions were lazy loading stubs instead of full method bodies.
His use case was mobile, or small embedded devices in general:
On an iPhone with a clean cache the stubbed-out dojo.js cut in half the time required to load and evaluate. Sure, it’ll take more time on the network when parts of the toolkit are actually used (say, in response to a click event), but for mobile device scenarios, it’s going to be hard to beat the flexibility and speed of the stub loader when pulling Dojo into a page.
The post really wasn't about Dojo per se, but John Resig parsed the sentence: "Even so-called “lightweight” libraries like jQuery" and in one part of a three part post hit back:
The way it's worded you would assume that you were paying a large, up-front, cost to using jQuery when, in fact, there is very little overhead. jQuery has been shown to be the fastest loading JavaScript library for non-cached code and considerably fast for cached code.
If we ignore the frameworks and think of the meta-point it is a lot more interesting.
Revin Guillen has posted about the Dojo dojo.data API and how you can layer access to Web services in a very elegant way.
His example shows building access to Wikipedia (demo):
Dojo recently received a new data store that demonstrates exactly what we want: dojox.data.WikipediaStore. It does just what it sounds like, turning Wikipedia into a simple object you can query from your code. Building it with Dojo’s handy dojox.rpc package makes for a simple, compact, DRY implementation.
In only four steps:
- Create the web service object
- Declare the new data store, inheriting from ServiceStore
- Give it a fetch method
- Give it a _processResults method
The service descriptor looks like:
which you can use when you create the store:
Dylan Schiemann has a really nice case study post on implementing a Flickr badge with Dojo.
What is particularly interesting is how he starts with a simple version:
And then shows how he tweaks it for performance, explaining what he is doing along the way:
It is nice to see his thought process, and how you can start with functionality, and then go back and tweak away.
James Burke of AOL announced that AOL has released Dojo modules which wrap AOL's Web AIM API. This is a very big announcement as the Web AIM API lets developers incorporate core AIM functionality into any web page including the ability to sign on, send and receive IMs, and obtain a user's Buddy List.
My employer, AOL, just open-sourced some Dojo modules that include a wrapper for the Web AIM API and UI widgets for user presence, the buddy list and sending and receiving instant messages (IMs).
The modules are open source versions of the modules used by AOL Webmail, so they have history in a real product. The modules are designed for Dojo 1.1 and above.
This has been released as part of the AIMDojo project with version 1.0 immediately available for download. James has included demos of Dojo and WEB AIM integration.
The team at Dojo have been really working hard to improve their documentation and put more information in the hands of Dojo developers. Between DojoCampus.org and the SitePen blog, they've really come a long way to providing solid education material for the Dojo community.
Normally, the Ajaxian Featured Tutorial consists of one really good educational piece but two really awesome tutorials were recently posted and I decided to give Ajaxian readers a two-fer:
Tutorial 1: Dojo Drag and Drop, Part 1: dojo.dnd
In the first part of this series, Revin Guillen takes you through the ins-and-outs of Dojo's drag and drop API named dojo.dnd.
What I really like about Revin's tutorial is his extensive code samples that reinforce the concepts. His demo code on building a drop handler, for example, is very extensive and concise allowing the reader to easily understand how to create the drop handler:
Tutorial 3: A Beginner’s Guide to Dojo Charting, Part 1 of 2
Next up Doug McMaster teaches you how to leverage Dojo's charting capability:
In this two part guide, we look at how easy it is to get Dojo Charting up and running, and then examine in greater detail the options available for different looks for your charts. Today in Part 1, we start with a basic example and then examine all the options available in defining your plot type. Part 2 will cover the options available in defining the axes and data sets for your charts.
Doug explains how to easily create charts by customizing the available 2D charts included in Dojo charting API. Code as simple as:
produces a nice chart like this:
Nexaweb has released a new product that build on Dojo, dojo.E:
dojo.E provides developers with the ability to use an XML based markup language to add in their Ajax behaviors. Markup whether — XML, HTML or CSS — simplifies development by allow developers to convey in simple text format what they would otherwise need to convey in code. Markup also provides a great abstraction layer that separates the implementation from the usage.
This release, which is an Apache style open source project itself, consists of two pieces:
dojo.E Markup
dojo.E Markup allows developers to describe their dojo components using a simple markup language that translates directly into dojo classes. For example declaring a button in dojo would be done one of two ways;
Using JavaScript
new dijit.form.Button(htmlElement, “Hello, World”);dojo.E Markup provides a third way that allows developers to describe the button as follows:
HTML:
<script type=“text/xml” dojoType=“dojoe.XmlScript”> <ui xmlns:dijit=“dijit”> <dijit :form.Button label=“Hello, World!” onclick=“alert(’It works!’)”/> </ui> </script>dojo.E Runtime
The runtime provides additional markup that makes modifying the HTML DOM or the dojo Components easier.
XML:
<xm :xmodify document=”ui”> </xm><xm :append select=”//widget.SortList”> <li>{0}</li> </xm>The xModify syntax above tells the dojo.E runtime to append a “
{0} ” tag to the dojo SortList component. The select statement in this case is a XPath statement and not a CSS selector. In the actual sample this snippet above is wrap with a “Macro” which allows the developer to parameterize the “{0}” and execute the xModify snippet when the developer clicks the “Add” button.You can play with this in a live editor that shows samples such as a todo list:
XML:
<declarations> <dojoe :Macro id="add" xmlns:dojoe="dojoe"> <![CDATA[ <xm:xmodify xmlns="html" xmlns:xm="dojoe" xmlns:dijit="dijit" document="ui"> <xm :append select="//widget.SortList "> <li>{0}</li> </xm> ]]> </dojoe> </declarations> <ui xmlns:dijit="dijit" xmlns:dojox="dojox" xmlns="html"> <div id="input_container"> <span>ToDo:</span> <input style="width: 184px; margin-left:3px;" id="textbox" type="text" class="input_tbx" value="Item"/> <input class="button" type="button" value="Add" onclick="dojoe.containers.macro.get('add').execute(document.getElementById('textbox').value);" /> </div> <div id="list_container"> <dojox :widget.SortList title="SortList From Markup" style="width:300px; height:150px;"> <li>A. Download and Install the dojo.E</li> <li>B. Build dojo.E Application</li> <li>C. Profit</li> </dojox> </div> </ui>
Mike Wilcox has posted on Firebug Lite for Dojo and shows how he has taken it beyond console.log().
I was most excited about the DOM inspector:
Yes, I did say that a DOM inspector would imitate existing tools. However, I implemented this for a colleague who was struggling with a particularly nasty IE 6.0 bug one day (more like one month), as he expressed a wish to view the dynamic DOM to verify hover states in IE6 — the one browser without this tool. Because Firebug Lite already had some nice formatting built in with the dirxml() method, it was just a matter of grabbing the current event target from the onmousemove event, and displaying the result in its own section. The current target is outlined, and clicking on it makes it “stick”.
As much as everyone loves Firefox, the Dojo team is committed to the Open Web, which means encouraging competition amongst browsers. One way of fostering that competition is through debugging tools, such as Firebug Lite. We are trying to make it as easy as possible to code for large user-base browsers like Internet Explorer, or preferred browsers, like Safari or Opera, or… [your favorite browser here].
Pete Higgins of Dojo has created a nice example, dojo.workers, that puts together coverflow with Dijit and some dojo.query animations.
He even takes out his frustrations with IE 6 as he creates a branch that looks like this ;)