sam foster | 1 Sep 2009 11:49
Picon

Re: Dojo downloads, why not split in dojo/dijit/dojox

A couple of points I'd like to ensure dont get lost in this thread:

* Utils - we shouldnt make people work too hard to get the build tools
and test tools. Creating a custom build is a key part of our
performance strategy yet even today lots of people dont have util in
their download, or overlook it. Unless you are really just using base
dojo.js, best practices dictate that you do a custom build so offering
packages e.g of core and dijit is potentially leading users astray.
Until we all get behind a web-based build tool, the only solution is
to download/checkout utils.

* Dojoc is the proper home today for personal dojo projects. Its under
utilized and misunderstood but that at least was the idea in setting
it up as a distinct repository. In another thread we talked about
combing through dojox and assigning doc bugs/omissions to the module
owner. That might be good time to also look critically at what's in
dojox and consider a move to dojoc. One test is to ask the question:
does anyone but the author care about, use and maintain the code, and
would another committer take it on if they abandoned it? That signals
a candidate for dojox IMO. Otherwise it should be slated for removal.

/Sam
Adam Peller | 1 Sep 2009 16:45
Picon

Re: Dojo downloads, why not split in dojo/dijit/dojox

On Tue, Sep 1, 2009 at 5:49 AM, sam foster <potatosculptor <at> gmail.com> wrote:

* Utils - we shouldnt make people work too hard to get the build tools
and test tools.

Utils currently has a lot more than just the build tool and doh.  It's another case where the casual user -- most users, in fact, get a lot more than they need and are quickly overwhelmed.  A web-based build tool and a stock set of layers go a long way towards making the utils more for the advanced user.  As for DOH, I'd love to see that and Shrinksafe packaged as separate projects, perhaps top-level projects, since they can be used outside Dojo.  I'd also like to reconsider our decision to package tests with the distributions.  It's good software engineering, and we should find ways to tout it, but most users don't want to see the test suites and will just be overwhelmed by the download size and additional files.

_______________________________________________
dojo-contributors mailing list
dojo-contributors <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
Micheil Smith | 2 Sep 2009 03:26
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox


Adam Peller wrote:
> Utils currently has a lot more than just the build tool and doh.  It's 
> another case where the casual user -- most users, in fact, get a lot 
> more than they need and are quickly overwhelmed.  A web-based build 
> tool and a stock set of layers go a long way towards making the utils 
> more for the advanced user.  As for DOH, I'd love to see that and 
> Shrinksafe packaged as separate projects, perhaps top-level projects, 
> since they can be used outside Dojo.  I'd also like to reconsider our 
> decision to package tests with the distributions.  It's good software 
> engineering, and we should find ways to tout it, but most users don't 
> want to see the test suites and will just be overwhelmed by the 
> download size and additional files.
I second that Adam. I've been using shrinksafe in several projects, but 
it does need a package of it's own. I only found out about shrinksafe 
after googling for "javascript minifiers", and even then, I only really 
used it after I'd checked out the dojo svn.
Micheil Smith | 1 Sep 2009 12:07
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox

I agree with the points you raise there Sam.

I think something that should be noted on the downloads page is under 
each download,
Dojo, Dijit, DojoX, is that we give a link to a "Development to 
Production" guide, so how
to get the most out of dojo. Or, below each download option, make 
reference that dojo
can be made much smaller by using the buildtools.

And I think your point about dojoC is also important, dojoC just isn't 
given enough
"air time", it's not made clear to other developers that this is where 
your in-development
stuff should probably go. If a project is abandoned, then we'll have to 
find someone to
maintain it. We can't just have something, and then not have it because 
the original
author just got bored of it or too busy to deal with it.

- Micheil.

sam foster wrote:
> A couple of points I'd like to ensure dont get lost in this thread:
>
> * Utils - we shouldnt make people work too hard to get the build tools
> and test tools. Creating a custom build is a key part of our
> performance strategy yet even today lots of people dont have util in
> their download, or overlook it. Unless you are really just using base
> dojo.js, best practices dictate that you do a custom build so offering
> packages e.g of core and dijit is potentially leading users astray.
> Until we all get behind a web-based build tool, the only solution is
> to download/checkout utils.
>
> * Dojoc is the proper home today for personal dojo projects. Its under
> utilized and misunderstood but that at least was the idea in setting
> it up as a distinct repository. In another thread we talked about
> combing through dojox and assigning doc bugs/omissions to the module
> owner. That might be good time to also look critically at what's in
> dojox and consider a move to dojoc. One test is to ask the question:
> does anyone but the author care about, use and maintain the code, and
> would another committer take it on if they abandoned it? That signals
> a candidate for dojox IMO. Otherwise it should be slated for removal.
>
> /Sam
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors <at> mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
>   
Adam Peller | 1 Sep 2009 16:42
Picon

