Moved Back to NodeJS/Express



Taking advantage of the extra time imposed by the current situation with the 🦠 I have now moved back my blog from Python/Django to NodeJS.

Why? After posting about how cool was to move to Django this sounds a bit weird but actually all the “pro” points of django can be turned into cons.

The short version of the story is that whenever you pick an opinionated framework you can end up being stuck. One of the things I didn’t like is the limited flexibility e.g. you are forced to use the Django login system and I wanted to experiment with passwordless.

For the wysiwyg (what you see is what you get) editor I wanted to use the Medium editor but to make it work in Django it was a continuous fight. A good editor is esssential to write more without having to waste too much time remembering silly markdown tags.

Using drag and drop images in Django admin (for blog posts) was another mess. The editors that allow you to do that are mostly in markdown and I think posts should be stored as HTML.

Today I think Javascript is the most useful language and technology for web development. There are a lot of packages solving most problems and if you can get around the quirks you can do just fine.

I also spent a lot of time to do my own solution using minimal web frameworks like Polka and Express so losing all that work felt just wrong.

Here is a summary of the benefits of Express/Polka vs Django:

Deployment is just super easy. Way better than mod_wsgi or unicorn etc. Can work without an ORM - just use mysql or mysql2 package and you are in business; No admin but you can easily make your own that won’t have the same limits of django admin; Same as 3 for the authentication; Can use a lot of different template engines; Intuiting routing; NPM packages ecosystem; In short: more Freedom.

I still like Django and I am using it in other project that I have no intention (at least for now) to migrate to node but I am happy to have moved this small blog/journal back to Nodejs.