1

I am brand new to the Dojo Build utility, have Googled my fingers numb, and am still really confused on how to have a productive and efficient development environment and still take advantage of the benefits of custom builds.

I use MyEclipse for development, SVN for source control, and WildFly for deployment. I love the rapid prototyping this setup allows.

Assertions:

  • I want to use Dojo build to make my deployed applications faster.
  • I don’t want to rebuild all of Dojo between each minor bug fix while developing.
  • I don’t want to have to manually change the dojo path in my HTML files just before deployment.
  • I don’t want to have the Dojo infrastructure (Dojo, Dijit, Dojox, util) in every project and stored in SVN multiple times.

I cannot seem to get my head around how to have a productive development environment and a smooth transition from development to deployment without breaking one of the above assertions.

Your suggestions and examples are very welcome. :-)

Thank you, Gordon

El Gordito
  • 11
  • 1

2 Answers2

0

all you do is structure a profile.js file for your application and then run the build.sh to build it... you get a minified image in the end, and put it in your page... you can define as many separate packages as you want. and all this can be integrated with your loadbuild process.

i'd suggest going through the steps in a couple of references, it'll take a short while; i don't have a short answer to your question.

references for you:

  • creating builds - dojo
  • scaffolding a dojo application - this is a pre-amd blog post, but step-6 onwards is relevant for you.
  • stafamus
    • 509
    • 2
    • 9
    0

    I use eclipse for a few JEE web projects lately. What I do is:

    When I'm developing, I have my webserver(tomcat) serve files from my WebContent folder. All my non-built files go in here, including images and all web stuff. This lets me make a change and immediately run it in a browser without having to build anything.

    I made a build script which will copy all the files I want from WebContent to WebContentBuilt. It also runs the dojo build, again putting the built files into WebContentBuilt. I copy almost everything over. Then, I change the deployment assembly in eclipse(right click the project > properties > deployment assembly). I remove the entry that deploys WebContent to / and add an entry for WebContentBuilt. Now, tomcat will serve the files from that directory. Also, if you export a war file right now, it will export the built files. When you're done and want to go back to your development setup, just reverse what you did to your deployment assembly.

    Basically, I have two document roots, one for unbuilt, and one for built, and I just point the webserver at whichever one I want.

    I never put the built stuff in source control. In fact, I ignore the entire WebContentBuilt.

    I have no idea how to pull this off without keeping a copy of dojo in each project though. I've successfully shared java files across multiple projects by putting the common project on the eclipse build path, and having the common projects export certain things, but I've never tried this with client side files that go in the WebContent folder.

    note- after you change the deployment assembly, tomcat has to "republish". This takes a really long time because dojo has so many friggin files. So, in summary, this works decent except that I have to manually change some ide settings to get into my pseudo production mode so I can do a build, and this takes a long time. But, I do a build very infrequently, so its not so bad.

    goat
    • 31,486
    • 7
    • 73
    • 96
    • a possible way to handle sharing the dojo libs between projects: http://stackoverflow.com/questions/348469/how-to-share-web-content-between-eclipse-projects – goat Feb 05 '14 at 04:53