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:
- The first step will be to create an application with defaults, no customization, and get it running.
- 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.
- Subsequently, we’ll change the default contents to reflect “Hello World” in the message
- 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:
- Yahoo! Mojito: MVC framework for JavaScript based application.
- Mojito Application: An application based on Mojito framework.
- Mojit: A mojito widget – with its own model, view, controller and binder.
We call this application – “HelloWorldApp
” and the mojit as “HelloMojit
“.