Last few days at work had been crazy, been spending almost 15 hours at office and getting back home early in the morning, blame it partly to offshore accounts and then to internal activities like rolling up a training program. After getting back home today (5AM in the morning), all I wanted to do before I kick-start my SNOOZY weekend, was to get this post up. For last few weeks we have been working on a AR concept, and you can say this just a small inspiration for me to work with Processing more often.

Processing is more like declarative creativity, it lets you program animation, illustrations and patterns using open source language, which can be executed within the Java Virtual Machine (JVM). This post and demo was alot inspired by James Alliban’s video post. I here used a simple live video color tracker and added the random 2D ribbons. As I am a dead meat now, will post further details in coming week, till then will await for your feedback and have a great weekend.

Color Marker Guided 2D Ribbons from Mohammed Khan on Vimeo.

Will update the source code here soon, need to work on the lag.


At the Adobe Dev Summit 2009, Hyderabad, I gave a presentation on Data Visualization Beyond Flex Charts, and the best part came after my presentation, was flooded with queries on how-to’s and also met some cool developers from Sierra Atlantic who shared their experiences with Oracle BI Suite and how Flex Framework has added value to their solution. Overall I believe that Adobe Dev Summit 2009, was well received, with 650+ developers, and 15 speakers, it was a scoop blockbuster. Hats-off to Harish S Krishnan, Sujit G, Ramesh S Ragahavan, Arijit Chatterjee and others from Adobe team who made this event possible and having me as part of it. Will look forward to be part of it again in 2010 (if I don’t miss the call, as I did this year).

UPDATE: You can find the above slide deck on Slideshare here.


With today’s release of Flash Player 10.1 Beta, Adobe has made delivering Contextual Applications for Mobile possible.  In theory Contextual Applications are Smart Rich Internet Application, practically these applications adapt to the execution environment. If an application needs to adapt to certain factors, firstly it should be aware of them. And the guidelines set for developing Conceptual Applications are based on three awareness context.

  1. System Aware: Adapt to hardware specific factors, resolution, interaction mechanism and extended features of the hardware such as Accelerometer, GPS etc.
  2. Network Aware: Adapt to bandwidth, and optimize content delivery mechanism. Also determine state of connection (Online/Offline) and accordingly switch instances for persistence.
  3. User Aware: Adapt to User’s preferences and social circle, and accordingly suggest/deliver content.

On the Adobe Labs you can find an AIR app called WorkFlowLab, and in the pre-installed workflow templates you can find the Contextual Application Workflow developed by Ryan Stewart, which pretty much gives the outline of the whole design & develop toolset for working with Contextual Applications.

Contextual Application Workflow

Contextual Application Workflow

With Flash Player 10.1 on Mobile, it would be possible to design and develop using Flash CS 4/5 platform, that would make applications understand various soft and hard context, and accordingly adapt. Further to this note, it would be exciting to see collaborative and contextual applications hitting our devices and hence making the Rich Unified Applications theory much more practically possible.


Post Adobe MAX 2009, I have been working on a solution design for a company based out of UAE and part of the solution involved Oracle Primavera P6 V7 EPPM Platform. Primavera is a Enterprise Project & Portfolio Management solution widely used by large-scale engineering companies across globe. One of the new feature of the P6 v7 platform is event notifications, which makes it possible to integrate Primavera with other enterprise systems for Business process Automation. To use the Event Notification feature of the Primavera P6 v7 platform, first you would need to downlaod and install a JMS server, and for this example I am using ActiveMQ (because it’s easy to get started) but for my client’s requirement we are using Websphere MQ. So go ahead and download ActiveMQ latest stable version from here and once downloaded, unzip it and start the Message Broker by executing the activemq command under the bin directory of the unzipped activemq package. Now we would need to create a queue called P6WS7, for this once you started the ActiveMQ, navigate to http://localhost:8161/admin and under the Queues section, enter the new queue name as P6WS7 and click Create.

