lost password?

home
•  xaraya
•  rails +
•  django +
•  webdev
•  xamp
•  musings

rss
Tag this page
   

» Blogs that link here
last modified: Mar 26, 2007
(first posted: Mar 17, 2007)
(2625 Reads)
Permalink

Rails and Django - User Extensions (part 13/15)

A technical manager's guide to evaluating web development frameworks, with a detailed review of Ruby on Rails and the Django (Python) projects. (Start here: Whitepaper index)

User Extensions

The inner circle of developers on projects like Rails and Django are known to frequently debate where to draw the line between what should be in the core framework versus what should be an add-on component.

Frameworks rely on the user community to contribute pluggable extensions to the core framework. In Rails these are called plug-ins. In Django they are apps.

Rails

Rails has a well established Plug-ins capability. Plug-ins are easily installed and then appear to be a natural part of the core framework. Plugins may consist of code (classes), templates, stylesheets, and other files.

Plug-ins are installed using the "script/plugins" script (or its recent replacement "rapt", which retrieves a plug-ins code directly from a subversion repository over the Internet). Plugins get installed into your project's vendor/plugins/ directory.

Presently Plugins cannot contain models, or provide modular “apps” like Django, although there are a couple of initiatives to add this (whether or not these play well or are just hacks remains to be seen). For example,

A dedicated plug-ins section is maintained on the Rails site (http://wiki.rubyonrails.org/rails/pages/Plugins), and there's an online database of plugins at http://www.agilewebdevelopment.com/plugins I'm pointing this out because there's a lot of support for finding, using, installing, and writing plug-ins. As of Feb 15, 2007 there are 520 plug-in available (from about 55 repositories). The online database allows ratings to help weed out the junk from the jewels.

Django

In Django, user contributions are like any other "app". You install them manually, which is trivially simple, nonetheless it's not just a single commandline command -- copy the code to your project's directory and the templates to your template directory; and then follow its documentation how to add it to your project.

For example, some optional apps come with Django, include

  • Flatpags app - for storing simple “flat” HTML content in the database, and handles the management via the admin interface
  • Comments app – a simple flexible comments system (not yet documented)
  • Redirects app – lets you store simple redirects in a database

Links to Django apps can be found at http://code.djangoproject.com/wiki/DjangoResources, a single user wiki page which also contains miscellaneous links to blog posts, tools, templates, code examples, tutorials, and so on. There is no coordinated effort to support user contributed apps, neither in terms of coding conventions for interoperability nor a centralized place to register find them.

Opinion

The quantity and quality of Rails Plug-ins is impressive. And Rails has made an effort to provide some infrastructure on its website for community development. Notably, the online database of plug-ins (with ratings) is not on rubyonrails.com, but a private consultants site, http://www.agilewebdevelopment.com/

As for Django, while the potential for user contributed apps is there, it has hardly been exploited. The limited infrastructure and quantity of Django apps is clearly disappointing.

Conclusion: I rate Rails a 4 and Django 2

 

User Extensions Rails Django
Installation

command script,

retrieves from a repository

and installs in your project

manual: you get it,

copy it, and use it

Official infrastructure

dedicated wiki page and

detailed database of plugins

user wiki page, just a bullet list

among all other resources

User contributions hundreds available a couple of dozen
MY RATING: (1=worst, 5=best) 4 2

Rails and Django - User Extensions (part 13/15)

Posted by: Someone on April 03, 2007 07:57 AM

Dude, check your facts.

"Presently Plugins cannot contain models" is simply wrong. Cf:

http://svn.viney.net.nz/things/rails/plugins/actsastaggableonsteroids/lib/tagging.rb

Yup, tagging.rb is a model class, and yes, it is part of actsastaggableonsteroids, a working Rails plugin.

Moreover, citing Rails Engines as a more powerful alternative to regular plugins is also wrong, cf:

http://rails-engines.org/news/2007/01/03/engines-are-dead-long-live-engines/

by Rails Engines author: "When Rails 1.2 is released, the notion of 'installing an engine' will become meaningless. Let me make that really clear - there will be no meaningful distinction between an engine and a plugin anymore."

So Engines itself is just a plugin. You might have had there point about 6 months ago, but this article is dated March 17th, long after 1.2 was released.

So plugins do let you create mini-applications, complete with Models, Controllers, and views. Whether the Django approach adds any value beyond Rails plugins is a theoretical discussing worth holding, but only after we got the actual facts straight.

#

Rails and Django - User Extensions (part 13/15)

Posted by: linoj on April 03, 2007 09:28 AM
Thanks for the clarification. Writings about plugins vs engines (vs components, "plugems", etc) is confusing, to me at least.

#

Rails and Django - User Extensions (part 13/15)

Posted by: ericb on August 31, 2007 02:59 PM
I just wanted to let you know you have a typo in your link to Django apps, which leads to a non-existent page. The correct link, without the comma at the end: http://code.djangoproject.com/wiki/DjangoResources

#

Post a new comment

: This is not spam

Name :