Archive

Author Archive

Adobe Air Auto-Update blank screen bug in Flex SDK 3.5

January 6th, 2010

After spending a long time yesterday trying to get the Adobe Air Auto-Update to work I realized it was a bug with Flex SDK 3.5.  What happens under Flex SDK 3.5 when you run the auto-update is you only see a blank / gray screen pop-up with no wording.   At first I thought it was my code so I tried it using Greg Wilson’s sample.  Compiled under Flex SDK 3.5 it doesn’t work at all, but then I tried it under 3.4 it works great.

I have filed a bug with Adobe, so please vote for it so we can get a quick fix -http://bugs.adobe.com/jira/browse/SDK-24919

Ryan Knight flex

Resources for Learning French and Other Languages Online

December 2nd, 2009

As a slight departure from the technical matter usually covered on this website I wanted to share some resources we have found for learning french.  Our son is in a french language immersion program at his elementary school and so the whole family has decided to learn the basics of french.  We have found the hardest part is learning how to actually say the words correctly.  We found two websites the have been extremely valuable in this process.

The first website we use is Hello World.  The biggest problem we have had is a lot of french learning courses are geared to traveling and only teach phrases you would use as a tourist.  We just wanted to learn simple vocabulary words and learn how to pronouce them.  Hello World was perfect for this because it provides the pronunciations of basic french words and other languages if you need to, like Indonesian.

The other great website is Mango Languages and their newly launched Mango Basics.  It provides on-line courses for learning the basics french and many other languages.  The best part is we where able to access it free through our local library.  The courses are very intuitive and walk you through the pronunciation of basic words and phrases.

Ryan Knight recommended websites

New cloud hosting comparison chart

March 15th, 2009
Comments Off

I put together a cloud hosting comparison chart on Zoho DB.   You can also view the full DB and some reports on Zoho DB.  I need to figure out better ways to visualize the data, so let me know if you have any ideas.  I had to makesome assumptions to try and make the comparisons somewhat equal.

Let me know what you think.

Ryan Knight Cloud Hosting ,

Mosso adds Cloud Servers and Cloud Files offerings.

March 13th, 2009
Comments Off

Mosso just announced they are going to be offering cloud servers at $10.95 / Month.  That is about half of the cost of of the competition.  This cloud service is based off their acquisition last year of Slicehost.   It will be interesting to see how similar this offering is to Slicehost.  They have a good reputation for excellent customer service, so hopefully they will keep this up.

What else was interesting was they have updated Jungle Disk to support Cloud Files.  The cost currently only includes the monthly storage cost and there is no cost for data transfer.  That would make the price much lower than storing files in Amazon S3 through Jungle Disk.  The cost for direct use of Cloud Files though does include fees for data transfer.

Update: I just realized that the cost of Cloud Servers does not include data transfer.  They charge $0.08 / GB for bandwidth in and $0.22 / GB transfer out.  If you assumed 50 GB in and 100 GB out that would add $26 to the total cost.  So it is not as competitive as I originally thought.

Ryan Knight Cloud Hosting

Cloud Hosting/VPS Comparison with Amazon EC2 Reserved Instances

March 12th, 2009
Comments Off

Amazon today announced  EC2 Reserved Instances.  This allows companies to pay a one-time fee upfront for a guaranteed reserved instance:

Amazon Web Services Blog: Announcing Amazon EC2 Reserved Instances

This brings the price down of using EC2 for hosting a web site, similar to using a VPS.  For comparison we put together a chart showing how the price compares to other major VPS providers.  We made a number of assumptions to calculate the monthly price for Amazon EC2.  I have also published  more comparisons on this Google Doc.

Hosting Provider Monthly Cost Ram Storage Transfer
Amazon Reserved Instance * $70.68 1741MB 160GB 50 GB Data In / 100 GB Data Out
Slicehost $70 1024MB 40GB 400GB
Linode $59.95 1080MB 36GB 600GB
RimU ** $67.95 1150MB 16GB 150GB
Media Temple (gs) $80 1024MB*** 100GB 1TB
Media Temple (dv) $67.95 512MB 40GB 1.5TB
GoGrid **** $149.98 512MB? 10GB 200GB

