Dojo, objects and classes

Dojo’s class construction kit is a nice thing, once you know how to use it. What I especially like about it, is that it even allows for multiple inheritance!

Just a short example, I have a base class for a page (as you used here). If the page also contains forms then I also use the “myproject.form” class, that I can simply add to my page’s class via multiple inheritance, that is so neat! Like so:


dojo.declare("myproject.page.ideas", [myproject.page, myproject.form],
    function() {}, {
});

Happy inheriting …

3 Comments »

  1. Douglas said,

    August 31, 2007 at 2:35 am

    can you send a complete example of using dojo.declare to create an object. I am having problems with the __package__.js file

  2. primary english teacher resources said,

    September 12, 2007 at 6:07 am

    primary english teacher resources…

    primary english teacher resources…

  3. no fault insurence driver for business quotes and rates meadowbrook com long beach ca mks said,

    November 13, 2009 at 12:58 am

    no fault insurence driver for business quotes and rates meadowbrook com long beach ca mks…

    artificialness.unbroken Quirinal.station:wipe Lusaka …

RSS feed for comments on this post · TrackBack URL

Leave a Comment