Using the Flash Builder 4 Data Centric Features with Parsley (and other frameworks)

I have blogged about the new data-centric features in Flash Builder 4 here and here. One question people often ask me is: “Can I use this feature if I use a Framework (Cairngorm, Mate, Parsley, Spring ActionScript, Swiz, etc)?”

The answer is yes: The classes generated by Flash Builder (Value Objects and Service Stubs) are standard building blocks that are part of most RIA design patterns, regardless of whether or not you use a framework.

The way you leverage these classes in your application may differ slightly depending on the framework you are using. For example, each framework may have a different approach to configure service endpoints or to instantiate generated service stubs.

To demonstrate this, I built a version of my “Contacts” application (also known as InSync) using the Flash Builder 4 data-centric features and the Parsley Framework.

[Read more...]

Trader Desktop Performance Console: Fix, Source Code, and Fast DataGrid

I fixed a problem in the Trader Desktop Performance console I posted last week: Using the AIR client and the RTMP channel, the message latency started to increase when the application was deactivated (lost focus)… Background: When an AIR application loses focus, the AIR 2 runtime lowers the frame rate of the application to a smaller value to prevent the application from using unnecessary CPU resources if it’s running in the background. Because of the current dependency between frame rate and RTMP message processing, this behavior is not appropriate for our Trader Desktop application when using an RTMP channel, because it would significantly reduce the number of real time messages the application can handle. This would lead to a rapidly growing queue of messages waiting to be processed, and the message latency growing out of control. The fix is to force a higher frame rate on the “deactivate” event of the WindowedApplication.

[Read more...]

Performance Tuning: Real Time Trader Desktop with Flex and LCDS

In the last few months, I’ve seen an explosion in the number of Financial Services firms interested in building Real Time Trader Desktop applications using Flex and LiveCycle Data Services.

The new Quality of Service features available in LCDS 3.x (guaranteed message delivery, message throttling, etc) have contributed to this intensified interest. But for many real time applications, performance is what matters most. So, in addition to adding and improving features, we also spent a lot of time running benchmarks and optimizing performance. Damon has been blogging about this recently. The tests he describes are mostly “server-focused”. They answer the question: How many messages per second can the server push to how many clients with what latency? In one of the scenarios tested, the answer was a total of 400,000 messages per second spread over 500 clients with an average latency of 15 milliseconds.

Another more “client-focused” question customers have asked me is: How many messages per second can one client consume and render with what latency? To answer that question, I built my own Performance Console and feed generator.


[Read more...]

Speaking at Skills Matter in London this Thursday Night (Free Event)

I’m in London this week and will make a stop at Skills Matter on Thursday for a free event at 6:30pm… I’ll be presenting on Flex 4, Flash Builder 4, Flash Catalyst, LCDS 3.1, Mosaic, etc. More info here. No, I didn’t come up with the title of the session :)

I hope to see you there if you live in the area.

Video: Using the Flash Builder 4 Data Wizards with BlazeDS 4

In this video, I demonstrate how to build Flex 4 applications with a Java back-end using the new “Data-Centric Development” features of Flash Builder 4 (including service introspection, value object and service stub generation, etc).

If you want to try it yourself, the environment I used for the demo is part of a new Test Drive I put together to allow you to get started quickly with Flex 4, Flash Builder 4 and Java. The Test Drive environment consists of a minimal version of Tomcat with BlazeDS 4 preconfigured to work with the Flash Builder 4 data centric features and a sample application. You can download the Test Drive here.

Flex 4 Sample Application using a Java Back-End, BlazeDS 4 and Flash Builder 4 Data Wizards

I put together a new Test Drive environment to allow you to explore the development of Flex 4 applications with a Java back-end using the new “Data-Centric Development” features of Flash Builder 4. These features include service introspection, value object and service stub generation, etc. This Test Drive is still work in progress: it currently consists of a single application called InSync (a complete Flex 4 rewrite of my contact management sample application), but I think it’s already valuable to understand the impact of the new Flash Builder 4 data features. Insync also demonstrates some of the new features of Flex 4: skinning, skinnable components, layout managers, etc.

