Review: Yahoo Mojito gives server-side JavaScript a lift
There are still some limitations. I wish Mojito had some coupling with databases because that's what many developers are going to want to do. Node frameworks such as RailwayJS and Locomotive offer Rails-like connections to traditional databases. If you want a quick CRUD scaffolding to create, update, or delete rows in the database, one command can build them for you.
Web apps without SQLThe Mojito documentation on data access talks about cookies and Yahoo Query Language, not SQL or NoSQL. The counter-SQL argument is that the data should live in its own realm in a JSON-compatible server that takes RESTful queries. The Rails-like integration is too much, and it shackles the developer. Leaving the database connection out of Mojito frees it.
The Yahoo team should forge a tighter alliance with the major NoSQL databases that speak JSON and JavaScript already. MongoDB, for instance, which takes queries in the form of JavaScript functions, is a natural partner. A difficult question is whether there also needs to be better integration with MySQL and other traditional databases. These continue to have strong followings, and if Mojito wants to gain access to shops with legacy SQL databases, the project will have to consider tighter integration. Or maybe they'll just insist that the legacy stores start answering RESTful queries with proper JSON.
Will Mojito succeed The speed of Node will continue to attract new experimenters who quickly discover they can't build an entire Web application in one file as many of the hard-core Node lovers do in their early demos. As soon as they discover that raw Node programming can produce inscrutable code that's nested in endless layers of curly brackets, they will be running to frameworks like Mojito. Mojito's structure and JSON configuration files unpack much of this complexity and spread it out over a number of directories and files. Some JavaScript programmers may be a bit put off by all of this atomization, but the structure has served the MVC community well over the years.
The flexibility of using pure JavaScript on both the server and client should also be very attractive. Several other projects, including Google Dart and Opa, are trying to create new languages that offer the same code base for client and server, but these approaches require learning yet another language. Mojito runs regular JavaScript, which will be handy when you encounter the weird, edge conditions of the language and need to program around them. There will be differences among browsers for the immediate future, and adding another language doesn't always smooth them over. Despite the improvements offered by the newer languages, most developers will prefer to write native JavaScript.