Re: Dojo downloads, why not split in dojo/dijit/dojox

On Tue, Sep 1, 2009 at 6:07 AM, Micheil Smith <micheil <at> brandedcode.com> wrote:

I agree with the points you raise there Sam.

Me too, especially cleaning house in dojox.  I think the process of breaking out dojox into separate releases will help weed out inactive projects.
 
I think something that should be noted on the downloads page is under
each download,
Dojo, Dijit, DojoX, is that we give a link to a "Development to
Production" guide, so how
to get the most out of dojo. Or, below each download option, make
reference that dojo
can be made much smaller by using the buildtools.

Can't we just include a layer with each distribution?  Fine-tuning with the build tools is generally a good idea, but at least this would give a good default.  Users who get hundreds of individual xhrs by default get a very bad impression of Dojo.
 
And I think your point about dojoC is also important, dojoC just isn't
given enough
"air time", it's not made clear to other developers that this is where
your in-development
stuff should probably go. If a project is abandoned, then we'll have to
find someone to
maintain it. We can't just have something, and then not have it because
the original
author just got bored of it or too busy to deal with it.

If dojox subprojects are broken out with their own release cycle and the 'branding' of dojox as a unit disappears, perhaps it won't matter quite so much what else is in dojox.  Still a good idea to clean up abandoned code, of course.

-Adam

_______________________________________________
dojo-contributors mailing list
dojo-contributors <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
Micheil Smith | 2 Sep 2009 03:23
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox

Adam Peller wrote:
> Can't we just include a layer with each distribution?  Fine-tuning 
> with the build tools is generally a good idea, but at least this would 
> give a good default.  Users who get hundreds of individual xhrs by 
> default get a very bad impression of Dojo.
Something that could be done to about the amount of XHRs we make, is to 
inform
the user that no, we're not actually requiring heaps of downloads / 
bandwidth, but
actually to make sure that they know that dojo is broken up into many 
smaller files
for better code management whilst developing.

As for a build tool, it'd be a great idea to see someone write a 
modified version of
shrinksafe / buildutils that actually builds a copy of dojo.js and 
compiles together
the individual require()'d files, so that if you're using say.. 
dojox.grid, you'd have a
resulting file: dojox.grid.min.js and then just tell the require() 
method that this is
were all the code to dojox.grid.* is, so it only requires one file. This 
could be done
with the help of some sort of file index (read maybe manifest), which 
could be
placed into the top of dojo.js

- Micheil
David J Mark | 2 Sep 2009 04:10
Favicon

Re: Dojo downloads, why not split in dojo/dijit/dojox


Micheil Smith wrote:
> Adam Peller wrote:
>> Can't we just include a layer with each distribution?  Fine-tuning 
>> with the build tools is generally a good idea, but at least this would 
>> give a good default.  Users who get hundreds of individual xhrs by 
>> default get a very bad impression of Dojo.
> Something that could be done to about the amount of XHRs we make, is to 
> inform

We don't have to make XHR's at all.

> the user that no, we're not actually requiring heaps of downloads / 
> bandwidth, but
> actually to make sure that they know that dojo is broken up into many 
> smaller files
> for better code management whilst developing.

We are distributing something in hundreds of pieces and then asking the
user to wait while it assembles itself on each load.  And I don't see
this leading to better code management for the user (it is handy for us
behind the scenes, of course).  There are two ways to improve and they
are not mutually exclusive: an online builder that delivers a single
file or a much faster ad-hoc loading process (which has been developed).

