Tag Archives: Tutorial

Yahoo! Mojito: Part 1 – Hello World!

Yahoo! Mojito:: Part 1 - Hello World:: Artifacts

Yahoo! Mojito is, now, watched officially by 1027 developers (as of writing this article) on Github (see https://github.com/yahoo/mojito/watchers) and is actively contributed by developers across the board (see https://github.com/yahoo/mojito/network). And I’m pretty sure, there will be several others who would have downloaded, installed and tried.

Before getting into this detailed Hell World tutorial, I assume that you’ve already installed Yahoo! Mojito using the instructions given at https://github.com/yahoo/mojito README. I preferred an npm-install to ensure that I get a stable version.

Defining the “Hello World” application:

  1. The first step will be to create an application with defaults, no customization, and get it running.
  2. Next, we’ll make the application run at port 80 and ensure that the content is available at “/” rather than a strange but intuitive default path.
  3. Subsequently, we’ll change the default contents to reflect “Hello World” in the message
  4. And finally, we’ll make the application interactive by creating a simple form that will accept user’s name and say hello to him/her rather than to the whole world 😉

And here’s some vocabulary before we deep dive:

  1. Yahoo! Mojito: MVC framework for JavaScript based application.
  2. Mojito Application: An application based on Mojito framework.
  3. Mojit: A mojito widget – with its own model, view, controller and binder.

We call this application – “HelloWorldApp” and the mojit as “HelloMojit“.


Read more …