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

Advertisement Advertisement Module

Latest Topics Latest Topics Module

  • gregbern
    Reducing ink of a PDF by 50% or more
    Hi there, I am being given ridiculous expectations for preflighting a job before plating with minimal troubleshooting time. The only way I could manage this in the past was by using a reduced ink profile...
    Today, 04:43 AM
  • uine
    Education Forum Flyer
    Hi everyone,

    I am recently making a flyer for an education forum. It took me a long while to find a way to organize this information, and I just finished my draft (colors are not final, some...
    Today, 04:35 AM
  • Ray12
    Comment on Advice for being ripped apart in front of your classmates?
    Omg that's awful! I don't think I could handle a class like that. Hats off to you for surviving!
    Today, 03:40 AM
  • Ray12
    Comment on Advice for being ripped apart in front of your classmates?
    I don’t think anyone could have worded that any better… especially that last paragraph. It’s something I need to keep reminding myself. I’m going to come back and re-read it when I feel stuck.
    Today, 03:38 AM
  • Ray12
    Comment on How do you design a typeface?
    Thank you for sharing your work, B! Your example has been very helpful! I didn’t realize creating a typeface was such a labour-intensive job. I’m never going to overlook the handwork that...
    Today, 03:33 AM

Conversation Detail Module
  • 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, 06:39 AM.


    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.