What is Loovea? Loovea is a cool social network!
Loovea is a cool social network, that combines top features from some popular social networks.
But we're not here to discuss what loovea is, we're here to discuss how was loovea built (in a very technical point of view).
You can check out the Loovea landing page below.
The code behind loovea.com is written in Python, using Django framework.
Why Django? Here are some of the things I can highlight, as a Django developer:
Python - elegant syntax, very fast, stable, supports a wide variety of web servers.
MTV architecture (Model - Template - View)
Powerful ORM - Powerful and very easy to use.
Beautiful URLs - Many frameworks can provide beautiful urls, but Django makes url building fun!
Strong Template System - Simplifies things. A lot. It's easy to learn and speed up development.
Built in admin interface - Why waste time to implement an admin panel?
Fast. Very fast actually.
Complete - You have everything you need.
On loovea, images are uploaded and stored using Django files storage. Because we need images in many sizes (ex: avatars), we use PIL - Python Image Library to rezise/crop all sort of thumbnails. New image sizes are generated on the fly (if a size for that specific image does not exist, it's generated right away).
Why is this efficient? Because we do not check if the file exists, in order to generate it (it would be slow). Instead, we store in database all generated sizes for a specific image. This way we already know what sizes are generated without checking the files existence.
Loovea has a real-time chat application. Design is really nice, and it works smoothly. It is also designed to support group conversations (group chats).
For the two-way communication, we used Tornado websockets. Pretty straight.
Loovea has a very modern design. And it's also very light. The CSS/Javascript on Loovea is written in the most ideal and clean way, with no glitches to make it load slowly. Also, the assets are merged, minified and versioned using Django-pipeline, for a fast client loading and caching.
Well, the model structure on Loovea is very complex.
For instance, 'Content' model is very complex. It can be related to a Photo, Video, Talk, Check-in, Photo + Check-in, Photo + Talk, Photo + Checkin + Talk, etc.
Also, content can be posted to one or many groups, and can be visible to some people only.
Making such relation in Django is easy, thanks to Generic foreign keys, and model manager.
Implementing these complex relations without Django would be a pain.
As a conclusion, Loovea was very challenging to build, but we have done it, I can say, in a professional way.
The code follows all the Python/Django coding standards, and there are no "hacks".