One of the challenges with making these comparisons is each of the services have slightly different offerings and different hardware configurations. For example GoGrid does offer Hardware Load Balancing, but many websites won’t need this. Some of the services have more polished control panels and others appeal more to Linux geeks whole like full control.

If we were to pick a winner today it would be Linode. They have several unique offerings such as disk images that allow custom partition schemes, configuration profiles to store muliple profiles and the Linode Shell that allows out of band access to your instance for emergency repairs. We are planning to change our hosting provider soon to Linode and will post a review shortly.

Let us know what you think.

* For Amazon we calculated the price as the base price per month (approx. $27/month) plus the hourly cost of keeping the server running 24/7 in a month. The calculation then is (30 days * 24 hours) * ($0.03 per hour) = $21.6. The base cost then is ($27.083 + $21.6) = $48.68. On top of that we calculated approx data transfer as Data In (50GB * .10) = $5 and Data Out at (100GB * .17) = $17 for a total data transfer cost of $22.

** For RimU we choose the customized option to add extra storage and transfer space

*** Media Temple (gs) Ram was based on the advanced specs for GridContainers.

**** For GoGrid we used the Business Cloud PrePaid Plan of $99.99 / month plus $49.99 / month for 200GB of outbound transfer

Ryan Knight Cloud Hosting ,

Amazon SimpleDB – Is it too simple?

February 13th, 2009

I have been working with transactional databases for a long time, so I was very sceptical about Amazon SimpleDB at first.  The most obvious short coming is that it is non-transactional.  It also uses what Amazon calls “eventual consistency”, that is multiple copies of the data are stored in different places so it takes time for the data to propagate to all storage locations.  That  means the data will eventually be consistent, but an immediate read might not show the change.  This could lead to the classic database problem of dirty reads.  This obviously will not work for any application requiring data consistency; the ACID properties of traditional databases.

Where I think SimpleDB could be useful is that it more easily maps into an object model.  This could be ideal for developing rapid prototypes.  I have developed countless applications that where a proof of concept and just need a basic data store.   Often in these cases it would be nice to not have to worry about mapping the data to a relational data model; the impedance mismatch problem.

To test the service out I built a simple GWT client for administering SimpleDB.  Using the Java library it was very easy to create new data models and query a domain.  The main problem I did see was the speed of access.  Basic operations like deleting a domain took several seconds.  This obviously would not work for production systems.

Overall I would say for the right applications SimpleDB could be beneficial.

Ryan Knight Cloud Hosting, Databases , ,

Anvil Flex is on Ohloh.net

February 3rd, 2009
Comments Off

Ohloh is a really great site with interesting metrics on open source projects. Here is the link to Anvil Flex.   It is interesting to look at the analytics, but not sure how where the 67,000 lines of XML come from.  I would believe the 20,000 lines of Action Script though!

Ryan Knight flex

Featured on Drunk on Software

January 21st, 2009
Comments Off

I was on Drunk on Software today.  Had a great talk with Jon Rose and James Ward about Anvil and Enterprise Flex.  This is my first time having my video on the web, but it turned out well.

Ryan Knight flex

An Introduction to Anvil

January 12th, 2009
Comments Off

OVERVIEW

Anvil was designed to help make enterprise flex projects easier and to provide a portal environment for running flex applications. Today Anvil best serves as a sample of how to build enterprise applications. We are working on making it easier to quickly create a customized environment for flex.

What we have found was the biggest challenge with developing a large enterprise framework was how to cleanly divide the application into multiple modules that can be built, maintained and loaded separately. One of the primary challenges with multiple modules is how to cleanly separate the handling of non-visual events. An example would be having one module call a service in another module. Another issue we ran into was how to isolate events with-in a module, especially if there is multiple copies of the same module in an application. An example of this is when you have a portal framework where the user can display the same sub-window multiple times. The standard event dispatcher does not work for these cases and most frameworks do not handle this situation either. For example the popular cairngorm framework was designed to only work in a monolthic environment and event handling gets messed up when you have duplicate copies of a module.

