Announcement Announcement Module
Collapse
No announcement yet.
Cleaning up dojo code Page Title Module
Move Remove Collapse
Search Search Module
Collapse

Advertisement Advertisement Module
Collapse

Latest Topics Latest Topics Module
Collapse

  • NostalgiaSeeker
    Reply to Why do people devalue graphic designers?
    NostalgiaSeeker
    Yeah I understand what you guys are saying. :3 I know I'm more than just someone who thinks they can call themselves a designer just because they make pretty work. I actually get minor headaches when...
    Today, 07:23 PM
  • NostalgiaSeeker
    Reply to Critique for my business card
    NostalgiaSeeker
    Thanks for the advice. What if I take the logo on the back, center the words and add white space to both sides? Like add white space on the top right corner since I'm printing them in matte so they...
    Today, 07:17 PM
  • B
    Reply to Critique for my business card
    B
    It's a nice logo, but placing it on the same card three separate times seems like two too many times.
    Today, 07:09 PM
  • tifdesignart
    Macbook Air 11" or Macbook Air 13"?
    tifdesignart
    Hi guys!

    I have an iMac at home as my primary computer but I'm going to take a few design courses in the next few months. So the courses I'll be taking are going to be design related: web...
    Today, 04:39 PM
  • B
    Reply to How do you collect design inspiration?
    B
    I gave up on that years ago. Every now and again I'll come across something that's so interesting that I want to keep it -- not really for inspiration, but mostly just because I like it.

    ...
    Today, 04:12 PM

Powered by mediabistro.com
Mediabistro Creative Sites Mediabistro Creative Sites Module
Collapse
X
Conversation Detail Module
Collapse
  • 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.

    thanks

  • #2
    For reference:

    Code:
    // 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)
    objDojoxImg.domNode;
    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, 06:39 AM.

    Comment

    Mediabistro A division of Prometheus Global Media home | site map | advertising/sponsorships | careers | contact us | help courses | browse jobs | freelancers | content | member benefits | reprints & permissions terms of use | privacy policy Copyright © 2015 Mediabistro Inc.
    Working...
    X