Posted by:Monica Samuel May 9th, 2012

MOJITO! Not the nice Cuban cocktail but Yahoo’s, supposedly equally nice, MVC framework for building high-performing device independent web apps. Mojito applications are written in JavaScript and run on both client and server (via Node.js). Yahoo has published the Mojito code under a permissive BSD open source license that allows you to use the code to build your own applications, even for commercial use.

What Yahoo is trying to do here is build a developer community to contribute to the growth of Mojito apps and other Cocktails applications. Yahoo Cocktails is a JavaScript-based online as well as offline, multi-device, cloud-ready, Web application platform that offers features such as internationalization, bucket testing, command-line tools, and scaling. It allows you have a common codebase for multiple device implementations.

What does Yahoo offer with Mojito?

For Node.js supporters, Mojito will help in higher adoption of the technology (read more about Node.js here). The framework offers the following features:

  • Local development environment and tools
  • Easier and faster development with the use of one language for client server and server database interactions
  • Library for simplifying internationalization & localization (based on YUI 3)
  • Integrated unit testing
  • Device specific views based on user-agent
  • One codebase for client or server execution
  • Ability to write HTML and CSS so pages function even if JavaScript is disabled on the client
  • As a module of Node.js, Mojito lets you leverage the scalability and speed of Node.js, its core modules and npm modules
  • Extensive API with modules for executing code, making REST calls, handling cookies and assets, accessing parameters and configuration, and more
  • Command line tool to run unit tests, create documentation, sanitize code with JSLint, and build projects for iOS and Android applications
Mojito applications contain JSON configuration files and directories for storing JavaScript, HTML, and CSS. The configuration files are used to define relationships between code components, assets, routing paths, and defaults. They are available at the application and ‘mojit’ level. Mojits are the basic unit of composition and are reused in a Mojito application. They include JavaScript and markup, and follow the MVC pattern. The directory structure of a Mojito application reflects the MVC architecture and separates resources, assets, libraries, middleware, etc.

Mojito has already been used to develop applications. Yahoo’s Livestand, a magazine reader application for the iPad, and the Fantasy Premier League Football game application are some examples. By open-sourcing the MVC framework, Yahoo hopes to develop improved standards for the development of optimized Web applications and mitigate partial connectivity issues.

Want to give it a try? Download Mojito from GitHub.

So, eager to learn why your business MUST take notice of Mobility ? Or want to decide which app is a right fit for your business? Download your choice !

Leave a Reply

Your email address will not be published. Required fields are marked *