> 
> As for a build tool, it'd be a great idea to see someone write a 
> modified version of
> shrinksafe / buildutils that actually builds a copy of dojo.js and 
> compiles together
> the individual require()'d files, so that if you're using say.. 
> dojox.grid, you'd have a
> resulting file: dojox.grid.min.js and then just tell the require() 
> method that this is
> were all the code to dojox.grid.* is, so it only requires one file. This 
> could be done
> with the help of some sort of file index (read maybe manifest), which 
> could be
> placed into the top of dojo.js

ISTM you are describing the current builder, but I could be missing
something.  And I don't see the need for extraneous meta data.  The
builder shouldn't need any (and doesn't AFAIK).
Michael Smith | 2 Sep 2009 04:27
Picon
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox

Comment below:

On Sep 1, 2009, at 7:10 PM, David J Mark <staff <at> cinsoft.net> wrote:

> Micheil Smith wrote:
>>
>> As for a build tool, it'd be a great idea to see someone write a
>> modified version of
>> shrinksafe / buildutils that actually builds a copy of dojo.js and
>> compiles together
>> the individual require()'d files, so that if you're using say..
>> dojox.grid, you'd have a
>> resulting file: dojox.grid.min.js and then just tell the require()
>> method that this is
>> were all the code to dojox.grid.* is, so it only requires one file.  
>> This
>> could be done
>> with the help of some sort of file index (read maybe manifest), which
>> could be
>> placed into the top of dojo.js
>
> ISTM you are describing the current builder, but I could be missing
> something.  And I don't see the need for extraneous meta data.  The
> builder shouldn't need any (and doesn't AFAIK).

I think David's right. The current build tool can accomplish what  
Micheil was asking for, but it doesn't need a metadata file.

If my app requires "dojox.grid.DataGrid", and I run a build that  
builds all the DataGrid dependencies into a layer, then my app can  
include that layer via a script tag and all subsequent dojo.require()  
calls for DataGrid files don't actually do anything, since the  
DataGrid (and all dependencies) is already loaded.

~Michael 
Micheil Smith | 2 Sep 2009 04:35
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox

Ah, Good to know Michael, thanks for clarifying that point.

(ps. Michael: I've gotta get use to typing our name your way, not mine :D )

Michael Smith wrote:
> Comment below:
>
> On Sep 1, 2009, at 7:10 PM, David J Mark <staff <at> cinsoft.net> wrote:
>
>   
>> Micheil Smith wrote:
>>     
>>> As for a build tool, it'd be a great idea to see someone write a
>>> modified version of
>>> shrinksafe / buildutils that actually builds a copy of dojo.js and
>>> compiles together
>>> the individual require()'d files, so that if you're using say..
>>> dojox.grid, you'd have a
>>> resulting file: dojox.grid.min.js and then just tell the require()
>>> method that this is
>>> were all the code to dojox.grid.* is, so it only requires one file.  
>>> This
>>> could be done
>>> with the help of some sort of file index (read maybe manifest), which
>>> could be
>>> placed into the top of dojo.js
>>>       
>> ISTM you are describing the current builder, but I could be missing
>> something.  And I don't see the need for extraneous meta data.  The
>> builder shouldn't need any (and doesn't AFAIK).
>>     
>
> I think David's right. The current build tool can accomplish what  
> Micheil was asking for, but it doesn't need a metadata file.
>
> If my app requires "dojox.grid.DataGrid", and I run a build that  
> builds all the DataGrid dependencies into a layer, then my app can  
> include that layer via a script tag and all subsequent dojo.require()  
> calls for DataGrid files don't actually do anything, since the  
> DataGrid (and all dependencies) is already loaded.
>
> ~Michael 
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors <at> mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
>   
sam foster | 2 Sep 2009 11:42
Picon

Re: Dojo downloads, why not split in dojo/dijit/dojox

Thought I was seeing double there. A Michael and Micheil Smith thread
is like watching tennis in a mirror. Or something.
Bryan Forbes | 2 Sep 2009 16:34
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox

It's no more like a tennis match in a mirror than a Mike Wilcox/Mike
Wilson thread ;).

On Wed, 2009-09-02 at 10:42 +0100, sam foster wrote:
> Thought I was seeing double there. A Michael and Micheil Smith thread
> is like watching tennis in a mirror. Or something.
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors <at> mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
> 
--

-- 
======================================================================
Bryan Forbes
bryan <at> reigndropsfall.net
http://www.reigndropsfall.net

