No announcement yet.

Cleaning up dojo code

  • Filter
  • Time
  • Show
Clear All
new posts

  • Cleaning up dojo code

    I've been assigned to clean up the front-end code on a website that uses the dojo library for most of its client side interaction. The dojo docs are terrible and I would like to accomplish a separation between behavior and structure yet this seems somewhat impossible given the requirement of adding invalid attributes such as dojoType to elements in the HTML.

    So my question amounts to is there a way to handle the application of these attributes dynamically or create the dojox and digit objects manually by passing in my own nodes rather then having the add dojoType, etc attributes to elements? I am more then familiar with JavaScript, I just need to find a way to remove all this obtrusive code that dojo requires so the pages are valid.

    Links, blogs anything would be helpful at this point. I have already looked through multiple searches on google with very little. I rather not make this thread a library debate. If you have something to contribute then go ahead but remarks like dojo is worthless are not going to help. I know dojo is worthless but the site is functional with it and I just need to clean up some the code so that is what I'm looking to accomplish - not a complete overall or transition to another library.


  • #2
    For reference:

    // example lightbox
    // grab element node
    var objImg = dojo.byId('my-image');
    // obtain reference and turn into node
    var objDojoxImg = new dojox.image.Lightbox({href:objImg.href},objDojoxImg);
    // root level node can be referenced using domNode property (useful for attaching events)
    Some widgets also require the method startup() is called after or before creation/ adding children. Nothing is really concrete and every widget tends to take on a unique interface. Its really f*ucked up… I would advise avoiding this library at all cost. Especially considering the documentation is terrible. For someone who is not a prpgrammer or knows very little code this library would be a disaster to understand.
    Last edited by tZ; 08-25-2009, 02:39 AM.






    Latest Topics


    • Avant
      Good Printer for GD student?
      I know for certain this question has been asked a million times, but the threads I've seen are from years ago and a bit outdated so I'm going to ask anyways ...

      What are some of your suggestions...
      Today, 07:22 AM
    • Red Kittie Kat
      Reply to Salutations!
      Red Kittie Kat
      Welcome Aboard!

      We ask all new members to read very important links here and here. These explain the rules, how the forum runs and a few inside jokes. No, you haven't done anything wrong,...
      Today, 04:05 AM
    • hyena

      Finally found a forum to discuss graphic design, instead of philosophy. My name is Dario, I'm from the Netherlands I'm a student in my last year as Signmaker, and going to start working...
      Today, 03:26 AM
    • YanniPenguin
      Comment on Musician - not graphic artist
      Sorry about that! Please feel free to take down the post. I'll be more careful in the future.
      Today, 12:42 AM
    • KitchWitch
      Reply to Creating Text Effect in Illstrator
      Hi RS Design and welcome to GDF.

      We ask all new members to read very important links here and here. These explain the rules, how the forum runs and a few inside jokes. No, you haven't done...
      Yesterday, 11:53 PM

    home | site map | advertising/sponsorships | about us | careers | contact us | help courses | browse jobs | freelancers | events | forums | content | member benefits | reprints & permissions about | terms of use | privacy policy | Copyright 2013 Mediabistro Inc. Mediabistro Inc. call (212) 389-2000 or email us