2008-11-18

MAX Day 2: Quake in FP, client side data services and Flex for Visual Studio

Just sat in the Tuesday keynote and there have been numerous interesting info to come out. Here they are in no particuliar order:

  • Project Alchemy: is a toolset that allows you to convert C/C++ code to AS3 and then run in Flash Player or AIR (they showed C encryption library, Quake and Mario bros running!)
  • Coldfusion Bolt: an eclipse based IDE for next version of ColdFusion (codenamed Centaur)
  • Flex Builder 4: you can easily auto connect to server-side data, includes a network monitor and finally has client side data services (commit/rollback functionality)
  • Visual Studio 2008: now supports Flex development (no details)...also native AMF support in .NET is coming

2008-11-17

Thermo now Flash Catalyst

The product known up to this point as Thermo, the designer centric tool that generates Flex code, now has the official name of Flash Catalyst. You can view some information about it at the Adobe labs and a beta will be available sometime next year. It still has a way to go, but it looks very promising. They were actually handing out a preview build at one of the sessions here at MAX, for MAC only however.

AIR Unleashed available at MAX Store

The book I helped co-write "AIR Unleashed" is available at MAX Store for those that are at the conference, so I obviously recommend you checking it out :) We did the book signing today right in front of the store, but wasn't able to blog about it until now due to the wireless connection issues!

2008-11-10

MAX 2008 just around the corner

Yup, only 6 days left till MAX 2008 North America starts and I am excited! There are still some spaces left, so those of you still thinking about it, don't waste anymore time, go to the MAX site and register now! For those that have never been before, you will definitely learn something you didn't know from the various sessions; the General Sessions offer exciting sneak peaks into the future of Adobe products and recently they posted the list of Bird of a Feather (BoF) sessions. The BoF sessions are were you get a chance to meet the Flex and AIR teams and much more :)

Also, the MAX 2008 site now contains a list of the MAX Awards finalists (I had the honor of being one back in 2004) and althought I'll wait till the conference to see them in action, I found this preview of one of them, the Car Diagnostic AIR application, pretty cool.

Enjoy!

2008-10-15

Going to MAX 2008 in San Francisco

Well good news today from my manager, I am going to MAX 2008 in San Francisco! Already registered, just have to pick my sessions now, which I will do in the coming days and hopefully I can book a trip to Alcatraz as well :)

2008-10-14

Single Sign On (SSO) with Flex in J2EE container

I've saw this question asked a couple times about a month ago and I tried to answer the question but thought it best to create an example. The question is, how do you prevent a Flex application from showing the login page after the user hit F5 in the browser (or refresh for that matter), after he/she just logged in.

So the main question here is how do you know someone has logged in successfully and don't need to present them with a login view. This is also how to handle the Single Sign On (SSO) case, where you know the user has authenticated himself successfully under host.com/app1 context but is now at your Flex application under the host.com/app2 context and you don't want him to have to re-authenticate himself. Of course we talking here about a Java back-end, so either using BlazeDS or LiveCycle Data Services.

So in my example I used BlazeDS and assuming you configured the security properly, a typical Flex application will display a login view to the user before they can do anything. But if the user has already been authenticated in this web context or another context on the same server, how do we prevent this default behavior? Here is how I do it in some simple words.

When the LoginView initializes, call the server to load the user's information (you will most likely need it at some point anyways). If you get a success response, you have the data and it means the user is already authenticated, so broadcast the LoginSuccessEvent event and you are done! The application will now display its main content. If you get an error response, the most likely cause is that the user is not authenticated and you should remain at the LoginView. It could also mean there is some server-side error (like config issue) which your technical department will have to look into.

If you do have to present the user with the LoginView, then once they click on the Login button, call the setCredentials() method of your RemoteObject and then make the same call to load the user's information.

But there is no better way to see this than to look at an example. So I recommend you download my example using the link below and take a look at the LoginView.mxml file where most of the work is done. The example deploys easily into Tomcat, so I recommend reading the readme.txt file contained within the archive for some installation details. The complete source is included as well.

You can download my example from here. Enjoy!

2008-10-12

AIR error 3122 and 3125

Was just working earlier this week on a little AIR application for my own use and I got stumped at one point while using it. The AIR application makes use of the local database and I was unable to update a record; I was repeatedly getting error 3122 during the save operation. After looking up the error description I figured out it was because the database file was read-only. It was because the file was in the application directory, also note this is on Windows Vista (I don't need to tell you about UAC!). I made the file modifiable, but now was getting error 3125. Error 3125 states that the OS simply won't let you update the DB in any way, and I figured it was Vista not letting me do the update. So I moved the file to my documents directory and it worked fine.

So be careful during an installation of a mission critical AIR application, make sure you place your database file somewhere where it can be worked with; either in the user's document directory or in the application storage directory. Especially important on Windows Vista.