With this we have got the Queue created and pretty much configured the ActiveMQ, now we would need to configure the Primavera P6 eventing system, so that it will post all the events triggered on to the message queue we created in ActiveMQ. For this login into your Primavera Administrator Console and navigate to your P6 Database Instance and configure the Eventing and Directory Services. Below is the attached screenshot with needed field-values that you will need to enter in order to post the events on to the ActiveMQ message queues.

Primavera P6 V7 Eventing Configuration

Primavera P6 V7 Eventing Configuration

Once you have entered values as defined in the image for Eventing and Directory Services section, you can test the configuration by right clicking on Eventing title and click “Test Connection” form the menu. This will dispatch a test message to the P6WS7 queue which you can view it in the ActiveMQ web admin console. Hope this info helps you out, as none of the documentation that comes along with the Primavera P6 v7 platform has this defined, even not in the documentation thats on the support CD pack.


It all started with Flex Data Service, and since then Adobe has made significant progression in enterprise computing. For me, enterprise computing doesn’t mean complex business use-cases, instead manageable enterprise objects (can be a document or a form or a data-set). Adobe LiveCycle Enterprise Suite has been pretty much successful to engage enterprise computing around the PDF document type. And on other side, an extension of the LiveCycle ES, the LCDS has made it possible for RIA developers to build mission-critical and collaborative applications. Last week at The ActionScript Conference 2009 which was held in Singapore, I made a presentation with the same title, and not sure how well it went with audience (more of designers & flash developers, also post lunch Zzzzz).

As in my earlier post I mentioned, Fiber is a suite of technologies which helps you do model driven development using Flash Builder 4 (with modeler plugin) and LiveCycle Data Services 3. And the major part of the Fiber is the Adobe Data Model, which lets you build data models, create services and bind services to data controls. Below are the slides attached which I used at the TAC 2009 and also find attached source code which was used for demos at the conference.

In order to work with attached codes, you will first need to setup and get started with Livecycle DS 3, about which you can find it here.

Demo II : Getting started with FB4 & LCDS 3
Demo III : Working with Annotations & Styles
Demo IV a : Working with Filters : Criteria based Filters
Demo IV b : Working with Filters : Pass-through Filters


In continuation to my last screen cast, this one deals with Annotations and Styles declarations using Adobe Data Model, LCDS 3 Beta and Flash Builder 4. In the next screen cast I shall try to cover working with various types of Filters using Fiber suite.

Model Driven Development using LCDS 3 – Annotations & Styles from Mohammed Khan on Vimeo.

You can download the the source code which was used in the above screen cast here, and the sample MySQL database script here. When importing the project into your Flash Builder 4, you will need to change the LCDS 3 turnkey path in the Flex Compiler settings, also the RDS username and password would change accordingly. If you have any issue in getting started, feel free to share.


In the following screen cast, I discuss about the tools required to head start MDD using LCDS 3, also how to configure the lcds 3 turnkey solution to enable RDS management, declare data source for the lcds web application and define user security at servlet container level, I hope it helps you get started. In the next part of this screen cast series, we will explore the Fiber suite and Adobe Data Model, where we shall work with Styles, Filters and Annotations.

Getting started with Model Driven Development using LCDS 3 from Mohammed Khan on Vimeo.

UPDATE: The next part of this screen cast titled “Model Driven Development Using LiveCycle DS 3 Beta – Annotations and Styles” is available here.


As part of Adobe’s initiatives to align it self with Enterprise computing, it has made LiveCycle Data Service (LCDS) 3 Beta available for preview, no its not open source, but you can download and test out the new features. Things have changed considerably in LCDS 3 and quite new features have been added which I believe makes it exciting to work with. The new features that are part of the LCDS 3 Beta version are:

1. Execution runtime support for Adobe Data Model

