Sunday, October 14, 2007

Another CMS (Django Style)

Yes, I have been playing pretty extensively with Django these past few days and I love it. It is so intuitive for me. I don't think I have found a single approach to web app development that seems as easy as this.

Today, I was working with the default Admin provided and started thinking of ways to alter it and extend it. With Django, they give you the basic things needed, but no more no less. However, many of the pieces given appear to be easily altered and this could prove useful.

See, out of all the CMS apps out there, I like Plone the best. However, the hosting cost can be prohibitive for some groups, also I still don't like the way Skins are developed. I can do it, but for others it seems a bit steep. I'm interested in applications that are fairly easy to extend and customize. In this area Drupal seems to have it right on. However, with Drupal, the Admin is poorly developed and the way in which users interact with content is weird. I also, dislike the lack of structure. The Plone notion of organizing content in Folders just seems super easy versus Drupal's whatever, wherever approach.

Django, as a base framework provides a very simple templating system similar to Drupal, but Django is written in Python, object oriented and all (Yes, I know PHP is OO, but Drupal takes a more procedural approach). Django's admin is also clean and fairly intuitive; it does have some work, but I think I can integrate the Django admin in a more folderish and content/location specific way such as Plone does then we might have a really interesting extension of Django and skeletal app similar to Plone, but with the hosting cost more in line with Drupal.

For me writing an app in Django is much easier than writing a Product in Plone and yet, they function in the same way.

Django issues (these are things that need to get done to make Django more friendly for CMS development):

1. Easily defined URLs, power-users shouldn't have to write regular expressions. When installing an app a site manager should be able to easily set the urls associated with a particular piece of content with out getting into the code. This means users could also add pieces.

2. Users and Group Permissions, Plone does this very well and while Django has a powerful security system is seems pretty bare.

3. Folderish structure. When adding a module or app the piece should act as a folder and the pieces of content associated should be connected to it. For instance, I add a blog module; a base url is generated and anytime I add a blog content-type (e.g. a Post) then that content would live under the blog heading as a child of the blog. This way we could enforce a bit of structure. Of course some people might hate this, but for us Info Architects this structure would be nice.

4. Admin to be embedded. Currently the admin is a whole different piece of the site. The admin should only come up for adding content modules at the root of the site. Below the root, I would think that the admin should be referenced and any edits would be on the piece of content a user is currently viewing. This is also very well done in Plone.

5. In my module app I need to write a piece of code that will allow me to update the urlpatterns(). Unfortunately, the urlpatterns variable is a damn tuple. A list would make life a bit easier.

Anyway, these are some of the things I'm thinking of addressing. If I can work with some haste I might be able to have the first cut before the next semester and maybe we can deploy for the new JESA site. I think I will deploy for my own site first though. Need to watch out for those XSS attacks. I'd rather my stuff crash than theirs.

1 comment:

Anonymous said...

I have just found this, looks like it could be interesting: http://django-cms.org/