Y! Open Hack 2013 (London)

Post on 18-Nov-2014

1.373 views 1 download

description

Yahoo! Mojito combines power of JavaScript, NodeJS and YUI and provides a MVC Framework to build applications in an easy and quick manner.

Transcript of Y! Open Hack 2013 (London)

YAHOO! MOJITO

Gaurav VaishPrincipal Engineer

3

COCKTAILSCocktails [kðk’tålz] (noun, plural): a Javascript-based• on-line/off-line, multi-device,• cloud-ready, Web application platformthat offers features such as• internationalization, command-line tools,• single-language code and scaling

4

WHAT’S MOJITO?• A JavaScript MVC framework for web based

applications, one of the Yahoo! Cocktails

Build high-performance, device-independent HTML5 applications running on both client and

server with Node.js

5

MOJITO STACK

JavaScript

Connect

Express

YUINode.js

Mojito

MustacheHandlebars

6

MOJITO APPLICATION COMPONENTS

Mojit• Model• View• Controller• Binder

Proxy

Configuration• Application• Routes• Dimensions

Core Framework• View Engine• Middleware• Resource Store• CLI• Add-ons

Framework Mojits• HTMLFrame• LazyLoad

7

MOJITO APPLICATION COMPONENTS

8

GETTING MOJITO• Using npm

• npm install mojito –g

• From source• git clone git://github.com/yahoo/mojito.git• (cd mojito/source && npm install –g)• mojito test

9

HELLO WORLD!• mojito create app HelloWorldApp• cd HelloWorldApp• mojito create mojit HelloMojit• cd ..• mojito start

• Browse tohttp://localhost:8666/@HelloMojit/index

10

WHY MOJITO?• One language• Device aware• Use any library (jQuery, bootstrap, Dojo …)

• Best with YUI, since that’s the core• Context aware

• Server• Client• Universal!

12

Happy Hacking

http://www.yahoo.com/search?p="Gaurav+Vaish"&fr=sfp

gvaish@yahoo-inc.com@mastergaurav