|
From: Jesse V. <je...@6t...> - 2003-06-10 15:52:22
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
I see your point. <br>
<br>
With the way the compressor is now, the user can choose which way they
want to do it. If they want it all in one file, they set up the xml
that way. If they want to have a merge-ie.js, etc, they can set it up
that way too.<br>
<br>
Jesse<br>
<br>
Raymond Irving wrote:<br>
<blockquote type="cite"
cite="mid...@we...">
<pre wrap="">One of the problem I've seen with solution you
mentioned earlier is that it will even include files
opera,ns4, etc if you're using IE.
I don't think two files should be a big problem. We're
coming down from aleast 5-10 individual files.
--
Raymond Irving
--- Jesse Vitrone <a class="moz-txt-link-rfc2396E" href="mailto:je...@6t..."><je...@6t...></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Interesting idea, but I'm trying to keep the
<script> tags in the
browser to a minumum. I finished off the code the
way I suggested this
morning and it seems to work well, so I'll probably
just stick with it
that way. This way also allows me to just include
"myfile.js" in my
page and get everything I need.
Jesse
Raymond Irving wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Well how about generating only browser specific
</pre>
</blockquote>
<pre wrap="">merge
</pre>
<blockquote type="cite">
<pre wrap="">modules?
dynapi.js
merge.ie.js
merge.dom.js
merge.opera.js
merge.ns4.js
in the browser we could then do the following:
<script src="../src/dynapi.js"></script>
<script>
if(dynapi.ua.ie) {
dynapi.setPath('../src/','merge.ie.js');
}else if(dynapi.ua.opera) {
dynapi.setPath('../src/','merge.opera.js');
}else if(dynapi.ua.ns4) {
dynapi.setPath('../src/','merge.ns4.js');
}else if(dynapi.ua.supported) {
dynapi.setPath('../src/','merge.dom.js');
}else{
alert('Browser not supported');
}
</script>
The dynapi.js file would be compressed and stored
</pre>
</blockquote>
<pre wrap="">as
</pre>
<blockquote type="cite">
<pre wrap="">dynapi.js. The other browser specific (and
non-specific) libraries could then be merged into a
single file. Only two files will be needed
</pre>
</blockquote>
<pre wrap="">(dynapi.js
</pre>
<blockquote type="cite">
<pre wrap="">and merge.{whatever}.js)
The setPath() function will support a second
</pre>
</blockquote>
<pre wrap="">argument
</pre>
<blockquote type="cite">
<pre wrap="">called pkgfile (Package file). This will be used to
allow users to load in an alternative package.js
</pre>
</blockquote>
<pre wrap="">file
</pre>
<blockquote type="cite">
<pre wrap="">--
Raymond Irving
--- Jesse Vitrone <a class="moz-txt-link-rfc2396E" href="mailto:je...@6t..."><je...@6t...></a>
</pre>
</blockquote>
<pre wrap="">wrote:
</pre>
<blockquote type="cite">
<pre wrap="">---------------------------------
Thanks for the suggestions Kevin and Raymond,
It looks like I can make my xml something like
this:
<input-group>
</pre>
</blockquote>
<pre wrap=""><input-filename="D:/development/6thgear/dynapi/src/api/mouse_ie.js"compare-value="dynapi.ua.ie"
</pre>
<blockquote type="cite">
<pre wrap="">/>
</pre>
</blockquote>
<pre wrap=""><input-filename="D:/development/6thgear/dynapi/src/api/mouse_dom.js"/>
</pre>
<blockquote type="cite">
<pre wrap=""> </input-group>
and have my code generate the js:
if (dynapi.ua.ie) {
// mouse_ie.js compressed code goes here
}
else {
// mouse_dom.js compressed code goes here
}
I'll take the first of the group, and make the if.
Everything up to the last will be an else if
And the last, makes the else.
All input-files inside an input-group need a
compare-value, except forthe last one.
This looks like it should work. When I hand code
</pre>
</blockquote>
<pre wrap="">my
</pre>
<blockquote type="cite">
<pre wrap="">compressed file tolook like the above, it works.
</pre>
</blockquote>
<pre wrap="">It's
</pre>
<blockquote type="cite">
<pre wrap="">more code then would normally beneeded, since both
files are going to get included, but I can't
</pre>
</blockquote>
<pre wrap="">thinkof
</pre>
<blockquote type="cite">
<pre wrap="">any other way around this problem. Plus, only the
</pre>
</blockquote>
<pre wrap="">one
</pre>
<blockquote type="cite">
<pre wrap="">needed willhave to get parsed, so it shouldn't be
</pre>
</blockquote>
<pre wrap="">too
</pre>
<blockquote type="cite">
<pre wrap="">bad.
What do you think? Do you see any problems that I
might run intotrying to do it this way/
Also, since I have to redo the way the xml is
</pre>
</blockquote>
<pre wrap="">parsed,
</pre>
<blockquote type="cite">
<pre wrap="">I'm going to usethe built in xml parsing that java
</pre>
</blockquote>
<pre wrap="">has
</pre>
<blockquote type="cite">
<pre wrap="">and lose that dom4j.jardependency. Not as pretty,
</pre>
</blockquote>
<pre wrap="">but
</pre>
<blockquote type="cite">
<pre wrap="">it gets the job done.
Thanks for the help.
Jesse
Kevin wrote:
Sorry, didn't send to the list!----- Original
</pre>
</blockquote>
<pre wrap="">Message
</pre>
<blockquote type="cite">
<pre wrap="">----- From: "Kevin" <a class="moz-txt-link-rfc2396E" href="mailto:ke...@ke..."><ke...@ke...></a>To:
"Jesse Vitrone" <a class="moz-txt-link-rfc2396E" href="mailto:je...@6t..."><je...@6t...></a>Sent:
Tuesday, June 10, 2003 4:22 AMSubject: Re:
[Dynapi-Dev] compressing files
I mean the packages.js file can help with the
dependency logic for your xml config file.Though I
don't know how to get around the (dom/opera/ns4/ie
layer)*(mouse) file split.The other inline
</pre>
</blockquote>
<pre wrap="">compressor
</pre>
<blockquote type="cite">
<pre wrap="">method would work here - though server load impact
andno cache of the transient stream :( what! I wish
</pre>
</blockquote>
<pre wrap="">I
</pre>
<blockquote type="cite">
<pre wrap="">could explain better ).As for this method once a
developer has a custom pre-processed and compressed
fileset published on the server there is no need
</pre>
</blockquote>
<pre wrap="">for
</pre>
<blockquote type="cite">
<pre wrap="">the library. Difficult to choose. ThoughI like one
bundle per (virtual) server with little
load.-Kevin----- Original Message ----- From: Jesse
VitroneTo: KevinCc: Dynapi-DevSent: Sunday, June
</pre>
</blockquote>
<pre wrap="">08,
</pre>
<blockquote type="cite">
<pre wrap="">2003 7:19 PMSubject: Re: [Dynapi-Dev] compressing
filesKevin, I'm not sure what you mean about
</pre>
</blockquote>
<pre wrap="">remove
</pre>
<blockquote type="cite">
<pre wrap="">the existing library system from the api. With the
</pre>
</blockquote>
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">
xml
config that I you can customize, you just pick and
choose what JS files you want it to compress
and
merge. So, I have the basic DynAPI ones, plus the
others that I use, plus my own. It lookssomething
like this:<jscompressor> <compressed-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/js/6thgear_compressed.js">
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/dynapi/src/dynapi.js"/>
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/dynapi/src/api/event.js"/>
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/dynapi/src/api/dyndocument.js"/>
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/dynapi/src/api/dynlayer_base.js"/>
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/dynapi/src/api/dynlayer_dom.js"/>
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/dynapi/src/api/mouse_dom.js"/>
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/dynapi/src/api/ext/dynlayer.inline.js"/>
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
name="D:/development/6thgear/js/6thgear.js"/>
</pre>
</blockquote>
<blockquote type="cite">
<pre wrap=""><input-file
name="D:/development/6thgear/js/gearWindow.js"/>
</pre>
</blockquote>
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap=""><input-file
name="D:/development/6thgear/js/templates.js"/>
</compressed-file> <compressed-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/js/6thgear_edit_compressed.js">
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/dynapi/src/api/ext/dragevent.js"/>
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
name="D:/development/6thgear/js/6thgear_edit.js"/>
</pre>
</blockquote>
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/js/gearWindow_edit.js"/>
</pre>
<blockquote type="cite">
<pre wrap=""> <input-file
</pre>
</blockquote>
<pre wrap="">name="D:/development/6thgear/js/templates_edit.js"/>
</pre>
</blockquote>
<pre wrap=""><!---->=== message truncated ===
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
<a class="moz-txt-link-freetext" href="http://calendar.yahoo.com">http://calendar.yahoo.com</a>
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at <a class="moz-txt-link-abbreviated" href="http://www.etnus.com">www.etnus.com</a>.
_______________________________________________
Dynapi-Dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dyn...@li...">Dyn...@li...</a>
<a class="moz-txt-link-freetext" href="http://www.mail-archive.com/dyn...@li.../">http://www.mail-archive.com/dyn...@li.../</a>
</pre>
</blockquote>
</body>
</html>
|