Soma.js - lightweight MVC Javascript Framework

| 2 min read

We are excited to release a new Javascript framework called soma.js. I am Henry Schmieder, London based web developer, and this is my first post on this blog. Romu and I have been working on this framework the last couple of weeks and I'm going to introduce it to you.

soma.js is a Javascript model-view-controller (MVC) framework that is meant to help developers to write loosely-coupled applications to increase scalability and maintainability.

Check the soma.js website where you can find the framework, demos, unit tests, documentation, tutorials, and so on.

Why another Javascript framework?

We both have a strong background in other languages and we thought it would be nice to bring our experience to the Javascript world. Javascript is evolving, and while the language is pretty powerful, its use is very different today than years ago. Applications have become more and more complex and manifold, from one page GUI driven web apps to stateless mobile applications. To keep the process of developing modern JavaScript applications easy and fun, we built soma.js.

There are many great Frameworks out there, written in different languages, that cover the basics of a structured development flow of more complex applications. The core paradigm for a lot of them is the MVC concept.

We believe in the Law of Demeter to develop complex application structure, and we also believe that loose-coupling development is key. soma.js implements the Observer and Command pattern through the native javascript event system, which offered many advantages and flexibility.

There is a lot of discussion as to how much sense makes trying to project concepts of a strong OOP language like Java or ActionScript onto the loosely typed, dynamic prototype based Javascript. But there is a lot of sense in it, not at least having a background in applying the benefits of structured application design based on OOP concepts and pattern based concepts like MVC.

I used Mootools for the very first version of soma.js and Romu joined me to give the project a massive backwind towards a public release. So we worked on a complete unit test system, an automated template downloader and packer, a set of demos, a complete documentation and an interactive demo site that explains the project and allows realtime code example modification and execution and introduces into all the important concepts of the framework step by step. On top of that we decided to remove the dependency from another framework, Mootools, and created a complete native version, also entirely documented and unit test backed.

Have fun with it and provide feedback to us!