Brian Ray's Blog : Django/djangorefactored.html

Painting is just another way of keeping a diary. --Picasso

Sun, 01 Jan 2006

Django Refactored

My re-introduction into the web programming world is well under way. After careful evaluation on various web-programming frameworks, I have decided to start with Django for some serious contract work I am currently bidding on. Hence, I am now a Django developer--see the new Django section in this blog.

In the past, I have tried to stay away from web-work. The reason I venture to bid on such work is that the potential client is highly integrated with many types of media. My goal is to fulfill some very complicated tasks where many systems are are married with a web interface only being the tip of the iceberg. The only reason I stay away from some web-work is that it has been saturated with quite a few programmers who concentrate very little on good programming techniques, development philosophies, and quality assurance. I have said this before, but I still believe good programming and simply building a one-off website have very little in common.

Moving forward with my emphasis on sound techniques, I make specific reference to the MVC (Model View Controller) architecture used by Django. Taking it a step further, I broke these up into Roles:

  • Role 1 Model) Highly Relational Database
  • Role 2 View) Graphic Design of Reports, Forms, and Web Templates
  • Role 3 Controller) Event Driven Dynamic Content Programming

And I needed to add some roles to the Administrative Side:

  • Role 4 Hosting) System Administration, Security Management, and Backups
  • Role 5 Administration) Data Entry, User Accounts

Roles 1-3, have separate hourly rates. Role 4, is a monthly rate. And Role 5 is handled by the client thanks to Django's Admin. interface which comes for free.

My MVC representation does not necessarily reflect MVC in the programming world 1-to-1. I simply present this abstraction as a way to break up the work into some business worthy logic. Furthermore, I can easily hand over pieces of these roles to different parties if it simply becomes too-much. So, Role 1 is the database programmer (or in Django, the person who builds the models), Role 2 is the Graphic Designer the person who builds the templates (not really the Views used in Django), and Role 3 is the person who writes the actual business logic in the views. It's best that Role 1 knows PostgreSQL and Python fairly well. The Role 2 person must know CSS, HTML, some Javascript/AJAX and general good design skills for template building. Role 3 should know Python and be proficient in all other areas because they will be the primary programmer who glues it all together.

For now, I am roles 1-4. Nevertheless, despite my butchering of MVC for business reasons, the real importance with my choice of Django over others is it's ability to be agile. "Agile" is term generally understood by business people and programmers, alike, regardless in how this is achieved.