us site
developer center
search

Archive for January, 2008

dojo xml parser

Sunday, January 6th, 2008

We’ve been using dojo for a while now as part of our Ajax product offering. We’re currently in the process of upgrading from 0.4 to the shiny new dojo 1.0; as part of that we have developed some things that may be useful outside of the Nexaweb product. One of these is a processor, which uses the dojo parser, to read xml and uses it to create dojo components.

For example:

<ui xmlns:dijit=”dijit”>
<dijit:form.Button label=”Hello, World!”/>
</ui>

<ui xmlns:dijit=”dijit.form”>
<dijit:Button label=”Hello, World!”/>
</ui>

would both create a dojo button with the (grammatically correct) “Hello, World!”. The path to the component is the combination of the xml namespace and the element name. An event handler could be added simply by adding an onclick attribute.

HTML can be mixed in using its own namespace:

<ui xmlns:dijit=”dijit” xmlns:html=”html”>
<html:p>HTML before</html:p>
<dijit:form.Button label=”Hello, World!”/>
</ui>

These are all included in an HTML file through the <script/> tag, either inline or via the src attribute.

Why is this useful? It flips the ui description to a full declarative approach from either JavaScript or JavaScript + a div. This has some advantage: can be easier to write and maintain, the dojo part can be seperated from the rest of the HTML, easier to share, can be machine generated or schema validated for correctness, etc.

It’s not all peaches and cream - the declarations get longer and there is another, very short, step before the component is on the screen - but for many the benefits can outweigh the disadvantages.

You can try it yourself by downloading it here. Feedback and thoughts appreciated. More examples on their way.

- Rob Gagne

MR released

Sunday, January 6th, 2008

For those on Platform 4.2 we’ve released a new maintenance release. This focuses on some fixes for dynamic layout in flow panes and a new API that helps keep track of the UI update lock count for freezing the screen rendering - something you don’t think about until you need to do it. See the release notes page on the dev center for more info.

- Rob Gagne

Welcome

Sunday, January 6th, 2008

Hi Everyone,

Welcome to the new blogroll for Nexaweb. We’ve been blogging for a while now elsewhere (rockstarapps.com and coachwei.com) but these are the first Nexaweb hosted blog sites. You can read about new things coming out of engineering, marketing and our community folks as well as the business side of things.

Enjoy!

- Rob Gagne