"It does not take a majority to prevail, but rather an irate, tireless
minority keen to set brush fires in people's minds."
        - Samuel Adams, an architect of the Constitution

Key fingerprint = 3D7D B728 713A BB7B B8B1  5B61 3888 17E0 70CA 0F3D
_______________________________________________
dojo-contributors mailing list
dojo-contributors <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
Micheil Smith | 2 Sep 2009 16:36
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox

Ah, but wait, Michael and myself can also be known as Mike's now 
wouldn't _that_ get confusing? ;P

- Micheil

Bryan Forbes wrote:
> It's no more like a tennis match in a mirror than a Mike Wilcox/Mike
> Wilson thread ;).
>
> On Wed, 2009-09-02 at 10:42 +0100, sam foster wrote:
>   
>> Thought I was seeing double there. A Michael and Micheil Smith thread
>> is like watching tennis in a mirror. Or something.
>> _______________________________________________
>> dojo-contributors mailing list
>> dojo-contributors <at> mail.dojotoolkit.org
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
>>
>>     
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> dojo-contributors mailing list
>> dojo-contributors <at> mail.dojotoolkit.org
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
>>     
Mike Wilson | 3 Sep 2009 11:07
Picon
Favicon

Re: Dojo downloads, why not split in dojo/dijit/dojox

Yeah, it'd be a lot simpler spelling-wise if you could all
conform to the "Mike" spelling!

Or maybe we should all call ourselves Bruce? :-)
http://www.youtube.com/watch?v=_f_p0CgPeyA 
(deep inside we're all ozzies, right?)

Best regards
Mike/Michael(Bruce) Wilson

Micheil Smith wrote:
> Ah, but wait, Michael and myself can also be known as Mike's now 
> wouldn't _that_ get confusing? ;P
> 
> - Micheil
> 
> Bryan Forbes wrote:
> > It's no more like a tennis match in a mirror than a Mike Wilcox/Mike
> > Wilson thread ;).
> >
> > On Wed, 2009-09-02 at 10:42 +0100, sam foster wrote:
> >   
> >> Thought I was seeing double there. A Michael and Micheil 
> Smith thread
> >> is like watching tennis in a mirror. Or something.
> >> _______________________________________________
> >> dojo-contributors mailing list
> >> dojo-contributors <at> mail.dojotoolkit.org
> >> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
> >>
> >>     
> >> 
> --------------------------------------------------------------
> ----------
> >>
> >> _______________________________________________
> >> dojo-contributors mailing list
> >> dojo-contributors <at> mail.dojotoolkit.org
> >> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
> >>     
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors <at> mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
> 
Micheil Smith | 3 Sep 2009 13:27
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox

You know the slightly ironic thing about that, Mike? I am an aussie ;P

- Micheil (Miksago)

Mike Wilson wrote:
> Yeah, it'd be a lot simpler spelling-wise if you could all
> conform to the "Mike" spelling!
>
> Or maybe we should all call ourselves Bruce? :-)
> http://www.youtube.com/watch?v=_f_p0CgPeyA 
> (deep inside we're all ozzies, right?)
>
> Best regards
> Mike/Michael(Bruce) Wilson
>
> Micheil Smith wrote:
>   
>> Ah, but wait, Michael and myself can also be known as Mike's now 
>> wouldn't _that_ get confusing? ;P
>>
>> - Micheil
>>
>> Bryan Forbes wrote:
>>     
>>> It's no more like a tennis match in a mirror than a Mike Wilcox/Mike
>>> Wilson thread ;).
>>>
>>> On Wed, 2009-09-02 at 10:42 +0100, sam foster wrote:
>>>   
>>>       
>>>> Thought I was seeing double there. A Michael and Micheil 
>>>>         
>> Smith thread
>>     
>>>> is like watching tennis in a mirror. Or something.
>>>> _______________________________________________
>>>> dojo-contributors mailing list
>>>> dojo-contributors <at> mail.dojotoolkit.org
>>>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
>>>>
>>>>     
>>>>
>>>>         
>> --------------------------------------------------------------
>> ----------
>>     
>>>> _______________________________________________
>>>> dojo-contributors mailing list
>>>> dojo-contributors <at> mail.dojotoolkit.org
>>>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
>>>>     
>>>>         
>> _______________________________________________
>> dojo-contributors mailing list
>> dojo-contributors <at> mail.dojotoolkit.org
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
>>
>>     
>
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors <at> mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
>   
Mike Wilson | 3 Sep 2009 14:55
Picon
Favicon

