MooModel: Data Modelling for MooTools
If you’re familiar with Rails and the MVC pattern, then you’d possibly know of the eases of modelling data with an ORM. For a long time, there’s never really been a way to take what we take for granted on the server and do similar within the browser.
Well, not anymore, now there’s a solution that appears to cover all the common issues, it was released earlier this month. Created by Anup Narkhede, MooModel is an ORM and Data Modeller built on top of the MooTools library.
var Post = new Class({
Extends: MooModel.Base
});
var post = new Post({id: 1, name: "bean", description: "lorem"})
post.save();
Post.find(1); // {id: 1, name: "bean", description: "lorem"}
Currently MooModel isn’t CommonJS compatible and doesn’t work on the MooTools ServerSide project. However, Anup does mention in a blog post about the project that he is working on support for both CommonJS and MooTools Serverside.
The readme for MooModel is fairly light, which doesn’t matter too much, as Anup has written up a quite comprehensive documentation containing the usage of the library on his blog.
Discussion
Sign in or Join to comment or subscribe