Channels ▼

Web Development

Yahoo Mojito: Environment-Agnostic JavaScript Web App Framework

Former darling of search engine Yahoo has announced the availability of Mojito, an open-source cross-platform programming framework built on JavaScript. Engineered for both client and server environments, the company is hammering home a "single code-base" message for development, testing, and debugging.

Part of Yahoo's broader Cocktails mobile development platform featuring a mix of HTML5, Node.JS, CSS3, and JavaScript, Mojito is essentially an environment-agnostic JavaScript web application framework to sit alongside Yahoo Manhattan, a hosted platform for Mojito-based applications.

Yahoo argues that developers have a hard time delivering high quality apps (or "digital media experiences" to use the Yahoo-preferred term) to all popular consumer devices, without having to create applications specific to each device. The company also says that existing technologies that try to solve this problem are proprietary and therefore likely to lock developers to vendors. Mojito, on the other hand, is open sourced and available off GitHub.

Bruno Fernandez-Ruiz, Yahoo's chief platform architect, details his thoughts on the new release as follows. "By releasing Mojito to the developer community, we are looking to enable digital media developers to build higher-end mobile experiences faster. If you want to build apps that reach all your customers anywhere…today you have to make hard choices, mutex choices — I hate those. Build a desktop website? Build a mobile website? Build an app? Translation: an iOS app? Or an Android app? Mmmmh. Must I pick one?"

So Yahoo's theory here rests upon building standards-based applications and tailoring (or degrading) them to each device it runs on. Mojito is a true MVC framework, which the company says is a "battle-tested" design pattern for desktop, server, and beyond. But the best part of Mojito may be its ability to "blur" the client/server boundary, to let developers write code that runs on the client or the server. Or both.

Mojito apps run on the client, using the client's embedded JavaScript engine. But Mojito also runs on the server on NodeJS, with a focus on efficient low-level constructs for I/O; Mojito is about providing application patterns to help developers structure code, to make it more modular and more concise.

Yahoo's Fernandez-Ruiz underlines this by saying, "We have a grander vision for Mojito. Think about it: Having the ability to run JavaScript code on either end, we've built a framework for both. A framework that hides (a little, not too much) the execution site. A framework that lets you assemble and render data on the server, or, well, on the client too!"

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.