Re: Dojo downloads, why not split in dojo/dijit/dojox

Technically I'm too :-)
(left Tassie at two years of age, though)

Micheil Smith wrote:
> You know the slightly ironic thing about that, Mike? I am an aussie ;P
> 
> - Micheil (Miksago)
> 
> Mike Wilson wrote:
> > Yeah, it'd be a lot simpler spelling-wise if you could all
> > conform to the "Mike" spelling!
> >
> > Or maybe we should all call ourselves Bruce? :-)
> > http://www.youtube.com/watch?v=_f_p0CgPeyA 
> > (deep inside we're all ozzies, right?)
> >
> > Best regards
> > Mike/Michael(Bruce) Wilson
> >
> > Micheil Smith wrote:
> >   
> >> Ah, but wait, Michael and myself can also be known as Mike's now 
> >> wouldn't _that_ get confusing? ;P
> >>
> >> - Micheil
> >>
> >> Bryan Forbes wrote:
> >>     
> >>> It's no more like a tennis match in a mirror than a Mike 
> Wilcox/Mike
> >>> Wilson thread ;).
> >>>
> >>> On Wed, 2009-09-02 at 10:42 +0100, sam foster wrote:
> >>>   
> >>>       
> >>>> Thought I was seeing double there. A Michael and Micheil 
> >>>>         
> >> Smith thread
> >>     
> >>>> is like watching tennis in a mirror. Or something.
> >>>> _______________________________________________
> >>>> dojo-contributors mailing list
> >>>> dojo-contributors <at> mail.dojotoolkit.org
> >>>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
> >>>>
> >>>>     
> >>>>
> >>>>         
> >> --------------------------------------------------------------
> >> ----------
> >>     
> >>>> _______________________________________________
> >>>> dojo-contributors mailing list
> >>>> dojo-contributors <at> mail.dojotoolkit.org
> >>>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
> >>>>     
> >>>>         
> >> _______________________________________________
> >> dojo-contributors mailing list
> >> dojo-contributors <at> mail.dojotoolkit.org
> >> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
> >>
> >>     
> >
> > _______________________________________________
> > dojo-contributors mailing list
> > dojo-contributors <at> mail.dojotoolkit.org
> > http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
> >   
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors <at> mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
> 
Micheil Smith | 2 Sep 2009 11:46
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox

Aye, Michael Smith and myself are different people. It does get slightly 
confusing :P

I've been thinking of actually using the alias I use as a signature to 
my emails, would that help?

- Micheil (miksago)

sam foster wrote:
> Thought I was seeing double there. A Michael and Micheil Smith thread
> is like watching tennis in a mirror. Or something.
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors <at> mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
>   
Nikolai Onken | 2 Sep 2009 12:18
Favicon
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox

Hi all,

It seems the thread is discussing more issues than initially intendet  
so I suggest to move discussions about online build tools into  
separate email threads.

I will show a working example of what I was envisioning initially  
(separate downloads) in the next few days and it would be great to get  
feedback on that.
I have it working locally already, just need to make it look nice :)

Nikolai

On Sep 2, 2009, at 11:46 AM, Micheil Smith wrote:

> Aye, Michael Smith and myself are different people. It does get  
> slightly
> confusing :P
>
> I've been thinking of actually using the alias I use as a signature to
> my emails, would that help?
>
> - Micheil (miksago)
>
> sam foster wrote:
>> Thought I was seeing double there. A Michael and Micheil Smith thread
>> is like watching tennis in a mirror. Or something.
>> _______________________________________________
>> dojo-contributors mailing list
>> dojo-contributors <at> mail.dojotoolkit.org
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
>>
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors <at> mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
Micheil Smith | 2 Sep 2009 04:20
Gravatar

Re: Dojo downloads, why not split in dojo/dijit/dojox


