Jim Huginin, the founder the Jython project, is credited with having said: “The purpose of a programming language is to let software developers express their intentions as simply and directly as possible.”
Unfortunately, we computer programmers are cursed by their own understanding of complexity. In fact, non-programmers often think complexity is a fundamental measure of our skill. The truth is that complexity is easier to achieve than simplicity. Simplicity is the Holy Grail of any framework or programming language.
I aspire to developing code that clearly and simply expresses my intentions. Simplicity is in the eye of the beholder, of course. Often, one paints oneself into a corner and then simplicity goes out the window. However, we am starting from scratch here, so let’s be hopeful.
My site stats indicate that few people have paid attention to the articles I posted by Dhananjay Nene. As I continue working with DB4O, I hope you get a chance to read these articles, especially the code examples.
The Project
For anyone who is jumping in late, the latest version of Jython, a version of Python that has been implement on the JVM, supports Django, a framework similar to Ruby on Rails. I want to demonstrate how to build a website, using Django to manage controllers and views, but I want to manage my models using DB4O.
Since I started writing about DB4O, my site has been getting visitors from about 50 different countries. But, there are few visitors from my own country, Canada. I find that interesting.
This Week
Django lets you replace parts of the framework very easily. In fact, I am quickly coming to appreciate this flexibility when I compare Django to other frameworks. Django does not force you to use its templating system, nor does it for you to use its data models. This is the flexibility we want to exploit to get DB4O working happily with Dajngo running on Jython.
This week, I want to concentrate on hiding DB40 from programmers who want to use DB4O to persist objects while using Django/Jython. The objects should save themselves, and the details should be administered from a central file. This is where I hope to get the most help from Jython as opposed to Java.
A Small Task
While I do this work, if anybody is interested in helping out, here is a task. I have managed to install Nginx on a server, and I have Django under Nginx running using FastCGI and regular Python, not Jython. To do this, I had to install Flup. My question is: can we install Flup under Jython? I would be happy to chat with anybody who either knows the answer, or is willing to investigate.
Otherwise, we will have to find another way – we could run Django in a servlet, and we could perhaps use Jetty. Any other options?