Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split mootools-depender into several packages #7

Open
kmike opened this issue Oct 12, 2010 · 0 comments
Open

Split mootools-depender into several packages #7

kmike opened this issue Oct 12, 2010 · 0 comments

Comments

@kmike
Copy link

kmike commented Oct 12, 2010

At the moment mootools-depender implements several separate functions:

  1. Combine js files into one according to dependency information;
  2. infrastructure to serve the result file;
  3. public interface to generate mootools builds

I think these functions are totally separate and it will be better if mootools-depender will be split into several packages.

Combining files into 1 don't have to be related to django at all. It also don't have to be tied to exact serving infrastructure and the public interface. I think it is a wrong direction to move all the functionality into django management commands and it will be better to create a separate python package from 'core.py' and upload it to pypi. This way it can be used with other python frameworks, for automated build systems, programmatically with other js-combining packages like django-compress and django-compressor, etc.

As for file serving: serving files via django itself it is a very niche implementation. Nginx is much better at serving files and there are mature django apps that makes generation of combined js files easy and robust (django-compress, django-compressor). They handle cache issues (auto-versioning), compression (via YUI or any other compression tool), debugging (e.g. don't combine or compress files when DEBUG=True), but they don't handle dependency resolution. I think most django developers would prefer one of these implementation because they already use them and they are proven, stable and used in high-load. Using something that requires django to serve files feels scary and suitable only for development or for small sites.

So my proposal it to split core.py into separate python package (e.g. js-depender) that can be installed via pip install and then used stand-alone, with any python framework and with any compressing/combining utility (like mootools-depender, django-compress or django-compressor).

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant