Mamoo released as open source

I just put the Motionbox Advanced Model Observer Observer (Mamoo) up on Github. It's a light-weight (13k), but fairly powerful framework for javascript built on top of Prototype and the Motionbox EventHandler.

It's fairly well documented and has a full suite of specs written in ScrewUnit.

Mamoo let's you stop thinking about the "glue code" you need on a client-side app - and start thinking like "when this happens, I want this to happen." - Event driven architecture in JS.

Checkout the readme for a romp through most of the features.

To whet your appetite, here's a really small, but useful app written with Mamoo.

JavaScript:
Message = MBX.JsModel.create("Message");

MBX.MessageView = MBX.JsView.create({
    model: Message,
   
    onInstanceCreate: function (message) {
        var li = this.buildLi(message);
        $("message_list").insert(li);
    },
   
    buildLi: function (message) {
        var li = new Element("li", { id: message.primaryKey() });
        li.update(message.get('body'));
        li.updatesOn(message, "body");
        return li;
    }
});

// This will add the ui element
var message = Message.create({ body: "this is my body!" });

// and if you change body, the ui will automatically update as well
message.set('body', "some other body");

Assuming you have an ol with the id of "message_list" in your html page, now everytime you create a message, it'll get populated into the DOM.

I also put together a 15minute screencast that gives you a quick demo of a bunch of the features of Mamoo.

Nifty?

The Buzz {3 trackbacks/pingbacks}

  1. Pingback: Ajaxian » Maboo: Client-side MVC from Motionbox on March 17, 2009
  2. Pingback: Mamoo: Client-side MVC from Motionbox | Guilda Blog on March 18, 2009
  3. Pingback: A collection of links about JavaScript and the MVC development pattern - paulcarvill.com on August 19, 2009

The Conversation {3 comments}

  1. Justin Meyer {Wednesday March 18, 2009 @ 7:01 pm}

    Would you consider building using this as part of a combined framework with JavaScriptMVC and archetype? We’ve been trying to get people together with similar ideas together to make a unified framework.

    Let me know what you think.

  2. Topper {Thursday March 19, 2009 @ 1:27 pm}

    Just sent you an email. I think the answer is “yes” with a “but…” :-)

  3. Ruben Müller {Thursday August 27, 2009 @ 5:06 am}

    Cool stuff Topper! Gonna experiment with mamoo a bit …

Speak Your Peace

  • Comment Policy:Could go here if there's a nagging need Login Instructions: Would go here if there's a desire.