Why use client side MVC frameworks

I recently posted regarding my new preference of RoR vs Django. Moving forward with updating my knowledge of web development, I took a look at AngularJS and I have to admit I like what I see. Their tutorial is very well built and clearly demonstrates how to render views on the client side based on data generated on the server side.

This means your back-end does not need to render any HTML code anymore and you can focus on developing REST APIs providing the data. While client overload may still have been an argument against client side MVC framework a few years ago when this new kind of framework appeared, modern computers can really handle the rendering, and modern mobile phones are way faster than older desktop systems.

I chose AngularJS because the application I am currently working on was originally developed with it but you can find a very clear comparison of client-side MVC frameworks on TodoMVC where you can find a to-do application implemented using the various frameworks available today.

Meteor SEO

Meteor is looking better and better, but out of the box a search engine will not be able to see anything on your page.

Luckily, some packages have been created to help render your pages on the server side, add a sitemap and so on.

I recommend Julien’s complete guide to Meteor SEO if you want to get a hands on example.

Meteor: closer to the future of web frameworks

Back in April last year I was writing about my recent discovery of the full stack javascript frameworks, and at the time I was thinking this was maybe going to be the way of the future in web development.

Well almost a year later, I have kept reading articles on these libraries and I have to admit I never really tested anything, and stuck to Django for my web projects.

Until this week where I heard about Meteor from a friend. And now I have to admit that even if I am a little reluctant to fully dive into this new tool due to the lack of a proper debugging for Javascript, I was more than impressed by the features it offers: fully responsive, live update, easy deployment, package system, thriving community, etc…

It will not kill Django and Rails overnight, they keep an edge for the backends, but if you have not already done so, try the demo project: a persistent collaborative todo list.

Some guys even wrote a Trello clone on github.

Playing around with Javascript & 3D: Three.js

Following on my previous post on Node.js, I continued to catch up with what I missed in JavaScript, and I discovered 3D with three.js.
Back in my college days I played with OpenGL in C but as 3D was not a primary focus at the time I never went very far as the scaffolding required to get started was too time consuming.

But with three.js you can prototype amazing animations in just a few lines.

I wrote two samples using this library, best used with Google Chrome:

  1. CrazyBox: this simply shows a box rotating randomly at the center of the space, throwing spheres around. The spheres are moving according to a parabolic movement caused by a constant gravity, with no friction. You can move around the box using the mouse thanks to orbit.js
  2. Rosenbrock: in this one you visualize particles animated following a Particle Swarm Optimization (PSO) searching for the minimum of the Rosenbrock function

Let me know if you need explanations on the parabolic movement or the PSO code.

Enjoy!

Node.js and friends: the future of web frameworks?

Once in a while, you realize you are reading more and more about new tools without understanding why they are becoming so popular.

I have been looking again at web technologies lately after several years of pure C#/desktop oriented development, and I found myself guilty of not quite getting the success behind node.js.

At first I was mislead by the “.js” name and thought it was yet another fancy jQuery like. But then I came to realize that it had really no connection, except the language.

Node.js is in fact a bundle of the V8 JavaScript engine and JavaScript libraries providing an environment to execute JavaScript on the server side.

Check these two links to understand how the full Node.js stack can be used, and in which cases: