Monday, May 28, 2012

Yahoo! Mojito: Part 2 – Enhanced Hello World!

This is Part 2 of the "Hello World" article. In this followup article, we enhance our code to:
  1. Render a form on the landing page which asks user to enter his/her name
  2. Process the data on the submitted form
  3. Say "Hello {user}" rather than "Hello World"
What we will learn through all this is:
  1. One of the various possible options to accept data to the server
  2. Process incoming data
  3. Apply business logic and create the data to be rendered
Let's get started with customizing the view to create a form...

Sunday, May 27, 2012

Yahoo! Mojito: Part 1 - Hello World!

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".

Friday, May 11, 2012

Wordpress for Google App Engine?

I love WordPress. A big fan. But then I once-upon-a-time used to be a huge fan of PHP, and then I've grown up. I know people will kill me for that statement. ;-)

But the fact of the matter is PHP still has serious issues. And most recently, I can't use it to run WordPress at Google App Engine, something that's amazingly great for the starters who want to setup quick-and-not-so-dirty app.

I thought... would it be good to have Wordpress for GAE? I came across Vosao - Open Source CMS for GAE/J. And I loved it immediately. Has a long way to go, and I do not see any active development on the same... surprised, what happened to the team.

StackOverflow has a question - What CMS runs on Google App Engine, but I personally didn't like any of them.

And then I thought again... how about writing my own CMS with persistence in a Non-Relational Store with plug-in model so that I can run it on any store, be it GAE's Data Store, MongoDB or Amazon DynamoDB or whatever.

Let me see if I can hold on my thoughts and really get on with it... At the moment, no promises! :-)

Yahoo! Mojito - Web Developers' Dream

I've started to love HasGeek forum more than others... and there are reasons, mainly the audience and quality - of speakers, planning and execution. I was happily surprised to note that the guys used NFC cards, most probably during breaks. Probably because I had to leave after my session in the morning.

My session at MetaRefresh 2012 was on Yahoo! Mojito, which was recently open sourced at Github.
Below are the slides from the presentation...