by forkqueue · 17y ago · 0 comments
When I first started using PHP god knows how long ago (IIRC PHP 4 was still in beta), one of the things that shocked me was that there was no equivalent to Perl's CPAN. Things are better now, but not that much, and beyond DB libraries there is still far too much reinvention of the wheel in PHP.
Django is very much in the Unix philosophy of code re-use, and anytime you re-use code there are going to be dependencies. Added to this, many apps are going to use Python, non Django-related libraries, creating more dependencies. Any good Django app that's doing anything moderately complex should have a pretty long list of INSTALLED_APPS.
Many rails apps work with a simple untar because they include their libraries in vendor. I'm not a ruby guy, but Luke Kanies (creator of puppet) is, and wrote a great post on why this is stupid - see http://www.madstop.com/ruby/ruby_has_a_distribution_problem....
Basically what I'm saying is don't fear dependencies, embrace them.
Is it? Rails apps have to work on more platforms than just Debian. You can embrace apt-get and make Debian users happy but you'll piss off everybody else. I wouldn't call the decision to vendor stuff "stupid", but "necessary".
I've noticed that most users actually prefer that an app bundles its dependencies because it reduces installation hassle. Some users literally begged me to vendor a certain library because installing it themselves is too much of a pain. Only a select group of vocal Debian users care about enforcing everything through apt.
All modern Linux distributions - RHEL, SuSE, Ubuntu and yes Debian too have packaging formats to handle dependencies. It's up to the distributions to package the apps, as a software developer I think you should be shipping just a plain tarball, which lists its dependencies but doesn't include them.
My main point was the idea that Django apps shouldn't have dependencies is wrong. Django is awesome mainly because of the ability to easily build on other apps. Doing this creates dependencies, and there's nothing wrong with that.
As for native code, yes that would be a problem, one that hasn't been solved yet. But luckily most dependencies are pure Ruby, and only few libraries depend on native code. Nobody's suggesting vendoring everything all the way up to the kernel, but vendoring a reasonable amount of dependencies does not seem evil to me. I don't see any point in taking an extremist approach of vendoring absolutely nothing, it will piss off a lot of users.
Also, if distributors will package the apps anyway, then why not vendor libraries? Distributors will remove vendored libraries as they see fit anyway. With this in mind it would make more sense to me to vendor libraries, because people who grab the source tarballs are likely users of platforms with no decent package management.
I'm very much in the philosophy of not tying myself to a particular package management system or distribution. Especially not Debian.
If a package has deps, the documentation should state explicitly what they are, what versions are required, and the best way to make the application work with said deps, not attempt to hide everything behind some bullshit "installer" and then not document anything.
The package explicitly specifies the dependencies. I agree custom installers are a very bad idea, but you seem to be arguing against the very idea of having dependencies, which seems crazy to me.