Tag Archives: python

Django framework – first impressions

 

I've been researching the Django framework for the last 2-3 weeks in my spare time. It's development is going on and on and I see many interesting innovative concepts realised behind.

I tried it 3 years ago for a course project when we had to integrate the PIL (Python Image Library) into a web project with the existing technology. It was still first version and not much functional though. Poorly documented as well, but as I see now it is almost complete. Python is a powerful language and a web framework based on it i s a great idea.

There are few CMS systems based on Django. Honestly I don't see any sense in any of them - basically because they could save you 4 or 5 hours of work total but with something that could also trick you later. The admin generation is fast enough in Django that you don't need a few days to moderate the administrative panel and do all the necessary relations for the CRUD .

However, there is one thing I do not like in the basic concept. Comparing Django to CakePHP (which has similar abilities in it's latest releases) I feel restricted by the automagic thing. Automagic is a code-behind technique that generates no code in your project but does stuff at the same time. The problem with this all is that you have no idea what happens behind the project itself. In CakePHP you have admin generation in the same way you see it - yes, 'generation' with 'code generation' as well - files + tests are done and added to the project, controllers have their own methods that execute functions and so on. When you change function code, the project acts a different way. In Cake there is automagic as well, for instance if you define function login() {} for the auth module, you already have login system. No fields defined, nor actions. Just an empty login function. But this is more of an exception than to a rule.

When you define a Django project, the admin panel has no fully coded Admin classes. Everything is reused from the parent classes and once you need to change, you need to research either the documentation or the code in order to find the required methods. This is hard to find in the beginning of your Django career having no expectation of the backend and the possibilities of functions for the project.

Anyway, if we agree on a bit harder learning curve, the framework itself give much more than coding from scratch or with any other framework. Powerful applications could be defined if not in hours, in days, and could be deployed in places like the many Django hosting companies abroad. In Bulgaria there are host providers that support Python (via CGI) and install Django framework on request.

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Python, SVN and Android

 

Three things with not much in common, except that these are the three interesting things around me these days.

For the last 2 weeks I do python development (actually Django) for an international project while I'm ending my CakePHP and Digital Signer applications. I set up Subclipse in my Eclipse because I got tired of committing twice some of my files. This way my SVN is connected to the project in the IDE and the new data is deployed in an easy and beautiful way without any console commits.

The Django projects are fine as well. I do researches over the multilingual applications. So far I found url-locale and multilingual modules which serve to detect the language via the URL and create a multilingual content while create the intermediate tables for that. I continue researching the session system in order to save the languages there where switching around.

As for the Android, I plan to do my first app for almost a year. Recently I had a few job proposals for Android development plus the Mtel contest for Android app. That's why I downloaded the SDK and the Android plugin and started from the Hello World tutorial online. More researches are done and I am willing to test a more complex application with Internet activity, of course.

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com