Looking for Archivematica the software project? see: archivematica.org

archivemati.ca

archivemati.ca header image 1

Build or Customize? Enter the Python…

December 23rd, 2005 · 1 Comment · System Architecture

Well, I am back from Ixtapa, Mexico with a decent tan and a very sore back from an unfortunate JetSki incident out in the high surf. Just imagine a Dukes-of-Hazard-style launch off a very large wave. Anyway, I can still type.

As a follow-up to my previous post, I’ve been through the Agile Web Development with Rails book and have been playing around with a test Rails application for the past few days. Here is a short list of some of my first impressions:

  • I still find the Ruby language a little bit disorienting. I am just a novice programmer (VB.Net, PHP, Javascript, XSLT) but I think I’ve already become too accustomed to traditional syntax and markup (however ugly or unbeautiful that may be deemed to be by the more experienced programmers)
  • I don’t like having to create and alter my tables directly in the database. I wish Rails would do this for me, because I am big (SQL) baby.
  • The ActiveRecord relationship features are great but the scaffolding views don’t auto-generate and auto-populate controls for my foreign keys. I have yet to try many-to-many views but expect this to become challenging when I try to create ones that allow for the selection, editing and updating of both sides of the many-to-many relationship(s) on a single view. There’s no way around it. I am going to have to get my hands dirty with SQL and Ruby code.
  • I don’t think I am going to get a lot out-of-box AJAX/Javascript widgets (e.g. datagrid, menus, tabs, etc.) to create my data-entry screens and advanced search screens (I don’t think these are widely available as open-source quite anywhere just yet)
  • I am not sure about Ruby/Rails Unicode support and how easy it is going to be to internationalize/localize a Rails application
  • Rails will give me XML publishing using Builder but I am not sure about the support for importing & reading XML documents

So my initial excitement about Rails has tapered a bit. Now its about the facts not the hype. Before any born-again Rails evangelists get a chance to rush in for an emergency conversion, however, I just want to say that these are very preliminary first impressions and open questions that I need to investigate further to determine whether Rails will be the best tool for the job. Which, by the way, will likely turn into a client project for an international NGO rather than a research prototype as I originally planned, so it’s critical that I get my initial ‘build or customize’ decision right. In the end this will be determined by which platform most closely and elegantly meets the project’s business and functional requirements.

On the ‘customize’ side of the equation I have been losing steam for Drupal. My main concern is over the lack of technical documentation and what appears to be a pretty flat, fat architecture. When I install Drupal or its modules I am not quite sure of what exactly I am getting and where it fits into the big picture. I am going to need to do quite a bit of customization to the node/flexinode/taxonomy modules to support the complicated data structures required for archival description cataloging. Therefore I need to be clear on what the data structure is and would prefer to work with a platform that provides me with some database abstraction. I have also had one too many time-wasting episodes chasing down a missing semi-colon or curly bracket to make me think twice about PHP.

Over in Europe, Zope and its associated products (CMF, Plone, CPS) are quite popular as open-source application servers and content management platforms so I’ve been taking a further look at them. Zope/CPS as a matter of fact may prove to be a useful platform option for any future electronic records management/ECM projects that I may be involved in.

As I was working my way through the Zope material, the underlying Python language slowly slithered into my conciousness. It looks a lot more familiar and comfortable to me than Ruby, yet seems to strike a similarly useful balance between scripting and object-orientation. I won’t be able to avoid custom coding regardless of what platform I choose but, at this early stage, doing this with Python seems less threatening to me than PHP or Ruby. Python also has a proven track record and lots of documentation, publications and code libraries.

Giving Python a closer look finally led me to Django, my most recent stop on the never-ending ‘platform evaluation mystery tour.’ I had briefly looked at the TurboGears MVC platform (also based on Python) but something about Django has really caught my fancy. Django’s database abstraction layer seems to be more my speed and style, for one, it lets me define the data model right in Django without having to roundtrip to the database itself. The other features that interest me the most include Django’s auto-generated data-entry controls (‘admin interface’), the built-in templating support and (most important for the client’s business requirements) support for internationalization.

So I am going to install and test the Django framework shortly while I continue to play around with Rails as well. Interestingly, the founder of Django (Adrian Holovaty) and Rails (David Heinemeier Hansson) both live in Chicago so the respective Ruby and Python user groups there hosted a joint presentation to allow each to speak on the strengths and vision for their platform. As new MVC platforms designed for rapid web-application development, the two are actually more similar than different. However, Hansson summarized the main conceptual difference as Django being a platform focussed on the development of websites (with the inclusion of some higher-level components that the Rails founder wants to avoid) versus Rails as a toolkit for building web-based applications.

1 response so far ↓

  • 1 Adrian Holovaty // Dec 23, 2005 at 4:10 pm

    Excellent. Glad to hear you’re experimenting with Django! Let us know on the mailing list (groups.google.com/groups/django-users) if you have any problems.