Hello, i'm a cloud and web developer.

Mooml: a great javascript template engine!

written by Gabriele Mittica, May 21 2012

What's Mooml?

Mooml is a great Mootools Plugin.

With Mooml you can easily create and manage dom object through an impressive template engine for Motools Library. In few words, it lets you build html from Javascript using a very nice and clean syntax taking advantage of the power of Mootools.

Why you should use it?

Mooml can be a great choise for your web applications like mobile apps, backend areas or social networks. Mooml creates the html elements and returns to you one or more elements that you can manage with Mootools.

This is a great advantage because you can manage dinamically the dom elements throught the real power of Mootools: a compact and smart object-oriented Javascript Framework. You can integrate Mooml in your code and create a real-live web app!

Step one: Register Mooml globally

Here a couple of codes to register the templates globally.

Mooml.register('mytemplate', function() {
    div({id: 'mydivid'},
    p('Lorem Ipsum'),
    p(a({ href: '' }, 'click here'))

...or on the Fly

You can also use Mooml in the html body

var template = new Mooml.Template('mytemplate', function() {
    div({id: 'mydivid'},
    p('Lorem Ipsum'),
    p(a({ href: '' }, 'click here'))

Now you can generate your html:

To call the examples above:

    var el = Mooml.render('mytemplate');
    var el = template.render();

The html produced


Lorem Ipsum

click here

More, more and more

You can know more on official Mootools Forge page and on GitHub.

Please consider to use Mooml in you web app!

About the Author

Gabriele Mittica
Gabriele Mittica I'm a 28 years old web developer with a long experience on dynamic websites. I worked over 7 years on content management systems designing. Now I'm focused on AWS integration and cloud development. In early 2012 I opened a new cloudy startup:Corley.

Post a comment

blog comments powered by Disqus

Articles from blog and friends!

Keep in touch!

If you want ask a question, share a content, report a bug or simply contact me you can find me on Facebook, Twitter and obviously on Linkedin!

Cloud and LAMP applications: how to scale

published May 13 2013

The Slides from my speech at the first italian Cloud Conference in last April. An introduction to lamp apps and scalability: the issues and the related solutions, how to scale the app and which services use to do it in the best way. [PHP, Cloud, AWS, Cache]

Cloud Conference and Cloud Training

published Apr 12 2013

I'm happy to introduce the Italian Cloud conference in Turin next 18th April, where a lot of speakers (also me) from great companies such as AWS,, Zend Technolgies, Corley, Read Hat and NuvolaBase will speak about cloud computing and scalability. [Cloud, AWS, startup]

Mongo ad PHP: review

published Feb 12 2013

My review of the manual MongoDB and PHP, an interesting book 8maybe too much short?) that explain quickly how to use a very populare nosql database like mongoDB with no troubles. [PHP, Cloud, Nosql]

WordPress integration with AWS - Part 2

published Feb 11 2013

From the Wordcamp Bologna Conference where i was such as relator, the second version of slide about integration of WordPress with cloud services and tutorial about scalability of PHP applications. [Cloud, AWS, WordPress]

My interview for

published Jan 29 2013

The interview published by where I talked about startups, cloud computing, entrepreneur life and passion that I put into my work every day. Hoping not find it too boring! [Cloud, startup]
Web & Cloud Developer
© 2018 Gabriele Mittica
Clicca per i dettagli