Watch the video below to get familiar with the Test Drive environment and the sample application:

Installation Instructions

  1. Download flex-java-testdrive.zip, and unzip the file in your root directory.
  2. Open a Command Window or Shell, navigate to /flex-java-testdrive/tomcat/bin, and start Tomcat (for instance: catalina run).
  3. Open a browser and access http://localhost:8400/testdrive/InSync/InSync.html.

Importing the projects in Flash Builder 4

  1. In Flash Builder 4, click File > Import > General > Existing Projects into Workspace.
  2. Specify flex-java-testdrive/projects as the root directory and click finish.
  3. Explore the projects: InSync is the Flex project and java-testdrive is the Java project for the server-side classes.

In the InSync project, the classes in the services and valueObjects packages have been generated automatically by Flash Builder 4. My next blog post will show you how to generate these classes based on existing Java services deployed in BlazeDS.

NOTE: Because BlazeDS 4 hasn’t yet been released, this version of the Test Drive uses a nightly build of BlazeDS 4.

New Flex 4 / Spring Integration Article

Along with the new Spring / BlazeDS Test Drive, I also updated my Flex / Spring integration article for Flex 4. It also reflects the changes in the latest version of the Spring / BlazeDS Integration Project (version 1.0.3).

The article is available here. Check it out… Flex + Spring is really a great platform to build Rich Internet Applications.

New Spring / BlazeDS Test Drive Available: Flex 4, BlazeDS 4, and Spring / BlazeDS Integration 1.0.3

For the Flex 4 launch, I created a new version of the Spring / BlazeDS Test Drive. All the sample applications are now built with Flex 4.

By popular demand, I also recreated an out-of-the-box “Test Drive Server”. This new Test Drive Server consists of a minimal version of Tomcat with BlazeDS 4 and the “Spring / BlazeDS integration 1.03” preconfigured and ready to use. It also includes a series of samples running “out-of-the-box” that should allow you to get up and running integrating Flex with Spring in minutes.

The Test Drive Server is using BlazeDS 4 because BlazeDS 4 allows you to use the new data centric development features of Flash Builder 4. Specifically, Flash Builder 4 can introspect Java remote destinations configured in BlazeDS 4 and generate corresponding ActionScript value objects and service stubs. I’ll blog more about this soon. Since BlazeDS 4 hasn’t yet been released, this version of the Test Drive uses a nightly build of BlazeDS 4.

You can access the Test Drive here. All the Flash Builder 4 projects are provided.

To learn more about the Spring / BlazeDS Integration project, visit the project home page on springsource.org.

Flex 4 and Flash Builder 4 Released!

Flex 4 and Flash Builder (previously known as Flex Builder) 4 have been released.

You can download the products here.

Also check out the brand new flex.org, and the reorganized Tour de Flex with a lot of new Flex 4 samples.

In addition to the new Spark component model which enables a new level of collaboration between Designers and Developers, there are many other new features worth exploring. For example, the data-centric development features – including services introspection, value objects and service stubs generation – are really compelling. There is a lot of great content on DevNet to learn more about this exciting release.

Enjoy!

FlexStore Revisited: Building an Animated Spark Layout

Six years ago, I wrote the FlexStore sample application for Flex 1.0 (code name Royale at the time). The original version is still running here and shows the progress we have made in six years! Two years later, I rewrote the application for Flex 2. One major difference in the Flex 2 version was that the product Tile List was animated to visually represent the items being filtered out or filtered back in. The animations were helpful, but I was never too happy with the code: the layout animation logic was tightly coupled to the container logic and therefore wasn’t very reusable.

In Flex 4, the new Spark component architecture cleanly separates containers from their layouts: You declare a container and plug a layout into it. You can use existing Layout classes (VerticalLayout, HorizontalLayout, TileLayout, LayoutBase), or create your own custom layout classes. So, I thought it would be nice to revisit the AnimatedList component I had written for the FlexStore 2 and take advantage of this new architecture. I created a custom layout class called “FilteredTileLayout” that you can plug in Flex 4 list classes. i.e. List or DataGroup.

[Read more...]