We want to have control over our tools and the best way to have control is by building the tools our self. Time is money, so creating your own web framework and content management system takes too much work. We decided to use the Django framework.
“Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.”
Django Software Foundation
Briefly on language alternatives
Django is a great framework for developing websites. It's written in Python and is one of the most used Python frameworks. Python itself works for almost anything. It’s fun to program with and is designed for fast and clean development.
If you have used PHP (by your own will or been involved in a project that uses it), you may agree with me about this: “PHP gets messy easily”. I admit, e.g. Drupal is well designed and I’ve felt comfortable using it. I felt PHP isn’t that bad, until I was thrown into project started by someone else.
Python, on the other hand, is designed to prevent this problem. Of course you can write messy code with Python too, but it’s harder. We didn’t have experience using Ruby or Ruby on Rails, so Python was the clear choice over other alternatives.
Research for Django plugins
Django was an easy choice, so we started to build our own management system for our blog. Fortunately, Django made this very easy. Unfortunately, there was still too much work to make it stable enough. While it’s fun to build things from the ground to up and while you get an awesome learning experience, it’s not worth it to use so much time to reinvent the wheel.
HactEngine and our games are priority number one.
I started searching for Django based CMS projects, and tested the two most popular of them. Django CMS was more popular of these two, it seemed stable and is used by Mercedes-Benz.com. The second I tested was FeinCMS, which is used by NASA science. This I found to be not as feature rich as Django CMS.
However, the blog plugin for Django CMS was too simple. For FeinCMS, I found ElephantBlog. ElephantBlog is still marked as beta in Django Packages, but I found it stable enough. I forked it and heavily modified it to suit our needs. One more notable Django app is django-pipeline, which is used for minifying HTML, CSS and JS files.
Our website is made with Django, powered by FeinCMS and ElephantBlog.
I did this research over nine months ago. Around same time, I started my military service in the Finnish Army. We decided I would start working on the website along with my half-year service and finish it after my service. While writing this post I made a little research again. The situation is mainly the same, except there is one new, Mezzanine. It was in beta back then, which was maybe the reason I didn’t choose it. But now it looks like the most impressing one and is already used by comparatively many websites. However, I’m very pleased with my solution and it's working very well for us.
Taking care of responsiveness
Responsiveness is a big trend nowadays and why wouldn’t it be? It’s the most reliable way to create websites, without worrying about different versions for mobile and desktop. If well designed, it’s intuitive and works with the same logic on all kinds of different resolutions and devices.
Which visitor on your site, would like to do the decision: “There is a mobile optimized version available, would you like to use it or the desktop version?”
The visitor only wants to use your website, without worrying about how to use it. The decision must be made by the developer. Of course, this is true for all kinds of user interface designs. And the truth is that responsive design goes hand in hand with growing cross platform development. We also need to think about this while developing HactEngine.
There are many ways to create responsive layouts. I had already used Modernizr with html5shiv in earlier projects, and I have to say, they really helped development. So, Modernizr and html5shiv take care of HTML5 compatibilities and I can focus on the layout. I applied some grid based design, media queries, CSS3 and jQuery to enable responsiveness.
Although, it still may not work on older browsers all that well. Fortunately, Microsoft uses its power for good this time and forces upgrades for older Internet Explorers.
We use Disqus for integrating comments to our blog posts. Disqus gives us, and you, an easy way to continue discussion about the subject of the post. It also helps gather more readers for our blog. Addthis enables easy social integration and analytics. It’s fast to set up and gives good integration with Google Analytics.
For bigger file downloads we will use peer5, which is a cutting edge tool to speed up file downloads and reduce server bandwidth with P2P technology. There is also MathJax, which is used for mathematical notations. It converts LaTeX code to human readable mathematical notations.
This next one needs its own paragraph: the fabulous X3DOM. It's an open source framework for bringing 3D to web browsers, it relies on the HTML5 specification from W3C. X3DOM fulfills the specification with 3D modeling by integrating X3D, WebGL and canvas to add more dimensions for displaying content on websites. We will use X3DOM to show our 3D models in blog posts, because X3D is already used as the 3D model format for HactEngine.
Here is an example of an X3D model, created by our graphics artist Sami Eklund:
Whether you are building a content management system, simple blog or advanced and unique web application, Django is a very suitable framework to build it on. There are a lot of different third party plugins for Django and the Django Packages website is a great resource to find high quality plugins. If, in the future, we need to add new features, it will be fairly fast as we already know what's under the hood.
This blog will be your window inside the development of our games and the progress of HactEngine. You can follow our blog via RSS or by following us on Twitter or Facebook. You can also subscribe to our newsletter, if you'd like updates less often. Please, check the bottom of the page for contacts.