David J Mark wrote:
> Micheil Smith wrote:
>   
>> Adam Peller wrote:
>>     
>>> Can't we just include a layer with each distribution?  Fine-tuning 
>>> with the build tools is generally a good idea, but at least this would 
>>> give a good default.  Users who get hundreds of individual xhrs by 
>>> default get a very bad impression of Dojo.
>>>       
>> Something that could be done to about the amount of XHRs we make, is to 
>> inform
>>     
>
> We don't have to make XHR's at all.
>> the user that no, we're not actually requiring heaps of downloads / 
>> bandwidth, but
>> actually to make sure that they know that dojo is broken up into many 
>> smaller files
>> for better code management whilst developing.
>>     
>
> We are distributing something in hundreds of pieces and then asking the
> user to wait while it assembles itself on each load.  And I don't see
> this leading to better code management for the user (it is handy for us
> behind the scenes, of course).  There are two ways to improve and they
> are not mutually exclusive: an online builder that delivers a single
> file or a much faster ad-hoc loading process (which has been developed).
>
>   
Actually, we do, if we are to stick to using Dojo.require, the reason is 
because XHR
calls are generally synchronous, while, yes, we could use script tag 
insertion, which
partially works, you'd need to then store a queue of files to load, and 
even then, it'd
make the require method asynchronous. We want the calls to be blocking 
so that we
don't get code errors when loading in file dependencies.

While you could compile all the code into a single script file, it'd be 
a rather beefy file
to load initially, and then it'd probably be too weighty to have loading 
on every one of
your pages if different pages use different components.

>> As for a build tool, it'd be a great idea to see someone write a 
>> modified version of
>> shrinksafe / buildutils that actually builds a copy of dojo.js and 
>> compiles together
>> the individual require()'d files, so that if you're using say.. 
>> dojox.grid, you'd have a
>> resulting file: dojox.grid.min.js and then just tell the require() 
>> method that this is
>> were all the code to dojox.grid.* is, so it only requires one file. This 
>> could be done
>> with the help of some sort of file index (read maybe manifest), which 
>> could be
>> placed into the top of dojo.js
>>     
>
> ISTM you are describing the current builder, but I could be missing
> something.  And I don't see the need for extraneous meta data.  The
> builder shouldn't need any (and doesn't AFAIK).
I'm not that familiar with build-tools to be honest, so, if it already 
does that, then great! Let's promote it.

- Micheil
David J Mark | 2 Sep 2009 14:14
Favicon

Re: Dojo downloads, why not split in dojo/dijit/dojox


Micheil Smith wrote:
> 
> David J Mark wrote:
>> Micheil Smith wrote:
>>   
>>> Adam Peller wrote:
>>>     
>>>> Can't we just include a layer with each distribution?  Fine-tuning 
>>>> with the build tools is generally a good idea, but at least this would 
>>>> give a good default.  Users who get hundreds of individual xhrs by 
>>>> default get a very bad impression of Dojo.
>>>>       
>>> Something that could be done to about the amount of XHRs we make, is to 
>>> inform
>>>     
>> We don't have to make XHR's at all.
>>> the user that no, we're not actually requiring heaps of downloads / 
>>> bandwidth, but
>>> actually to make sure that they know that dojo is broken up into many 
>>> smaller files
>>> for better code management whilst developing.
>>>     
>> We are distributing something in hundreds of pieces and then asking the
>> user to wait while it assembles itself on each load.  And I don't see
>> this leading to better code management for the user (it is handy for us
>> behind the scenes, of course).  There are two ways to improve and they
>> are not mutually exclusive: an online builder that delivers a single
>> file or a much faster ad-hoc loading process (which has been developed).
>>
>>   
> Actually, we do, if we are to stick to using Dojo.require, the reason is 
> because XHR
> calls are generally synchronous, while, yes, we could use script tag 
> insertion, which
> partially works, you'd need to then store a queue of files to load, and 
> even then, it'd
> make the require method asynchronous. We want the calls to be blocking 
> so that we
> don't get code errors when loading in file dependencies.

That is incorrect.  See the branch I made over the summer.  XHR plays no
part in it, other than the i18n bundles (and that will change soon).
And it certainly doesn't error on loading file dependencies.  The bonus
is that it loads instantly, without blocking the browser.  The loading
time for the average demo went from seconds to virtually instantaneous.

> 
> 
> While you could compile all the code into a single script file, it'd be 
> a rather beefy file
> to load initially, and then it'd probably be too weighty to have loading 
> on every one of
> your pages if different pages use different components.

Yes, you could build different files for different documents.

Gmane