When building the dungeon manager, we set out to create a maintainable and evolvable piece of software. The core principles of OOP are there to help us out when dealing with objects, but JavaScript is special when it comes to object orientation.
As many JavaScript programmers will most certainly have heard, JavaScript uses prototypical inheritance and, more importantly, has not really got a concept of classes, only instances.
Tip
Even though the next version of JavaScript, ECMAScript 6, introduces the class keyword
, the core language design does not change. Classes are really just syntactic sugar over the prototypical inheritance present in JavaScript right now. If you want to know more about ES6, follow the blog http://www.2ality.com/ by Alex Rauschmayer, who describes and follows the evolving JavaScript language closely.
Of course, this does not make JavaScript the worst language to perform the task we are trying to achieve because this lack does not limit the power of the language...