The Yahoo home page for tablets is a Mojito application.It’s pretty typical, it has lots of sections.
For example, our universal header, login widget with it’s membership module api among other things– sometimes there is a team just working on thisThe center section is a basic YUI slide view– it consumes various web services so you get a mix of curated and customized contentThese sections aren’t just partial views pulled in from a file system, they are mini MVC thingys that are composed and packaged in a web page.
All that can be HARD
Java, PHP, Objective-C, Apache, SDKs, APIs, and all this different tooling for izations, testing etc.
Use the same languageWrite to a common frameworkServe (or publish ) HTML5
Now that we have a single language and framework to focus on, it’s obvious that we don’t have to think about what we’re going to build in PHP or Java or whatever, and what we’re going to send to the client to render.Take that one step further, we can see that we no longer have to think about this at design and implementation time. These decisions can be moved to RUNTIME.Search has some beta products that instrument the client and it’s connection, and decided what to render (rich or plain) and where (on the client or pre-render on node.js)
Mojito gives you the way to run in different places, but doesn’t do the device or platform specific work for you.It’s also not super easy. It helps if you know YUI and Yahoo configuration concepts.
Create – quickly generate dirstruct & boilerplateJslint – Doug Crockford’s syntax linterStart – start a node instance running mojitoTest – unit tests with YUI TestBuild – create a device container for use in Xcode (soon android SDK, Windows Phone)Compile – static asset rollups for over the wire performance optimizationDocs – generate API docs using YUI DocGv – create a graph using graphviz
Organize by mojitMojits can have their own configsCan be configured by application.json or parent mojitsRoute to mojit “instances” with routes.json
YQL provides a fast and clean API for web services that work on the server or client– perfect for Mojito
“MOJIT” A kind of MODULE… or a kind of WIDGET… …“MOJIT”
MOJITS• Have models, views, controllers, and binders• Can communicate with other mojits by messaging• Don’t have to know about other mojits• Can be composed together• Can run on server or client or both