Skip to main content

Posts

Showing posts from March, 2014

Don't Get Disconnected with Connect

Here is another of my "My Experience in Building Dojo Widgets" post. Dojo.connect (dojo/on) is a versatile and important part of dojo that handle events.  Along with dojo.subscribe and dojo.publish these three features of Dojo provide a powerful set of tools to query the DOM. <div class="widget" id="happy"> <ul> <li id="1"> <a href="#" tabindex="-1"><i class="icon-tools"></i>Hello</a> </li> <li id="2"> <a href="#" tabindex="-1"><i class="icon-tools"></i>Hello</a> </li> <li id="3"> <a href="#" tabindex="-1"><i class="icon-tools"></i>Hello</a> </li> <li id="4"> <a href="#" tabindex="-1"><i class="icon-tools"></i>Hello</a> </li> <

When This is This and What is This, but What is not This, Dojo Event and Objects

In the past couple of years, I have been building Dojo Bootstrap widgets from stratch rather than using standard Dojo widgets and styling using a Bootstrap theme.  Why in the world would you do that might you ask.  Sometimes I also ask myself that question. There are many advantages, including adding security features that are not founded normally. Since we RESTFul JSON services, the widgets are optimized for our format.  In addition, the widgets are automatically binded with the RESTFul JSON services when the web page is instantiated.  So as part of my Dojo adventures, I had to learn and relearn Dojo again and again. There is so many different ways to do things, but the right way is sometimes elusive.  One advantage of Dojo over JQuery is that Dojo forces you to use a pattern for creating widgets which I really like.  It is hard enough for me to follow what I did 2 months ago.  Imagine if another developer had to follow my code years later. One problem is that like all software de