I see your point. 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. Jesse Raymond Irving wrote: ------------------------------------------------------- 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 www.etnus.com. _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/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 <[EMAIL PROTECTED]> wrote: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:Well how about generating only browser specificmergemodules? 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=""></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 storedasdynapi.js. The other browser specific (and non-specific) libraries could then be merged into a single file. Only two files will be needed(dynapi.jsand merge.{whatever}.js) The setPath() function will support a secondargumentcalled pkgfile (Package file). This will be used to allow users to load in an alternative package.jsfile-- Raymond Irving --- Jesse Vitrone <[EMAIL PROTECTED]>wrote:--------------------------------- Thanks for the suggestions Kevin and Raymond, It looks like I can make my xml something like this: <input-group><input-filename="D:/development/6thgear/dynapi/src/api/mouse_ie.js"compare-value="dynapi.ua.ie"/><input-filename="D:/development/6thgear/dynapi/src/api/mouse_dom.js"/></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 codemycompressed file tolook like the above, it works.It'smore code then would normally beneeded, since both files are going to get included, but I can'tthinkofany other way around this problem. Plus, only theoneneeded willhave to get parsed, so it shouldn't betoobad. 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 isparsed,I'm going to usethe built in xml parsing that javahasand lose that dom4j.jardependency. Not as pretty,butit gets the job done. Thanks for the help. Jesse Kevin wrote: Sorry, didn't send to the list!----- OriginalMessage----- From: "Kevin" <[EMAIL PROTECTED]>To: "Jesse Vitrone" <[EMAIL PROTECTED]>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 inlinecompressormethod would work here - though server load impact andno cache of the transient stream :( what! I wishIcould explain better ).As for this method once a developer has a custom pre-processed and compressed fileset published on the server there is no needforthe library. Difficult to choose. ThoughI like one bundle per (virtual) server with little load.-Kevin----- Original Message ----- From: Jesse VitroneTo: KevinCc: Dynapi-DevSent: Sunday, June08,2003 7:19 PMSubject: Re: [Dynapi-Dev] compressing filesKevin, I'm not sure what you mean aboutremovethe existing library system from the api. With thexml 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-filename="D:/development/6thgear/js/6thgear_compressed.js"><input-filename="D:/development/6thgear/dynapi/src/dynapi.js"/><input-filename="D:/development/6thgear/dynapi/src/api/event.js"/><input-filename="D:/development/6thgear/dynapi/src/api/dyndocument.js"/><input-filename="D:/development/6thgear/dynapi/src/api/dynlayer_base.js"/><input-filename="D:/development/6thgear/dynapi/src/api/dynlayer_dom.js"/><input-filename="D:/development/6thgear/dynapi/src/api/mouse_dom.js"/><input-filename="D:/development/6thgear/dynapi/src/api/ext/dynlayer.inline.js"/><input-file name="D:/development/6thgear/js/6thgear.js"/><input-file name="D:/development/6thgear/js/gearWindow.js"/><input-file name="D:/development/6thgear/js/templates.js"/> </compressed-file> <compressed-filename="D:/development/6thgear/js/6thgear_edit_compressed.js"><input-filename="D:/development/6thgear/dynapi/src/api/ext/dragevent.js"/><input-file name="D:/development/6thgear/js/6thgear_edit.js"/><input-filename="D:/development/6thgear/js/gearWindow_edit.js"/><input-filename="D:/development/6thgear/js/templates_edit.js"/>=== message truncated === __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com ------------------------------------------------------- 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 www.etnus.com. _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/ |
- Re: [Dynapi-Dev] compressing files Jesse Vitrone
- Re: [Dynapi-Dev] compressing files Jesse Vitrone
- Re: [Dynapi-Dev] compressing files Raymond Irving
- Re: [Dynapi-Dev] compressing file... Jesse Vitrone
- Re: [Dynapi-Dev] compressing file... Raymond Irving
- Fw: [Dynapi-Dev] compressing files Kevin
- Re: Fw: [Dynapi-Dev] compressing files Jesse Vitrone
- Re: Fw: [Dynapi-Dev] compressing files Raymond Irving
- Re: Fw: [Dynapi-Dev] compressing files Jesse Vitrone
- Re: Fw: [Dynapi-Dev] compressing files Raymond Irving
- Re: Fw: [Dynapi-Dev] compressing file... Jesse Vitrone
- Re: Fw: [Dynapi-Dev] compressing ... Raymond Irving
- Re: Fw: [Dynapi-Dev] compressing ... Jesse Vitrone
- Re: Fw: [Dynapi-Dev] compressing files Raymond Irving