From: Pascal B. <pa...@dy...> - 2000-12-06 21:28:23
|
according to my websites traffice.. the study is incorrect :) Anyway, when you split things up you still have way to much to load within 7seconds, but compressions should give you that extra, and splitting things up should not be done to gain size only speed.. which can actually be done in an easier way in most cases. the is variable is declared before anything loads, so you can use that in the code at a few places that are "speed-critical". I changed my moveTo method to this: if (is.ns) { DynLayer.prototype._setX=function(x){ this.css.left=this.x=x } DynLayer.prototype._setY=function(y){ this.css.top=this.y=y } } else { DynLayer.prototype._setX=function(x){ this.css.pixelLeft=this.x=x } DynLayer.prototype._setY=function(y){ this.css.pixelTop=this.y=y } } DynLayer.prototype.moveTo=function(x,y) { if (x!=null) this._setX(x) if (y!=null) this._setY(y) this.invokeEvent('move') } which makes the correct method for the correct browser before running things, so it's only called once without creating complete seperate files.. just moving the if statement out of the loop. Pascal Bestebroer pa...@dy... http://www.dynamic-core.net > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens Doug Melvin > Verzonden: woensdag 6 december 2000 22:33 > Aan: dyn...@li... > Onderwerp: Re: [Dynapi-Dev] DynAPI build, Splitting files > > > I don't know what you consider crucial.. but, a recent study suggests that > if your page takes more than 7 seconds to load (that's right, 7 seconds) > then more than half of your viewer will get board and leave > before they get > to see all of the 'cool' and 'clever' stuff you have put on or > done to your > site > > Doug Melvin > > > The only files in the DynAPI that are browser related are DynLayer, > DynDocument, and Loadpanel. So if everyone feels we should have > nn4,ie, and > dom.js separations we can certainly do this. For the rest of the > files it's > completely unnecessary. For the time being I'd not worry about > it too much. > Everythings working fine, I'd prefer on concentrating on building more > widgets. After we have a larger codebase we can better decide > what changes > are really necessary (at this point I don't think such a change is crutial > for continued developement). > > > > Dan > > > > On Wed, Dec 06, 2000 at 07:58:53AM -0600, Dougal Campbell wrote: > > > On 5 Dec 2000, Bill Wheaton wrote: > > > > > > > What I meant (can't say about Cameron), was that it would be nice to > have all > > > > of the functionality of the API without even worrying if it is cross > browser > > > > compatible. > > > > Quite often, I have to write intranet apps where my customer can and > > > > absolutely does control which ua their users use. (via SMS or > whatever). It > > > > doesn't matter as much over a lan, but for their remote sales people > dialing > > > > up from his customer's pots line to check product allocation during > the lunch > > > > break, it can be slow. If I could _only_ include IE code > when I knew > it was > > > > the standard, then I could speed things up some.... maybe > even a lot. > > > > maybe I'm dreaming > > > > -bw > > > > > > Those of you interested in browser-targeted code might want to take a > > > look at <URL:http://www.dx0.org/>. This is a cross-browser > library with > > > a difference: it uses server-side technology to detect which > browser is > > > making the connection, then it delivers JavaScript targeted to that > > > particular browser. > > > > > > In other words, if you view the site with Netscape 4.x, you > only receive > > > JavaScript for NS4 (there's no "if is.ie" conditionals). If you browse > > > in with IE5, you get Javascript specifically for IE5 (no "if > > > is.ns4"). Or Mozilla, or NS6, or whatever (they might be supporting > > > Opera, if the new release has decent DOM). > > > > > > The project is still in heavy development, but there are already a few > > > skinnable widgets built and working (a menu, a floating toolbar, and a > > > viewBox (a scrollbar/window). > > > > > > You build your DHTML code in PHP, Perl, or Python. The server then > > > delivers appropriate JS to the browser. > > > > > > Also check out <URL:http://deathstar.eng.utah.edu/~kroford/930/dx0/> > > > > > > Keep in mind that the library and the site are still under > development, > > > and there are sections of the web site that aren't complete yet. But > > > from what I've seen on the mailing list, it looks like a few > people are > > > using it in production already. > > > > > > -- > > > Ernest MacDougal Campbell III, MCP <do...@gu...> > > > http://www.gunters.org/~dougal/ > > > Lumber Cartel Unit #1654 (tinlc): http://come.to/the.lumber.cartel/ > > > "The medium is not the message. The *message* is the message." > > > > > > _______________________________________________ > > > Dynapi-Dev mailing list > > > Dyn...@li... > > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > |