28 Days of Dojo was a success, or at least for me it was!

So here it is, noon on the last day of 28 Days of Dojo. I have to say I didn’t think my site would have been getting as much traffic as it did in this last month. The total count is nearing 10,000 hits for the month with a daily average of over 350 hits per day, and that is with little or no posts on the weekends. This is looking like it will be my most hit count in a single month for the site. Most of all, I have received more comments and emails this month than ever before, thank you!

So what is the conclusion? I think Dojo has received a lot of coverage throughout the years and I think people are getting more and more into the framework as time goes by. I really didn’t raise anything that was not already out there but the comparisons to jQuery got a lot of attention. I think I need to do more in that space going forward.

Going forward I am sure to post about Dojo and probably more things about OpenSocial.org and Eclipse. I have never been a very structured blogger so sticking to a single topic was very different this past month for me.

Once again, I would like to send thanks for all of the comments, emails, tweets, etc that the community shared with me this last month!

Advertisements

Why you have to take Dojo seriously…

The 28 days of Dojo has come to an end but the blogging will continue. I chose to do this little venture to learn and share what I have learned over the past few months with Dojo and to also evangelize Dojo to all of IBM and Lotus customers. As you have seen, I referenced a lot of material already on the net, and to be honest, that is where Dojo truly shines – the community. One might ask why I would this?

Well, I was never told to do this by IBM, nor was it part of some marketing campaign. I simply see the momentum and the determination by both IBM and its community to build the very best of breed JavaScript frameworks that can be deployed cross platform in enterprises all over the world. Any web based or even rich based applications at IBM are embracing and extending Dojo. As you will see in the next versions of Dojo, there will be amazing enhancements to this already excellent framework. There are teams, right now, working on some amazing widgets to be included in the next versions of their products. Learning and knowing Dojo will be vital to many products in the IBM portfolio, including Lotus Notes and Domino.

As with most of my posts, this post was written days or even weeks in advance. I will however, post the hit count results for this month when the 28 days of Dojo really ends. Hopefully by then it will show the level of interest. Of course, this is only one blog and there are so many amazing people evangelizing and promoting Dojo I could spend three months covering all of the blogs, articles, and books on the subject.

As I posted before, get involved! An open source project is only as good as the people who get involved with it.

Paul Withers: King of Dojo charting in XPages??

After my last post I also noticed Paul posted a pretty nice tutorial on the XPages Wiki. The formatting is really bad and I am sure it’s not Paul’s fault but the content is pretty good. Check out his article on the XPages Wiki.

This article intends to provide developers with an understanding of how to integrate the dojox charting classes into XPages to generate a functionally rich chart in a variety of formats. By stepping through the code and providing a sample database, I will show you how to add colour themes, customise axes, and generate tooltips and legends. The intention is that you are able to build customer-ready charts quickly with a level of knowledge to be able to dig deeper if required. You can see the charts online here: http://hermes.intec.co.uk/xpagessamples/charts.nsf/chart1.xspmore

Dojo charting in XPages

I wrote about this a while back and I find it fitting for the 28 days of dojo because Paul Withers did an excellent job on these tutorials:

Dojox Charting Tutorial – Part One: Background and Generic Code

Dojox Charting Tutorial – Part Two: Creating Series and Generating the Pie Chart

Dojox Charting Tutorial – Part Three: Column and Bar Charts

Dojox Charting Tutorial – Part Four: Line Chart Via Javascript

Attachment Viewer 2.0 beta – MS Office Support!

I need some help testing this out. After playing around a little bit with C# and the MS Office integration API’s I was able to compile an executable that calls out to MS Office to show Documents, Presentations, and Spreadsheets. The architecture is pretty straightforward, the attachment viewer calls out to an executable to have the file converted to HTML and then the document is shown in an iframe in the viewer. I have seen some minor issues and thankfully no crashes.

This version is also Dojo enabled and currently needs to have internet access in order for it to work since I pull Dojo 1.5 from the Google CDN. You will notice the Dojo toolbar and the different view modes – Film Strip, Slide Show, Thumbnails:

Requirements:

Installation Instructions:

  • If you have a 1.0 version of the attachment viewer installed, please make sure you uninstall it first.
  • Once you have the older version installed you can drap and drop the icon below to your My Widgets panel to have the new Eclipse plugins installed.

Drag this to My Widgets in Lotus Notes

  • You may also need to set the preference for the viewer under File | Preferences:

Once I get some good feedback I will be posting the binaries and sources to the OpenNTF project.

Some known issues:

  • The thumbnail view does not show the last image as a thumb
  • Sometimes the MS Office link is broken, a restart or shutting down MS Office may be needed.

In advance, thanks for all of your feedback and interest in this project!

Forward: Asynchronous Modules Come to Dojo 1.6

Had to pass this on.

Module Compatibility

Dojo modules are now completely compatible with:

Understanding dojo.data

One of the areas in Dojo that may seem daunting on the surface is the dojo.data package. It is actually not that bad once you see a few examples that can be referenced on the Dojo Toolkit site. In this post I will use the dijit.form.FilteringSelect documentation to show how easy this stuff is. Check out the first example where you have a drop down list with a button, you select the button and a message box appears and shows the underlying value for the selection:

Click image for larger picture

You can look at the code and its pretty straightforward, but let’s go ahead and dissect it:

    dojo.addOnLoad(function() {
        var stateStore = new dojo.data.ItemFileReadStore({
            url: "../../_static/js/dijit/tests/_data/states.json"
        });
        var filteringSelect = new dijit.form.FilteringSelect({
            id: "stateSelect",
            name: "state",
            value: "KY",
            store: stateStore,
            searchAttr: "name"
        },
        "stateSelect");
    });

The first thing you will notice is the ItemFileReadStore with a rather long URL. You can look at the JSON using this full URL. Looking at the data will help you understand the code a little better. The combo box is initialized to Kentucky, the “value: “KY”” defines that. Notice the searchAttr defines what element in the JSON object to use for display and searching, in this case its the name attribute. Looking at the chunk of the JSON below you will see the identifier is “abbreviation”, meaning the result that is submitted or used would be the abbreviation attribute in the JSON record.

{
  identifier:"abbreviation",
  label: "name",
  items: [
	{name:"Alabama", label:"<img width='97px' height='127px' src='images/Alabama.jpg'/>Alabama",abbreviation:"AL"},
	{name:"Alaska", label:"Alaska",abbreviation:"AK"},
	{name:"American Samoa", label:"American Samoa",abbreviation:"AS"},
...

So instead of some static JSON file on the server, it could very well be a servlet or PHP data-source generating the JSON.

But how do you get to the children???

So by now everyone pretty much knows about dojo.query(), the powerful function search a DOM for elements. But, did you know you can also use a syntax to get the immediate child elements of query? Yep, this hidden little gem is very powerful, you simply add a “>” at the end of the query. So the same supported queries plus this sign simply returns the immediate children of the result.

dojo.query('#main > *')
dojo.query('#main >')
dojo.query('.foo >')
dojo.query('.foo > *') - link

You should check out the documentation, you can use dojo.query() with many different variations to get all kinds of different results.