Sneak Peek of the New Flex/Spring Integration at FlexCamp Boston Tomorrow

FlexCamp Boston is tomorrow at the Bentley College. You can still register online, and you will also be able to register on site.

In addition to demonstrating Model Driven Development in Flex using Flex Builder 4 and LCDS “Next”, I will also “sneak peek” the new Spring integration announced earlier this week in collaboration with SpringSource.

Hope to see you there.
Christophe

Adobe Collaborates with SpringSource for Enhanced Flex / Spring Integration

I have written several times about the Flex / Spring integration on this blog. Now things are about to get even simpler and more integrated. This is very exciting news!

From the press release:

Adobe Systems Incorporated today announced that it is working with SpringSource to simplify the development and deployment of rich enterprise Java(TM) applications through a collaboration that will provide integration between the Adobe(R) Flash(R) and SpringSource platforms. This collaboration will make it easy for Java developers to create enterprise-class rich Internet applications (RIAs) using Adobe Flex(R) software, a cornerstone of the Adobe Flash Platform, and Spring, the de facto standard for enterprise Java.

With support from Adobe, SpringSource is introducing Spring BlazeDS Integration, a new open source project to provide tight integration between Spring and BlazeDS, Adobe’s open source server-based Java remoting and Web messaging technology. A beta version of the Spring BlazeDS Integration will be available from SpringSource in mid-December.
Also in development for early next year is the SpringSource Adapter for Adobe(R) LiveCycle(R) Data Services ES(TM) which will provide integration with Adobe LiveCycle Data Services ES, enabling the creation of server push-based applications based on Adobe Flex for real-time and near real-time solutions.

Read the press release here or here

“Model Driven Development using Flex and LCDS Next” at FlexCamp Boston on Dec 12th

If you are not attending MAX Europe in Milan this week, I will present my “Model Driven Development using Flex Builder 4 and LCDS Next” session at FlexCamp Boston on December 12th as well. Hope to see you there!

MAX Europe New Session: Model Driven Development using Flex Builder 4 and LCDS Next

We just added a new session (not in the printed agenda) to talk about a brand new feature the LCDS and Flex Builder teams are working on…

Session details:
“Model Driven Development using Flex Builder 4 and LCDS Next”.
Wednesday, December 3, 1:30 pm - 2:30 pm, Yellow 2

In this session we take a Sneak Peek at a new and exciting feature in Flex Builder 4 and LiveCycle Data Services “Next”. Using the combination of these two products, you will be able to build data-driven applications using a Model-Driven Development approach. In other words, you don’t have to write any server-side code: the data access logic is derived from a simple data model that is easily created and updated using new tooling in Flex Builder 4. This solution is designed to work for simple and very complex applications.

I hope to see you there!
Christophe

Using the SQLite Database Access API in AIR… Part 3: Annotation-Based ORM Framework

In the second version of our contact management application, we encapsulated the data access logic for the Contact entity in a Data Access Object (ContactDAO). This separation of concerns represented a major improvement compared to our first approach. The remaining limitation we identified was the amount of SQL we had to write “manually”.

In this third version, we use a mini Object Relational Mapping (ORM) framework that leverages the Flex support for class annotations to entirely eliminate manually-written SQL statements.
Read more

Using the SQLite Database Access API in AIR… Part 2: Using the DAO Pattern

The first version of our contact management application introduced us to the database access API in AIR. However, the lack of “application partitioning” or “separation of concerns” in that first implementation represented a poor architecture with no potential for reusability.

In this second version, we use the Data Access Object pattern to improve the overall architecture of our application. A Data Access Object typically encapsulates the data access logic for one entity (in this case: Contact).

An interface (named IContactDAO) defines the “contract”:

package
{
	import flash.utils.ByteArray;
	import mx.collections.ArrayCollection;

	public interface IContactDAO
	{
		function findAll():ArrayCollection;

		function insert(contact:Object):void;

		function update(contact:Object):void;

		function updatePicture(contactId:int, jpeg:ByteArray):void;

		function deleteItem(contact:Object):void;
	}
}

The ContactDAO class implements that interface and provides one specific implementation of the contract (persisting data to the embedded SQLite database).

Benefits:

Install inSync Local DAO Edition:

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.


Click here to download the source code. You can also right-click the app and select View Source to view the source code and download the application.

Limitation:

There is still a lot of SQL code to write. There are a few options to overcome that limitation:

In part 3, we’ll look at a version of inSync built with an annotation-based ORM framework.

Using the SQLite Database Access API in AIR… Part 1

In my MAX session called “Liberate your Data with AIR”, I presented different approaches to access local data using the SQLite database access API in AIR.

The list of approaches included:

  1. “SQL in View”
  2. Data Access Object (DAO) pattern
  3. Using an Object Relational Mapping (ORM) framework

I demonstrated a version of inSync (a simple contact management application) built with each of these approaches. I’m dedicating one blog post to each approach. This first post is focused on the “SQL in View” approach. To spice things up just a little bit, inSync also demosntrates how to take a picture of a contact using your webcam and store it in the SQLite database as a blob.

Install inSync Local SQL Edition:

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.


NOTE: this application uses the same skin and overall context as a sample I posted previously to illustrate offline data synchronization using LCDS, but the implementation is entirely different: No LCDS here… just local data access.

Click here to download the source code. You can also right-click the app and select View Source to view the source code and download the application.

Using the “SQL in View” approach, you embed SQL statements as needed in View components. In this example the ContactForm component has create, update, and delete methods with the appropriate embedded SQL statements to insert, update, and delete a contact in the database. This approach works for quick prototyping, but is generally a bad practice. When you mix view logic and data access logic in the same component, neither the view logic, nor the data access logic is reusable: you can’t reuse the view with a different way to access your data, and you can’t reuse your data access logic with a different view.

I provide this approach here as a quick way to get acquainted with the database access API in AIR. For real life implementations, a more partitioned approach such as the DAO pattern or an ORM framework is of course highly recommended. Stay tuned for an example of approaches 2 and 3.

My MAX LCDS/BlazeDS Sessions Materials Available

Many of you have asked me for the materials I used in my LCDS/BlazeDS hands-on sessions at MAX.

Here are the links:

If you didn’t have a chance to attend, you should be able to use this as a BlazeDS/LCDS tutorial as well.

It was great to see all of you at MAX. I hope to see you next year in Los Angeles.

Christophe

Salesbuilder 1.5 with new AIR 1.5 Database Encryption

As you probably already know, AIR 1.5 is now available. New features include database encryption, Flash Player 10 support, and an updated version of WebKit.

I updated my Salesbuilder sample application to leverage the AIR 1.5 capabilities. Salesbuilder 1.5 leverages the new database encryption feature to allow you to secure your local database.

The first time you start Salesbuilder, the application will generate the encrypted database on your local file system. Salesbuilder implements the key generation approach described in the section Using encryption with SQL databases in the manual Developing Adobe AIR Applications. The encryption key is based on a password provided by you and a SALT generated by the system.

You can install the new version and download the source code here.

A basic script explaining how to use the application is available here.

Sneak Peek of LiveCycle Data Services “Next” Tomorrow at MAX

I will demonstrate some new and really exciting features of LiveCycle Data Services “Next” tomorrow (Monday), as part of my session called “Introduction to BlazeDS and LiveCycle Data Services ES”. I hope to see you there if you are interested in Data Services for Flex.

Introduction to BlazeDS and LiveCycle Data Services ES
Moscone West 2007
5:00pm to 6:00pm

Next Page →