|
From: Brandon M. <bnd...@ho...> - 2000-12-05 23:22:56
|
You're right up my ally there. That's some of the same reasoning that I came
up with, with others too.
But the code is reduced by about 1/3. Special browser specific javascript
can be placed where other generic javascript was used, also reducing the
size, and increasing speed.
----- Original Message -----
From: "Bill Wheaton" <bil...@us...>
To: <dyn...@li...>
Sent: Tuesday, December 05, 2000 5:50 PM
Subject: Re: [Re: [Dynapi-Dev] DynAPI Makefile/code compression almost
complete]
> 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
>
> Dan Steinman <dy...@fu...> wrote:
> > I just have to clean it up a bit and I'll have it ready to use this
evening.
> It's really quite a simple system. I'm not sure exactly what you want by
> splitting the versions up. I mean, there's ways to do that, but why
bother?
> Right now it's just an easy way to compress and combine files, it does
nothing
> more. And we'll use it until we decide that a more sophisticated system
is
> needed.
> >
> > Dan
> >
> > On Tue, Dec 05, 2000 at 10:31:34AM -0000, Cameron Hart wrote:
> > > This is probably a good way of splitting the code into different
browser
> > > versions. If you put equivant of #IFDEF (or whatever, it's been a long
> time
> > > since I touched C!) in the source Javascript, you could compile
browser
> > > specific versions from the one source distribution. At least then, all
> the
> > > code is in one place, and browser specific versions are developed
> together,
> > > not seperately.
> > >
> > > Cameron.
> > >
> > > > -----Original Message-----
> > > > From: dyn...@li...
> > > > [mailto:dyn...@li...]On Behalf Of Dan
> Steinman
> > > > Sent: 04 December 2000 03:52
> > > > To: dyn...@li...
> > > > Subject: [Dynapi-Dev] DynAPI Makefile/code compression almost
complete
> > > >
> > > >
> > > > This weekend I took on the task of creating a "build" system for
> DynAPI.
> > > >
> > > > First part involved writing my own JavaScript whitespace/comment
> > > > removal script (in Perl). It's pretty much complete and as good
> > > > or better than any others I've seen. I'm calling it JSPack and
> > > > will release this as a separate program that must be downloaded
> > > > in order to "build" the DynAPI.
> > > >
> > > > It not only compresses JS code, it also packages the files
> > > > together. And this will be used to create js packages for the
> > > > DynAPI. For example, it will create the files dynapi.api.js,
> > > > dynapi.gui.js... which contain all the classes in that
> > > > subdirectory. I have to add one more feature to my script that
> > > > determines the order that the objects should be added to the
> > > > Package. For example, ScrollPane extends off of ViewPort, so in
> > > > the dynapi.gui.js file, viewport.js must be added first.
> > > > Therefore I plan to add files to the /lib/dynapi/ directories
> > > > that state the order of the files. These will be named .jspack
> > > > and will be a simple list of the js files in the order they are
> > > > to be added to a package. My JSPack program will take care of the
> rest.
> > > >
> > > > Right now JSPack does not parse the JavaScript, so it will not go
> > > > through each of your lines and fix and incorrect or missing
> > > > semicolon. There for it is essential that all files in the
> > > > DynAPI have semi's on each line, as well in the following case:
> > > >
> > > > f = function() {
> > > > }; // absolutely needed
> > > >
> > > > Second part is the Makefile. Up until now we've just been
> > > > editing our files in /js/. But now we can use a separate
> > > > directory /src/. This is where we edit our files. Our
> > > > JavaScripts can contain comments, and do not have to be bunched
> > > > up, because the Makefile will use the /src/ directory, compress
> > > > all the code, and produce js packages, and jar files, and output
> > > > it to /js/.
> > > >
> > > > So the /js/ directory will then contain a compressed release of our
> code.
> > > >
> > > > In order to build the DynAPi you need to be using unix/linux or
> > > > have Cygwin installed in Windows, along with Perl and the JDK
> > > > (for Jarring the files). You need to place JSPack in your path,
> > > > and then type:
> > > >
> > > > make
> > > >
> > > > in the /dynapi/ source tree. This runs the commands in the
> > > > Makefile which does everything needed to produce the /js/ tree.
> > > >
> > > > I'm going through all of the existing JS code and putting the
> > > > necessary semi colons, and will have everything ready to use in
> > > > another day or 2. A first run-through of building the DynAPI
> > > > produced a Jar file which 16KB!!!! (yes the entire DynAPI with
> > > > the existing widgets can be compressed a lot).
> > > >
> > > > We can also use GZip to compress the files for use in IE 5, these
> > > > will be a bit smaller than the Jar files. I don't believe there
> > > > is any compression we can do for IE 4 though (other than
> > > > whitespace removal).
> > > >
> > > > over and out,
> > > > Dan
> > > >
> > > > _______________________________________________
> > > > 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
> > _______________________________________________
> > Dynapi-Dev mailing list
> > Dyn...@li...
> > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
>
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
> _______________________________________________
> Dynapi-Dev mailing list
> Dyn...@li...
> http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
>
|