With the introduction of Fiber, a suite of technologies that enables Model-Driven-Devleopmet using Flash Builder 4 and LCDS 3, also comes Adobe Data Model. Adobe Data Model, is an XML-based persistence modeling language, and under the hood it implements the Java Persistence Query Language (JPQL) which is part of the Java Persistence API (JPA). In order to work with Adobe Data Model, you will need Flash Builder 4, Modeler Plugin, and LCDS 3 Beta. Without LCDS 3 Beta, you will not be able to execute or deploy your data model definitions, this also means Adobe Data Model wouldn’t work with BlazeDS.

2. Data throttling

For developers who worked with Flash Media Server, this should not be new. Throttling means the server increases or decreases the amount of data streamed based on how much the Flash Player can consume and process. LCDS 3 beta has various throttling mechanisms, and the one that automatically controls the server’s data outflow rate based on the client consumption rate is known as Adaptive Throttling.

3. Reliable Message Transactions

In LCDS 3, the Quality of Service (QoS), has been largely improved, for instance when working with data transactions applications like a Banking App, its necessary to have an acknowledgement made at all ends of the the data pipeline. This guarantees that whatever is send/receives is reliable.

4. Recover over Network Failures

Another feature that has been added to improvise the quality of service, is the ability for the Flash Player clients to recover data over network failures. A particular business case where this feature can be handy is a Trading application. Data Transmission is crucial in any data driven application, and also it becomes necessary to have high network redundancy. With multi-tier features it makes it possible for the Flash Player client to switch sessions with different LCDS 3 server definitions, if an network failure occurs with a particular destination.

5. Pause/Resume Capabilities

Another interesting feature, which can change the way the Flash Player client handles large chunk of binary data transmission is the Pause/Resume capability. Exchanging documents, large set of data can be controlled in more orderly fashion, the user gets the ability to control the exchange of data.

If you feel the above features excite you and want to test drive the MDD feature of LCDS 3, watch for this space. Till then I hope you have a great time.


Well today was an exciting day, presented at the Bangalore Flex User Group, though the turn out was low, the feedback was quite positive. Also post meet up, went out with Mrinal and Saurabh for dinner, and had an avid discussion on various topics. To sum up, it was an exciting day and the rain made the evening more pleasant. By the way below you can find the presentation slides which were used at the Bangalore Flex User Group Meeting, also I would like to apologize for the demo not working, its just for some reason the modeler plugin for Flash Builder 4 doesn’t work the way it should (that’s why its still BETA). And as I promised I shall record individual webcast for the functionalities which I couldn’t demonstrate today. So have fun and a great weekend.


Applications that require undo/redo functionality, can be constructed using the Command Pattern. Other uses of command pattern can be to construct reusable components, process queued requests, and develop wizard or transactional applications. As the name goes, Command pattern encapsulates functionality into a class and consist of five elements:

1. Interface
2. Concrete Command
3. Receiver
4. Client
5. Invoker

Command Pattern Structure

Command Pattern Structure

In this post I will touch upon Interface element of the command pattern. The command interface defines the execute() method, which is responsible for executing the requested operation. Also multiple command types can be implemented using the same interface. The command interface provides a programmatic approach to manage the objects which have disparate modes of operation.

//General interface implementation
package com.thepixelcode.sampleCPExample.commands {

  public interface ICommand {
     function execute():void;
  }

}

The above snippet can be further extended to support the redo/undo functionality, and in order to implement, we would need to create two command interfaces, one for redo and another for undo which shall extend the ICommand.

//Interface for undo
package com.thepixelcode.sampleCPExample.commands {

  public interface IUndoCommand extends ICommand {
     function undo():void;
  }
}

//Interface for redo
package com.thepixelcode.sampleCPExample.commands {

  public interface IRedoCommand extends ICommand {
     function redo():void;
  }
}

I didn’t want to write a long post over the weekend, also neither i wanted to loose on my writing spirit. Shall continue on other elements and a demo app in next post. Till then have a great weekend.