Monthly Archives: April 2013

TodoMVC using Mojito, Part 2: Common affinity controller

TodoMVC using Mojito - Firebug Console

In Part 1, we got our basic application ready with the following setup:

  • Application and Routing Configuration
  • TodoMVC defined assets
  • Initial UI – HTML markup and CSS stylesheet

In Part 2, we explore configuring all of the CRUD actions and update all associated artifacts – model, controller and binder. Specifically, we explore the following actions – one at a time:

  1. Action – List all TODOs
  2. Action – Add a TODO
  3. Action – Edit a TODO
  4. Action – Mark one or all complete
  5. Action – Delete a TODO

Step 1: Action – List all TODOs

The first thing that we build up is retrieving all TODO items and showing them up. If there are no items in the list, then, as per the specs, the #main element must be hidden.

Let us start with updating the model followed by the controller and binder in that order.

Read more …

TodoMVC using Mojito, Part 1: Common affinity controller

TodoMVC using Mojito

This is first post in the series that describes building a simple Todo application using Mojito. The constraint that we have in our first implementation is that the controller will have common affinity.

As a prerequisite to understanding the implementation, I would assume that you are well versed with JavaScript and are hands on with Mojito. If not, it may be worthwhile to explore my initial posts on getting started with Mojito.

The complete code generated can be structured in the following steps:

  1. Initial code generation using Mojito CLI tools
  2. Application and routes configuration
  3. Initial UI – View and CSS
  4. Model
  5. Controller
  6. Binder
  7. Action – List all TODOs
  8. Action – Add a TODO
  9. Action – Edit a TODO
  10. Action – Mark one or all complete
  11. Action – Delete a TODO

Read more …

Todo MVC using Mojito

TodoMVC is an awesome project by Addy Osmani and Sindre Sorhus. In their own words:

Developers these days are spoiled with choice when it comes to selecting an MV* framework for structuring and organizing their JavaScript web apps.

Backbone, Ember, AngularJS, Spine… the list of new and stable solutions continues to grow, but just how do you decide on which to use in a sea of so many options?

To help solve this problem, we created TodoMVC – a project which offers the same Todo application implemented using MV* concepts in most of the popular JavaScript MV* frameworks of today.

The website now boasts of implementations using over three dozen frameworks. And I decided to pitch in using Mojito by Yahoo!

Read more …

Book: Getting Started with NoSQL

Getting Started with NoSQL

After a few months of authoring, exchanging mails with the publisher on the final content and reviews, and exchanging mails with Satish – lead reviewer, my book – Getting Started with NoSQL (ISBN: 9781849694988) – is finally out in the market.

The book is available on Amazon at:

A bit in detail about the book:

Relational databases have been used for decades, and in the last few years NoSQL has been a growing choice for large-scale web applications. Non-relational databases provide the scale and speed that you may need for your application. To switch you must know the options available, the advantages and drawbacks, and scenarios which it is suited to the most and where it should be avoided at all costs.

Getting Started with NoSQL is a from-the-ground up guide that takes you from the very first steps to a real-world NoSQL application. It provides you with a step-by-step approach to design and implement a NoSQL application that will help you make clear decisions on database choices and database model choices. The book is suited for a developer, an architect, as well as a CTO.

This book is a comprehensive guide to working with NoSQL. You will learn to make key decisions, and to design and implement NoSQL applications. You will learn about NoSQL jargon, data models, and databases on the market. The case studies and comparisons presented will help you to make a decision on whether or not to use NoSQL, and if so which model and product to use. This book is an indispensable resource for you to have in your library. You will learn everything you need to know about understanding and working with NoSQL and how to implement an application with the correct NoSQL for you.

Read more …