Anvil comes with two sample applications to help you get started. One is a basic sample in the basicSample directory and the other is Anvil Portal in the anvilPortal directory. The biggest difference is the basic sample does not use any security. The anvil/dist directory has pre-built war files so you can easily see what basic Anvil applications look like.

The anvil/dist directory also contains compiled distribution files of the core Shell flex library, the FlexMDI flex library, the shell and utility jar files and the war files for the basic sample and anvil portal.

In the shell directory is the core library files of Anvil for both the Flex and Java side. Then in the layouts directory is the primary visual layout library, FlexMDI, based on code from the Flex Lib project.

The utils directory contains a Java project with a number of utilities for working with Flex. This includes a tool to create ActionScript Data Objects from Java Data Objects. Another utility is Taz, a flex compiler built on top of mxmlc and compc that makes compiling large projects much faster and easier. There are samples of how to call Taz from ant build scripts. And the final utility is a FlexBuilder project file generator.

QUICK START

For the impatient here is a quick overview of setting up the sample applications. Install Java and Tomcat to just run the samples. We have a detailed post on this here. Also install Flex and Ant to build the samples. Be sure to setup the appropriate home environment variables, like JAVA_HOME, CATALINA_HOME, ANT_HOME and FLEX_HOME.

You can copy the sample war files out of the dist directory into your favorite servlet container. Then to run anvil use the following url in your browser:
http://localhost:8080/anvilPortal/

To rebuild the application you can run ant at any directory level. So running ant under shell will re-compile the shell and under anvilPortal will rebuild the sample. Running ant war will rebuild the war files under anvilPortal/build and basicSample/build.

SETTING UP FLEX BUILDER

To setup the Flex Builder project files for any subproject, cd to that directory and modify anvil.conf. Probally the only change will be to where you want it to output files and then run:
ant gen-proj

This will also work from the top level directory.

If you want to reset your project files run:
ant clear-proj

Then in Flex Builder go to file -> import -> other and then under General choose Existing Projects into Workspace. For the root directory first choose shell. Once you have shell imported and build, then import FlexMDI, anvilPortal and basicSample.

USING THE ANVIL UTILITIES

Both the Taz compiler wrapper and the FlexBuilder project file generator use the same config files. The root config file is called anvil.conf and contains the default values, like output directory and the order library files should be compiled in.

Then each project directory has its own config file, like anvilPortal.conf or basicSample.conf. This contains information about each application, module or library.

The files are very short and simplistic, hopefuly making it easy to configure new projects.
To run the taz compiler there is a common ant macro definition in flex.ant.xml called .

For an example of using it see the anvilPortal build.xml file.

To run the actionScript project generators there is a script in the root directory called runAsGen.sh.
This has the following parameters
1 – the input directory of the compiler java class files. By default it is in out/production/shell
2 – the library directories to scan for the necessary jar files
3 – the output directory – this defaults to newAsClasses

BUILDING YOUR OWN APPLICATION BASED ON ANVIL

By using the AnvilPortal framework as a template, you can jumpstart a Flex Application with a Java, Spring, and Spring Security back end. For now it requires a little bit of tedious copy and pasting, but hopefully in the future we can automate it with Maven.

First set up the basic directory structure for your project and then copy in the necessary files from Anvil. The way anvil portal is organized is their is one directory for each module and then inside of there a src/flex and src/java.

As you copy across the files, you will want to get rid of the .svn directories. The easiest way to do this is run this command from the starting directory of the project, before you import it into SVN!
find . -name ‘.svn’ | xargs rm -rf

Be sure to not put a * at the end, that will delete a lot more than expected!

Based on the AnvilPortal sample there are several file and directories we are going to need:

1 – The common ant build files from the anvil/dist:
flex.ant.xml java.ant.xml utils.ant.xml
2 – The config files from anvil/anvilPortal/etc – these are use to configure the basic security and java application options
3 – The /anvil/anvilPortal/web directory – be sure to delete the crossdomain.xml file! These file configure BlazeDS remoting and the starting web page
4 – From the main /anvil/anvilPortal directory copy the following files:
anvil.conf – This file configures the anvil compile process and the eclipse project file generator
common.ant.xml – This defines the common ant build tasks for the project. This makes it easier to reuse ant tasks across multiple modules.
build.properties – This defines the basic build properties
build.xml – The main build file

