Archive for the ‘RIA’ Category

999 Tax Calculator

14 Oct

Okay, had some extra time on my hands and I was curious about the 999 Tax plan, so I wrote a calculator that gives you a good idea of your current tax burden vs a 9% sales tax + 9% income tax.


Posted in RIA


Setting up Blazeds ( Tomcat ) on Amazon Ec2 à la Ubuntu

08 Oct

We’ll throw in some lamp and phpmyadmin in too for good mesure. These are the steps I recently used to setup an Ec2 box for some dev…

Step 1: Java

#See if we have it already
sudo apt-get install sun-java6-jdk
#if no repo add it...
sudo add-apt-repository "deb lucid partner"
sudo apt-get update
# and try again
sudo apt-get install sun-java6-jdk

Step 2: Tomcat

sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
sudo /etc/init.d/tomcat6 start
#modify user rights so you can use the webadmin gui
sudo pico /etc/tomcat6/tomcat-users.xml
sudo /etc/init.d/tomcat6 restart

#And if we want to autostart tomcat...

sudo pico /etc/init.d/tomcat

Insert the following
# Tomcat auto-start
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/

export JAVA_HOME=/usr/lib/jvm/java-6-sun

case $1 in
sh /usr/local/tomcat/bin/
sh /usr/local/tomcat/bin/
sh /usr/local/tomcat/bin/
sh /usr/local/tomcat/bin/
exit 0

Now issue
sudo chmod 755 /etc/init.d/tomcat

sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat

Step 3: Blazeds

Copy up the blazeds WAR (assuming you’ve already downloaded blazeds on your localmachine)

scp -i ~/pathto/YOURPEM.pem blazeds.war ubuntu@someelasticip
sudo /etc/init.d/tomcat6 restart

Step 4: LAMP

tasksel --list-task
sudo tasksel install lamp-server

Step 5: phpmyadmin

sudo apt-get install phpmyadmin

Add the following line to /etc/apache2/apache2.conf:
Include /etc/phpmyadmin/apache.conf

sudo /etc/init.d/apache2 restart

Extra Credit: Xuggler for kicks

uname -m (verify which version of linux 32/64)

chmod a+x ./
sudo ./

sudo pico /usr/share/tomcat6/bin/
export XUGGLE_HOME=/usr/local/xuggler

No Comments

Posted in RIA


Streaming Thinkorswim’s CNBC video feed on Mac

03 Nov

I was a bit disspointined to find that when I moved to Mac, I lost the video stream within thinkorswim. To stream the video on Mac a few simple steps are required

1) Install VLC
2) Click on the icon to run the video externally (lower right corner)

No Comments

Posted in RIA


Pentaho Kettle Scheduled Task: Windows

08 Jul

To run a Spoon/Kettle job from the command line (convenient for creating a scheduled task) use the following syntax:

kitchen.bat /rep:”REPOSITORY NAME” /job:”JOB NAME” /dir:/LOCATION /user:USER_NAME /pass:PASSWORD /level:Basic

Replace /job: with /file: to run a job from a file if you’re not using a repository.


Posted in RIA


Warehouse Dashboard Architecture

22 Jun

If Flex has a sweet spot, dashboards would be it. The technology provides a richness that makes engaging UIs very easy to implement.

For those evaluating possible solutions, I’m showcasing a simple architecture for a data warehouse / dashboard project. This particular architecture encapsulates the extract / transform so those are the only steps (simple SQL=>CSV) that need to be recreated for each environment (client) that has different source systems.

Warehouse Dashboard Architecture

No Comments

Posted in RIA


Flex OLAP Take Two

15 Jun

After running some OLAP benchmarks it was obvious that a more scalable OLAP solution was needed.

After some quick searching and downloading, I’ve wired up a scalable Flex OLAP UI.

I downloaded and setup Mondrian from Pentaho for my OLAP server. Mondrian supports XMLA making integration easy.

I found a few Flex projects interfacing to OLAP via XMLA. The most robust appears to be Grebulon by the guys over at Sherlock Informatics

Mondrian setup required a few tweaks, as I’m running Java 6:

Added the following JARs
commons-discovery-0.2.jar (removed commons-logging)

Also set the following parameters in tomcat

Using the FoodMart as a reference, the setup was very straight forward.

