Category Archives: Technology

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 …

Architecture for Multi-device Applications: Part 3 – Consumption Channel

In Part 1, we discussed about the bare-bore design.
In Part 2, we discussed about the high-level implementation structure.

In Part 3, we now explode the box #1 – “Browser or Custom App”. We look at various consumption channels and how they affect the implementation and technology choices.

Read more …

Processing Shortcodes in a post in Minow

Minow with Shortcode processing

Minow can now process short-codes. Well, it started doing so almost a month back… just that I never got time to update my blog.

As of now, the short-code processor has been encapsulated in a simple interface that does the processing of a short-code with attributes. At http://minow-web.appspot.com/, you may notice YouTube videos embedded in the posts. They are not hard-coded HTML but processed using the YouTube short-code processor.

Read more …

Architecture for Multi-device Applications: Part 2 – Implementation

Architecture for Multi-Device (Desktop, Mobile, Tablet, Internet TV) Access

Part 1 of the series on “Architecture for Multi-Device Applications” focussed on the bare-bore design.

In Part 2, we look at high-level implementation structure – a slightly more detailed version of the design discussed in Part 1, before we start opening the individual boxes.

One of the key aspects that we discussed in Part 1 was the separation between the “Application Server” and “Web Server” layer and argued that most of the applications that we come across in real world, daily life, don’t really separate them… or rather we find them difficult to separate because of the choices that we have or we are “taught” in our life.

Read more …

Architecture for Multi-device Applications: Part 1 – Definition

One of the questions that keeps coming to me over and over again is – what is an ideal architecture for multi-device applications or rather applications that cater to multiple devices like desktop, mobiles, tablets, internet-TVs and what not?

This is quite interesting and exciting as more and more frameworks get developed. We started the multi-device world with native apps and soon realized that the model doesn’t scale. There came HTML apps (or what people naively refer to as HTML5). I won’t call them as really HTML5 (HTML5 only) apps… since you can live with HTML4 and CSS2 for most of the purposes unless you want features specific to HTML5 – most common being using audio/video since Flash is unavailable on iOS (iPhone, iPad etc).

Read more …

Minow now has multiple themes

Minow using Shaken-Grid Theme

Yesterday, I tested the Minow framework with another theme that I personally like because of simplicity and card-layout – Shaken Grid. As earlier, I am not the owner or maintainer of the theme, I just ported it to Minow.

I did this experiment to identify theme-requirements early (lean methodology) with minimum efforts and resources.

The result is some changes in the Minow Engine to serve images, CSS and JavaScript content with appropriate content-type from the template folder noting that the actual theme template should not be accessible directly (read: raw).

Read more …

Update on Minow Progress

Update on Minow Progress - A Closeup

Minow (Minow Is Not WordPress) Engine can now read data from data-store. It’s not generic enough though – right now hard-coded to Google App Engine, but nevertheless.

Here’s what I’ve done since last push:

  • Model for localized content is ready
  • Basic logic to retrieve content for a given locale (not parent, no fallback) is ready. For example, if the language is “hi_IN” (Hindi-India), it – as of now – can get you the content for “hi” and/or fallback to “en_US” / “en”.
    As of now, the language is a query-parameter… will enhance to parse “accept-languages” header with priority (q=0.3 etc)
  • Nest theme has been updated to use the “real” data
  • Implementation exists to lazy load data from the store – don’t load the posts until they’re really required. A lot of WordPress templates do not have blog on their landing page
  • And of course, a piece of code generate sample data 😉

Read more …

WordPress on Google App Engine

Minow is not Wordpress - Wordpress on Google App Engine

I think this is a dream for almost every blogger… well, at least my and at least hundreds of thousands of others.

Most of the other results that you’ll find on search engines relating to WordPress and Google App Engine are about running WordPress on GAE/J by using Caucho Quercus – a bridge between PHP and Java. However, if running / simulating PHP on Java was that easy, PHP on GAE would not have been most starred issue.

And that made me think… how about creating, may be, yet another blog engine for GAE. And what better than taking clues from WordPress.

So, that gave birth of Minow, acronym for Minow Is Not WordPress. Yes, it’s a recursive acronym – see http://en.wikipedia.org/wiki/Recursive_acronym for what I mean.

Read more …