Now we need to modify the files to fit the new project. Here is a list of recommended changes:

1 – build.properties – change the project.name. Also if you want to use a non-standard directory layout you can change where the files are located in this file. project.root is the parent folder of the project. project.tail is the directory of the current module that is being compiled.
2 – In build.xml change anvil.root to point to the same directory as the project.root (or even better you could do a global search and replace across the entire project and replace anvil.root with project.root).
3 – Now in build.xml change the project name and the name of modules you are defining.
4 – Modify the config files in the etc directory according to your project.

Ryan Knight flex

Intro to flex mojo’s for maven

December 19th, 2008
Comments Off

Velo has put together some nice mojo’s for compiling flex with maven. Here is some quick tips on quickly settings up and using them. Note that you don’t even have to download the mojo’s to use them. They will be automatically downloaded the first time you compile your project.

The first thing to understand is that the mojo’s use the standard maven way of doing things and only use jar files and library files from a maven repository. That means that they don’t look in the flex sdk directory for the necessary files, so these need to be installed in your repository. Also I ran into the problem that compiling on a remote server I ended up needing the data visualization libraries?

First be sure you have the current version of maven, which is 2.0.9:

mvn -version

On the Mac OSX, maven 2.0.6 is installed be default. To upgrade just overwrite the files in /usr/share/maven

Now install all the necessary dependencies in your local repository. These are propietary jar files, so they can be distributed from a central repository.

First cd to your flex sdk directory and the under the lib directory. In there you should a whole bunch of jar files. Then run the following commands:

mvn install:install-file -DgroupId=com.adobe.flex -DartifactId=license -Dversion=3.0.0.477 -Dpackaging=jar -Dfile=license.jar

mvn install:install-file -DgroupId=com.adobe.flex -DartifactId=aglj32 -Dversion=3.0.0.477 -Dpackaging=jar -Dfile=aglj32.jar

mvn install:install-file -DgroupId=com.adobe.flex -DartifactId=flex-fontkit -Dversion=3.0.0.477 -Dpackaging=jar -Dfile=flex-fontkit.jar

mvn install:install-file -DgroupId=com.adobe.flex -DartifactId=rideau -Dversion=3.0.0.477 -Dpackaging=jar -Dfile=rideau.jar

Now it is likely that you will end up needing the data visualization libraries, so do the following.

cd to the flex frameworks dir flex-sdk-3.0.0/frameworks/libs and run the following commands:

mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=datavisualization -Dversion=3.0.0.477 -Dpackaging=swc -Dfile=datavisualization.swc

then cd to the flex locale dir flex-sdk-3.0.0/frameworks/locale/en_US and run the following commands:

mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=datavisualization -Dversion=3.0.0.477 -Dclassifier=en_US -Dpackaging=swc -Dfile=datavisualization_rb.swc

Now you are all set to run the flex compiler on your project! I have put a sample pom file here.

Here are a couple of tips to setting up your compile process:

1 – To configure all the different options of the compiler find the option you need on this page and then in your pom add it to the build -> plugins -> plugin (flex-compiler-mojo) -> configuration. For example I set the name of the sourceFile in there.

2 – To add library dependencies, for example swc libraries first add them to your repository. For example to use the flexlib files use the following command similar to this :

mvn install:install-file -DgroupId=com.googlecode.flexlib -DartifactId=flexlib -Dversion=2.4 -Dpackaging=swc -Dfile=flexlib.swc

Then add a dependency tag to your pom. In the sample it is the dependency with the flexlib artifact id.

The types can be one of the following:

external to -compiler.external-library-path

internal to -compiler.include-libraries

merged to -compiler.library-path

rsl to -runtime-shared-library-path for SWF files

caching to -runtime-shared-library-path for SWZ files

test to -compiler.library-path only for test running

Good luck!

Ryan Knight flex