I had to download the Grebulon source as the .swcs had hardcoded in a few references (PivotGrid) to the FoodMart datasource.

Commercially, I’d check out FlexMonster too 🙂

1 Comment

Posted in RIA


Flex OLAP Benchmarks

14 Jun

I ran some benchmarks for the OLAP components in Flex. The OLAP components allow you to perform you’re OLAP operations client side out of the box. You *can* utilize the SDK interfaces and move your processing to the backend, should you have too much data for the browser.

That said, the benchmarks below should help define the line for “too much data.”

Record Structure:

Grade:Number (Our measure)

Records / Processing Time (s)

1,000 / 3 sec
5,000 / 12 sec
10,000 / 22 sec
15,000 / 33 sec
20,000 / 43 sec

The processing times listed above are for the *client* side processing time. The data was loaded from the server before starting the benchmark.

I ran the benchmarks at various rollup depths (multiple hierarchies) which the components actually handled very well, the processing time was not significantly affected.

Extending the dataset to 125K+ records caused errors with the script timeouts occurring.

For datasets above 5-10K records, I’d suggest moving the processing to the server and passing the results to the UI. (assuming you’re looking to leverage the OLAP components as provided)


Posted in RIA


jQuery, Objective C

23 Apr

I’ve been diving into both as I’m looking to land some more iPhone projects. I’m really excited with the breath of fresh air the platform provides.

The big question this year….

WWDC 2010 or MAX 2010

MAX has been great, I’ve met some really great members of the community. For those of us who are Flex veterans, the conference seems a bit light, at least that’s the impression I’ve had the past two years.

Looking over the 2009 sessions of WWDC, I’m impressed, looks like a lot of great sessions.


No Comments

Posted in RIA


Glassfish LCDS Flex Up Next

19 Nov

It’s been a busy year getting a J2EE and Data Warehousing education. I’m wrapping up the ETL portion of a large Data Warehousing project. The next phase of the project is building a Flex front-end for the warehouse. I’m looking forward to using the Spark Architecture in Flex 4 for the UI, we should be able to generate some amazing UIs.


No Comments

Posted in RIA


Debug Server/Client LCDS Java Helloworld in Flex Builder

02 Sep


Install Flex Builder
Install LCDS Data Services
Install WTP in Flex Builder

Here’s a simple project that shows you how to create a simple Hello World for Flex + Java via LCDS. I’ll also show you how to debug the server [java] code as we move along.

