Thursday, May 2, 2013

Refactor and Redesign

So I've been working on a major redesign and refactor of Thinker in order to apply the lessons I've learned thus far in the beta.

As for design, Thinker has a brighter look with a new logo. As I mentioned in a previous post, the new application interface is powered by WebGL. This is accomplished with the magnificent Three.js library (to which I am now a very, very small contributor :D ). And after producing a working proof of concept demo, I can now add 3D WebGL graphics to my list of skills.

You can view the new home page at thinker.jit.su and the demo of the WebGL interface here.

Behind the scenes, I'm coding in CoffeeScript, Jade, and Stylus, the minimal whitespace compiling versions of JavaScript, HTML, and CSS. They make developing way more fun, easy and powerful. As a precompiled language, CoffeeScript should be more difficult to debug, but I find that the simple syntax allows me to avoid more bugs in the first place. The natural closures, "classes", and scoping of CoffeeScript also helps me maintain better code. Nib for Stylus is also amazing. It makes resetting and implementing browser specific styles a breeze. And all these work great with Node.js on the backend

I'm still using MongoDB, but I'm rethinking it a bit. Storing child nodes as nested documents was an interesting idea, and I tried out Mongoose which has support for nested models; however, that approach doesn't allow for easy access or queries to child nodes. Then I read a great blog post about keeping it simple and flat. The new Thinker data paradigm also works well with this approach. It allows for things like only loading nodes as they become visible and performing queries and analysis on nodes in the database regardless of wether they are loaded in the interface.

I'm also working on the nifty Nodejitsu service instead of directly on Joyent.

No comments:

Post a Comment