Announcement

Collapse
No announcement yet.

Cleaning up dojo code

Collapse
X
  • 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, 01:39 AM.

    Comment

    Search

    Collapse

    Sponsor

    Collapse

    Incredible Stock

    Latest Topics

    Collapse

    • eyoungren
      Reply to Logo help - placement etc.
      eyoungren
      Here's how I'd put it: From the Box office on the left, Deal Hunter in the middle (Deal on top of Hunter) and the target on the right.

      PS. I was always taught that it's a bad idea to give...
      Yesterday, 06:17 PM
    • PrintDriver
      Reply to Differet color in Photoshop and in preview Win10
      PrintDriver
      We can only just guess at what your output parameters are. You need to discuss this with the printer who will be doing the work.
      You need to know what profile your printer wants on hand-off. Not...
      Yesterday, 02:25 PM
    • ThomasC
      Reply to Large Format 3D
      ThomasC
      Thank you PrintDriver. I haven't looked into lenticular lenses but that is very interesting. I will have to do some research on the subject in general.

      So the "off the shelf" items...
      Yesterday, 09:33 AM
    • KitchWitch
      Reply to Differet color in Photoshop and in preview Win10
      KitchWitch
      There are folks on this forum who are better qualified to answer this, but I know that what you see on your screen is never guaranteed to be what you'll see in print. The best way to see what something...
      Yesterday, 09:05 AM
    • Ondra
      Reply to Differet color in Photoshop and in preview Win10
      Ondra
      It is for print....
      Yesterday, 08:41 AM
    GDF A division of Mediabistro Holdings Adweek | Mediabistro | Clio | Film Expo Group Contact Us | Terms of Use | Privacy Policy Copyright 2016 Mediabistro Holdings
    Working...
    X