BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Yahoo! Cocktails with Mojito JavaScript Framework and Manhattan Cloud

Yahoo! Cocktails with Mojito JavaScript Framework and Manhattan Cloud

This item in japanese

Yahoo! has recently announced Cocktails, a set of technologies that make it easy to develop and host applications that can run on both client and server-side environments. Cocktails is composed of Yahoo! Mojito, an environment-agnostic JavaScript web application framework, and Yahoo! Manhattan, a hosted platform (PaaS) for Mojito-based applications. Cocktails is the technology behind Livestand from Yahoo!, a personalized magazine app for the iPad.

Cocktails

Mojito is a JavaScript web application framework that can run in a browser and on a server, giving developers the ability to maintain a single JavaScript codebase for both client front-end and server back-end. The web framework deploys itself from the server runtime into the browser runtime, allowing developers to write web modules that can be executed within either runtime. For example, a Mojito application will run on the client if JavaScript is enabled. This same application will run on the server if the client is not equipped to run JavaScript. A Mojito application can also be installed as an app on a mobile device.

Mojito applications are built on HTML5, CSS3, JavaScript, Node.js, YUI3 and YQL. Node.js is a server-side JavaScript environment that allows Mojito applications to run on the server. YUI3 provides the environment abstraction and packaging that allows applications to run equally well in a web browser or on a server. YQL provides the data abstraction and caching that allows applications to access data on the server or on the local SQLite. Each MVC "unit" in Mojito is both a module and a widget. It's a module with business logic, and it's a widget with a user interface. From module and widgets came the term "mojits", from where Mojito, and eventually Cocktails, got their names.

Manhattan is a server-side JavaScript cloud hosting environment for Mojito-based applications. Manhattan provides higher-level services like security, scalability, high availability and monitoring on top of the Node.js JavaScript engine. Similar to how Google App Engine provides a cloud platform for running Python and Java applications, Manhattan provides a cloud platform for running server-side JavaScript. Manhattan also allows you to tap into various services like Yahoo! C.O.R.E. (Content Optimization and Relevance Engine) for content personalization and Yahoo!'s ad serving platform.

Livestand from Yahoo! is powered by Cocktails, and is a peek of what Cocktails can do. The Livestand team develops on Mojito using a desktop browser, and packages for the iPad by embedding a web runtime which includes a native shell for managing web views. The same Livestand application that runs on the iPad also runs on Manhattan. This allows the app to offload some of the complex and time-consuming processing to Yahoo!s cloud.

Yahoo! plans to open source Mojito through the Yahoo Developer Network in the first quarter of 2012. Manhattan will be available later in 2012. To take a quick peek of Cocktails, watch the Yahoo! Mojito and Yahoo! Manhattan Demo. There's not a lot of information for developers at this time, but the blog post titled "Yahoo reveals their Node.js Mojito Manhattan cocktail mix - now I can talk about it?" by David Herron, author of Node Web Development, gives us a little information of how things worked before he left the Cocktails team in June.

Rate this Article

Adoption
Style

BT