Thanks for the suggestions Kevin and Raymond, It looks like I can make my xml something like this: <input-group> <input-file name="D:/development/6thgear/dynapi/src/api/mouse_ie.js" compare-value="dynapi.ua.ie" /> <input-file name="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 for the last one. This looks like it should work. When I hand code my compressed file to look like the above, it works. It's more code then would normally be needed, since both files are going to get included, but I can't think of any other way around this problem. Plus, only the one needed will have to get parsed, so it shouldn't be too bad. What do you think? Do you see any problems that I might run into trying to do it this way/ Also, since I have to redo the way the xml is parsed, I'm going to use the built in xml parsing that java has and lose that dom4j.jar dependency. Not as pretty, but it gets the job done. Thanks for the help. Jesse Kevin 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]/Sorry, didn't send to the list! ----- Original Message ----- From: "Kevin" <[EMAIL PROTECTED]> To: "Jesse Vitrone" <[EMAIL PROTECTED]> Sent: Tuesday, June 10, 2003 4:22 AM Subject: Re: [Dynapi-Dev] compressing filesI 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 compressor method would work here - though server load impact and no cache of the transient stream :( what! I wish I could explain better ). As for this method once a developer has a custom pre-processed and compressed file set published on the server there is no need for the library. Difficult to choose. Though I like one bundle per (virtual) server with little load. - Kevin ----- Original Message ----- From: Jesse Vitrone To: Kevin Cc: Dynapi-Dev Sent: Sunday, June 08, 2003 7:19 PM Subject: Re: [Dynapi-Dev] compressing files Kevin, I'm not sure what you mean about remove the existing library system from the api. With thexmlconfig that I you can customize, you just pick and choose what JS files you want it to compressandmerge. So, I have the basic DynAPI ones, plus the others that I use, plus my own. It looks something like this: <jscompressor> <compressed-file name="D:/development/6thgear/js/6thgear_compressed.js"> <input-file name="D:/development/6thgear/dynapi/src/dynapi.js"/> <input-file name="D:/development/6thgear/dynapi/src/api/event.js"/> <input-file name="D:/development/6thgear/dynapi/src/api/dyndocument.js"/> <input-file name="D:/development/6thgear/dynapi/src/api/dynlayer_base.js"/> <input-file name="D:/development/6thgear/dynapi/src/api/dynlayer_dom.js"/> <input-file name="D:/development/6thgear/dynapi/src/api/mouse_dom.js"/> <input-file name="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-file name="D:/development/6thgear/js/6thgear_edit_compressed.js"> <input-file name="D:/development/6thgear/dynapi/src/api/ext/dragevent.js"/> <input-file name="D:/development/6thgear/js/6thgear_edit.js"/> <input-file name="D:/development/6thgear/js/gearWindow_edit.js"/> <input-file name="D:/development/6thgear/js/templates_edit.js"/> </compressed-file> </jscompressor> This generates 2 files, 6thgear_compress.js and 6thgear_edit_compressed. Then, my files only need to include these, and no other DynAPI files. Is this what you mean by removing the library system? Since I don't have to include thelibrary.jsor use it in my code? Jesse Kevin wrote: Hi Jesse, I think two compression methods can live well together. Yours will serve a static compressed bundle with little server load. It would be nice of this method could remove the existing library system from the api. Then the compressor would reuse the removed code logic (to work out dependencies) as a front end so the developer can decide what compressed bundle is needed to serve hosted application types. Is this is a standalone application requiring an interpreter not an applet. - Kevin. "Raymond Irving" <[EMAIL PROTECTED]> wrote: Hi Jesse, As Leif said, SourceForge only allow developers to uses SSH inorder to write to CVS. How large is the Java version of the compressor? Some time ago I made mention of having two versions of the dynapi for download. A developer version and a production version. IMO the developer version would include all the external (non-API related) utilities, etc, while the production version would only include the src, docs and examples. Should we make the external tools/utilities, etc be part of the developer's download or should they be separate (something like a Dynapi Developement Kit - DDK)? PS. All dynapi external utilities, etc should be placed in the bin/ folder. In some cases it might be good to arrange them in folders -- Raymond Irving --- Jesse Vitrone <[EMAIL PROTECTED]> wrote: --------------------------------- Raymond, Leif, Greg, glad to see you both like the idea. I'll sign up withsourceforge and use the patch system. I grabbed the code from CVS when I first started making thechanges, but I tried to do an update today, and there were lots onconflitcts that CVS didn't seem to merge very well. So I grabbed aclean copy of the code again, and I'll go through and make the changesagain. Didn't take too long the first time. I have WinCVS, but I've been using Tortoise CVS. What do I needPutty for? I found a bug today in my Java compression tool, and I'd like toget that fixed before I sent it out. I also wanted to add a feature inthe XML where you can specify a comment that will be put at the top ofthe merged file, since it rips out all comments, and a lot of peoplewant something in the file for licensing and stuff like that. Once Iget that stuff in, I'll let you know and send you a copy. Jesse Raymond Irving wrote: Very cool indeed Jesse, very cool. Well done.IMO the merge feature is a major plus for the DynAPIlibraries.There're two ways to check in your updates. You could:1) Use the Patch system available on the DynAPISourceForge web site2) Setup WinCVS and Putty on you computer can check inyou changes via CVS.Are your changes based on the lasted version in CVS?--Raymond Irving--- Jesse Vitrone <[EMAIL PROTECTED]> wrote: Ooops, sorry, hit send too soon :( Here's the wholeemailHello all, I've never contributed to an open source projectbefore, so I'm not sure of the proper ettiquite. Please correct me ifI do something stupid :) I've been email with Raymond Irving about someidea's that I had, and he encouraged me to post it here and see whatpeople think. I wrote a Java version of the _javascript_compressor that comes with DynAPI. Along with everything that the DynAPI onedoes, it reads in a config file that says "compress these files, thenmerge them into this one file". This enables me to keep a good amount ofJS files when I'm coding, but then when I "build" to apache, Icompress them all into 1 file, so the browser doesn't have to hit the servermultiple times to get the files. Then, I took it a step farther, and added what Ihad to in order to be able to compress the DynAPI files I was using,and it worked! I was able to get all my files, plus the DynAPI files Iwas using and compress / merge them all into 1 file. It sped things up onmy server dramatically. The changes were all just adding semi-colonswhere they were needed, except for one case: The mouse_ie.js, dyndocument.js andmouse_dom.js files all have a method called "main" and that doesn't seem to workvery well when they're all combined into the same file. To fix it,I renamed them, which names like main_mouse_ie, etc, and fixed allthe other references to them. Seems to work fine, but I haven't testedextensively all the examples and such.I'd like to check in my changes, as well as send inmy Java compressor, since Raymond said he'd like to post it on the site. I'd also like to make a Swing front end for the java app to make it alittle easier to use.What do you guys and gals think of this idea? Should I check in the changes? What's the right process for checking inchanges? Jesse ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers ofTotalView, The bestthread debugger on the planet. Designed with threaddebugging featuresyou've never dreamed of, try TotalView 6 free atwww.etnus.com._______________________________________________Dynapi-Dev mailing [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/__________________________________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 bestthread debugger on the planet. Designed with thread debugging featuresyou've never dreamed of, try TotalView 6 free at www.etnus.com._______________________________________________Dynapi-Dev mailing [EMAIL PROTECTED]://www.mail-archive.com/[EMAIL PROTECTED]/ __________________________________ 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]/ ------------------------------------------------------- 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]/------------------------------------------------------- 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 Leif W
- Re: [Dynapi-Dev] compressing files Raymond Irving
- Re: [Dynapi-Dev] compressing files Kevin
- 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