Frameworks like DOJO has built-in support for packaging and
namespacing your js files so that you can manage your dependencies
(see http://dojotoolkit.org/reference-guide/dojo/require.html#dojo-require
on how to specify that one modules requires another) more easily. I
haven't used it myself but have heard good things about it from
friends who have, might be worth taking a look at if it's feasible for
you to adopt a framework like that.

- Yan

On Jan 28, 7:22 pm, Brian Wigginton <[email protected]> wrote:
> > Here is how i like to do it.
>
> > js
> >   thirdparty
> >     jquery
> >     jquery-ui
> >   app
> >     view
> >       view1.js
> >       view2.js
> >     presenter
> >       presenter1.js
> >       presenter2.js
> >     model
> >       model1.js
> >       model2.js
> >     templates
> >       template1.html
> >       template2.html
> >     utils
> >       utils.js
>
> > css
> >   thirdparty
> >      jqueryui.css
> >   myapp.css
> >   mymodule.css
>
> > I have a build process that packages the code for production.
>
> So if you have multiple pages and they all use different modules, sometimes a 
> module can be used on multiple pages, is every page downloading the same 
> packaged.js file, or do you have a different packed js file for every page on 
> your site? What about those modules that are used on multiple pages, having a 
> packaged JS file for every page would cause a server request for that new js 
> file instead of using a cached file for that one module. I"m new to 
> dependancy management and js packaging so any other info would be really 
> helpful.
>
> -Brian Wigginton

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to