File->New->Flex Project

  • For application server type select J2EE
  • User remote object access
  • LiveCycle Data Services
  • Create combined Java/Flex project using WTP
  • 01 Setup

    Select the target runtime. You will need to click ‘New’ to create one if none are available.

    02 Server

    Create a new target runtime if needed.

    03 Tomcat

    04 Tomcat

    05 Server

    Be sure to change your Output URL to match the LCDS [tomcat] config (defaults to 8400)
    06 Setup


    Again, make sure the URLs are using the correct port

    07 Debug Server

    Project->Properties->Flex Server

    08 URL Context

    Okay, are setup is complete now we’re ready to code.

    Here’s the MXML

    <mx:Application xmlns:mx="" layout="absolute">

    import mx.controls.Alert;

    private function sayHello():void

    private function onFault(event:FaultEvent):void

    private function onSayHelloToResult(event:ResultEvent):void
    { as String);


    <mx:RemoteObject id="testService" fault="onFault(event)" destination="helloDest">
    <mx:method name="sayHelloTo" result="onSayHelloToResult(event)"/>

    <mx:TextInput id="txtName" x="10" y="10"/>
    <mx:Button click="sayHello()" x="178" y="10" label="Go"/>

    Note the destination=”helloDest” line, we’ll have to configure a LCDS destination with this name in a few steps…

    Create a simple java class to test against:

    public class HelloWorld {
    	public String sayHelloTo(String name)
    		return "Hello " + name;

    And finally, we need to setup the destination

    To do so, edit \WebContent\WEB-INF\flex\remoting-config.xml, adding the following

    <destination id="helloDest">

    That’s it, now we are ready to test.

    Set a breakpoint on the on ‘return “Hello ” + name;‘ line in you’re java code.

    Launch the server in debug mode

    09 Server

    Now, launch the flex app [in debug mode if you want to debug the front end as well].

    Type your name in the input box and click ‘Go.’

    You’ll see your breakpoint being caught, both server [java] side and client side 🙂

    Flex Project Archive

    No Comments

    Posted in RIA


    Install WTP in Flex Builder

    02 Sep

    A quick walkthrough on installing the Web Tools Platform (WTP) in Flex Builder.

    Help->Software Updates->Find and Install

    Help Software Update

    Search for new features to install

    Search for New

    Select the [Europa] discovery site


    Select ‘Web and JEE development’

    You may need to click ‘Select Required’



    Posted in RIA


    What, My Flash Gateway is Already AJAX Ready? Sweet.

    23 Jul

    I’m integrating existing Flex functionality with some new COTS [AJAX RIA] software. Looks like I’m golden on two fronts:

    1. My existing dashboarding app leverages the dynamic module architecture blogged hear in the past. Each module was cleanly encapsulated so it’s about a dozen lines of code to convert each module into a stand-alone app that integrates w/the AJAX page.
    2. My AMFPHP backend is fully reusable!! Using JSON for my AJAX calls, I can simply hit

    I really need to take some time and check out Wayne’s ZendAMF to see what he’s cooked up there, I’ve been far too busy as of late.

    No Comments

    Posted in RIA


    Connecting to 32 bit / 64 bit data sources from Tomcat (Java).

    03 Mar


    When running tomcat your receive the following error when connecting to an ODBC data source
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified


    There are *two* ODBC managers in 64 bit windows. 64 bit ODBC data sources are separate from 32 bit data sources.

    The ODBC manager accessed from the Control Panel contains the *64 bit* ODBC data sources.

    Launch C:\windows\syswow64\odbcad32.exe to configure the 32 bit ODBC data sources.

    If your running a 64 bit app, you’ll have access to the 64 bit data sources. Likewise, if your running a 32 bit app you’ll have access to the 32 bit data sources.

    For Java apps, you’ll need to invoke the app with the correct JVM (32 bit or 64 bit) to have access to the desired data sources (32 bit or 64 bit).

    On Vista, the 32 bit JVM(s) can be found (by default) at C:\Program Files (x86)\Java\jre6\bin. The 64 bit JVM is at C:\Program Files\Java\jre6

    Catalina.bat (used to start tomcat) looks to see if JRE_HOME is defined so make sure this is pointing to the correct JRE or update catalina.bat accordingly.


    Posted in RIA


    Diving back into the blog

    12 Feb

    I’ve had a crazy past few months. If I’ve been slow to reply to your comments – sorry !!!

    I’ll be posting regularly again now 🙂


    No Comments

    Posted in RIA


    RSL Loading Multiple Dynamic Modules

    12 Feb

    So I ran into a Flex bug recently documented here .

    If your using the framework RSL (Runtime Shared Library) and loading modules, you should read the latter link. I was loading multiple modules and noticed that that they all didn’t necessary load. A little searching and I stumbled upon the open bug in JIRA.

    One suggested work around was to load the modules sequentially. This works but doesn’t make for the best user experience. In my case the modules were being loaded dynamically and added to a viewstack. I opted to create a ‘lazy module loader’ component that loads the module on creationComplete().

    I filled my viewstack with these components, made sure the viewstacks creation policy was set to ‘auto’ and voila, every things is working great. Of course one could avoid this component and add each module to the viewstack directly – in my use case I don’t want the main app to have to compile in [i.e. bloat] all [any of] the modules when, depending on the users auth they modules may not be used.

    No Comments

    Posted in RIA


    South Bend Flex User Group: RIA @ the Bend

    29 Dec

    If your close to the South Bend, IN area, I’ll be heading up a new Adobe Flex User Group ( Tim Eash, another local Flex developer will also help head up the group. We’ll be updating the group site over the next few weeks.

    We’ll be meeting monthly at I.U.S.B. starting in January. Many thanks to Dr. Hakimzadeh, director of Informatics at I.U.S.B. for setting up the facilities.

    The groups focus is Flex, Air, ActionScript, and Catalyst development. If you have any topics you’d like to discuss just let me know.


    Posted in RIA


    Refactoring, Error #1065

    23 Oct

    I received the following runtime error in a flex project recently:

    Error #1065 Variable package::Component_inlineComponent1 is not defined.

    I was refactoring away from some static MXML to a dynamically loaded module. I had commented out the static MXML to test the dynamic module. Everything worked great. When I un-commented the previously working static module the #1065 error was thrown.

    [Cache causing] Error #1065 Variable is not defined error.

    Project -> Clean

    1 Comment

    Posted in RIA


    Revisiting one of my first RIAs

    17 Oct

    I spent some time updating on of my *first* RIAs today.


    The application allows special needs teachers to create IEPs (Individual Education Plans) for students. The teachers fill out various (20+) forms that compose the students’ IEPs.

    During the initial interviews, it was identified that the forms would be revised annually and new forms would be added. Dynamically generated forms were *beyond* the project’s scope, so some easy-to-update forms were needed.

    So back today, it’s always fun going back to revisit old code. I got a kick out of looking back at the approach taken on the RIA, hence this post. I wouldn’t necessarily recommend this “architecture” but it did make my job today extremely easy/fast to add some new forms & update some existing forms.

    The Architecture

  • The teachers fill out their forms in a MDI Flex interface.
  • Form data is persisted for subsequent use.
  • All forms where mapped to Flex Accordion controls for a consistent user experience.
  • PDFs forms are utilized for printing.
  • I created a Flex component based on MX:Accordian. This component exposes a function ‘getData’ that when called recursively extracts data the user had entered in the form. This includes any data entered in datagrids, combo boxes, etc. The data is returned as a loosely typed ActionScript object.

    The object graph is sent to PHP via AMFPHP and persisted in MySQL via a PHP “ORM” class that can persist (& reconstruct) any PHP object graph. The object graph is not serialized rather, a modified preorder tree traversal algorithm is used. This provides for simple SQL queries, when / if needed.

    On the PDF form the form field is simply set to the desired attribute name of the object graph.

    So today, to add any form fields, I simply drop on an input (textbox for example), give that input an id and set the text property using databinding. (eg. id=”iep_firstName” text=”{dp.iep_firstName}”).

    That’s it.

    The new field will be persisted with no other work required 🙂 The field can be added to the PDF should the field need to be printed.

    We have 8 Million+ records to date, and things seem to be scaling well.

    No Comments

    Posted in RIA


    The Data Warehouse Toolkit

    17 Oct

    I’ve read some really great books the past few months and thought I’d post a review.

    I’d highly recommend Ralph Kimball’s The Data Warehouse Toolkit.

    I’d normally opt for an architecture book over a [dry] database book without a second thought. Well I was pleasantly surprised to find this great resource.

    Kimball gives the reader a GREAT introduction to dimensional data modeling. For those ‘big picture’ developers out there, you owe to yourself to take a look at this work.

    I’ll leave the lengthy reviews to those more eloquent writes out there 🙂

    Two thumbs up.

    No Comments

    Posted in RIA


    AMFPHP Complex Classes – Yeah I knew that

    19 Jun

    Just blew half an hour tracking down something I *knew* I’d done before. Thought I’d post here for future ‘lapses.’

    To return a typed object from PHP to the flashplayer the process is simple, declare a variable called $_expicitType in your PHP class
    class SummaryVO
    var $_explicitType = "com.dl.SummaryVO";
    $standards = array();
    $levels = array()

    In your corresponding ActionScript class use the RemoteClass metadata tag

    package com.dl
    public class SummaryVO
    public var standards:Array;
    public var levels:Array;

    Note the values for $_explicitType and alias are arbitrary, they can be what ever you’d like, as long as their the same in AS and PHP (provided your only conerned with PHP=>AS mapping).

    Okay, so what happens when you have ‘complex classes’ you’d like to return? Complex meaning a class who’s members are made up of other ‘custom’ class instances.

    Let’s say, for example, that in our later code example ‘standards’ was an array of ‘StandardVO.’ The problem I ran into was that I was getting a typed ‘SummaryVO’ back from AMFPHP, however my class members were not typed, just generic objects. I checked and I had taken the necessary steps to use strongly typed SummaryVO and StandardVO classes, yet the StandardVO was coming back as a plain old Object.

    We’ll it turned out in my development flurry I hadn’t used a reference to the ‘StandardVO’ class yet!! Simply declaring an instance of StandardVO did the trick (i.e. var placeHolder:StandardVO). You could also you the includes class […] compiler option.

    Moral of the story, be sure the complier includes a reference to any class you want strongly typed from your RPCs.