Closed (outdated)
Project:
JQuery Interface
Version:
5.x-0.8
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
28 Apr 2007 at 02:11 UTC
Updated:
15 Oct 2021 at 21:30 UTC
Jump to comment: Most recent
Comments
Comment #1
jjeff commentedThat is a grand vision! And if you've got energy to code it, by all means do!
I see a few problems with your plan. Hopefully these tips will save you some time:
1) You will not be able to save the MD5-named files to the module directory. PHP will not have permissions to this directory. However, you can save (a subdirectory of) the files directory. Take a look at the way that this is handled by the CSS aggregator in Drupal 5 for an example: http://api.drupal.org/api/5/function/drupal_build_css_cache
2) You'll probably want to use hook_footer() rather than hook_exit(), this way you can still write to the page afterwards. hook_exit() fires after the page has already been rendered and displayed.
3) Keep in mind that there will/could be a JS aggregator in Drupal 6. There might be some code floating around that you could snag to use. I don't know that it's Edwards-enabled though. :-)
4) You'll find further frustration because the PHP port of Dean Edwards' Packer is LGPL and not GPL (close but no cigar), and we won't be able to include it in the module download. We'll need to do some checking to see if the library is in place and if it's not, display an error and link off to the download. See how I did this for the sIFR and TinyMCE modules.
5) Some other random thoughts: John Resig tells me that there's a smaller/faster/more-efficient version of Interface coming out soon. Let's say that the new file is 50K. This is a one-time download -- the browser will cache this file reuse it for subsequent page loads. If there are several modules all using different parts of Interface in different ways on different pages, you could actually end up serving many different medium-sized packages of the components over many pages, rather than just the one (not that) large one once. That said, this is the way that the D-5 CSS aggregator works, so you could certainly argue that there's a precedence.
I certainly don't mean to discourage you, but I just wanted to make sure that you know what you're getting into.
Some more discussion: http://groups.drupal.org/node/3576
Comment #2
ipwa commented