Tuesday, 15 January 2008

New Website Backend

Once again I changed the backend of this website. I’ll update this post with more details tomorrow. For now, if you find something not working, please comment on this post. Btw, I know that commenting shows a page without layout atm.

update:
Well ok, here it is. Like Zef already commented on this post, I probably code more than write articles on this blog :P That’s pretty bad and certainly has to change.
As frontend webserver I switched to Nginx, probably the fastest webserver around. However its support for scripts sucks. There is no mod_python or php module. It is possible to run a separate fastcgi daemon, but that kinda sucks. So for the backend webserver I setup Apache, which serves the Python, PHP and Ruby scripts only. Nginx serves the static content and passes everything else to Apache.

A few months ago I switched from the rails powered blog Mephisto to MovableType. MovableType creates static html pages and its admin screen is great. However, last month they decided to release a commercial and an open-source version starting with version 4.1. This open-source version is community supported and initially got a subset of all features in the commercial version. I really don’t like such a business plan, so I decided to write my own blog again. The last time I did that, was with ESME. ESME was in 2002–2003 my attempt to create a Rails like framework in Perl. It was pretty good and worked very well, although I never finished it (I never finish my personal projects :P). So I decided to go with Django, a web-framework written in Python. Why Django? Because I already know Ruby on Rails and learning Python was already on my todo-list for a couple of years.

Today I finished writing this blog in Django. That is how I discovered the differences between Django and Rails and why Rails tends to be more popular. I like Django more than Rails, because Django’s fundamental design choices are just better in my opinion. For example it actually creates the foreign keys in the database. The Rails team thinks that is not necessary and should be done in the layer on top of the database. The Rails team made more design choices of this kind, where I don’t agree on.

So why is Rails more popular at the moment? The first thing is that the Rails team is promoting Rails actively and the Django does not. The Django team will start with promoting at version 1.0. The second thing is probably that Rails is more attractive for the beginner, the learning curve is less steep and thus easier to switch to from e.g. PHP. Django and requires a bit more programming experience what most PHP and Rails developers don’t have (no offence).

If you are interested: the source of my blog is available here, but keep in mind it’s written specially for my website, so maybe it will not work like you want. Also I need to cleanup some code :-P


Jeffrey Gelens

said Monday, 14 January 2008:

Testing comments, they show up a lil later because of the cache. Have to fix that.


Zef

said Monday, 14 January 2008:

I think you change backends/frontends/servers more often than you post ;)


Jeffrey Gelens

said Monday, 14 January 2008:

Hehe, I like coding more than writing I think :P


Jeffrey Gelens

said Tuesday, 15 January 2008:

Hmm, I forgot to turn on Akismet spam-filtering and got tons of spam comments in 5 mins :-/ damn.


Andrew Aitken

said Tuesday, 15 January 2008:

I’ve never used python, but I switched to merb as a ruby framework instead of rails for work use. I’m going to be posting about backend changes at my own site soon too!

I must say, I’m impressed with your work – I wouldn’t have noticed the switch if you hadn’t made this post.


Manuzhai

said Monday, 21 January 2008:

You might want to look at the mod_wsgi module for nginx that’s being developed. Should be a nice way of running Python WSGI apps within nginx.


Jeffrey Gelens

said Monday, 21 January 2008:

Jup, I looked at that module for nginx and it kinda sucks. It blocks the whole worker during a request. Until that is fixed I won’t use it. Let’s hope the developer will fix it soon.


said on Nov. 20, 2008:

(markup will be applied later)



says on Nov. 20, 2008:


    ~ do cool stuff ~

Feeds

Latest Comments

Articles

Links

Blogroll

Gelens.org is powered by: Django 1.0, running on Python 2.5.2 and served by Apache 2.2.9 with mod_wsgi 2.3, proxied by Nginx 0.6.32. The database is PostgreSQL 8.3.4. All of this is running on the latest Arch Linux on a 360MB Linode Xen VPS.