Cairngorm 2 Flex Library Project

Earlier this week Steven Webster announced a new release of Cairngorm 2 for the public release of Flex 2 Beta 3. As Steven said there is very little change and the migration involved little effort. The one thing I have done though is to move Caringorm 2 in to a Flex Library Project.

Before I say any more on the Flex Library Project and wanted to mention some work I have being doing over and above Cairngorm 2. I have extended ServiceLocator to provide a SecureServiceLocator that supports server-side security. The SecureServiceLocator allows you to set a user’s credentials on a service(s), which will be used by the server to authenticate the user. The SecureServiceLocator also allow you to log out a user. I have a simple Custom Login example that I will blog about in the future that demonstrates how you use a custom login form in Flex and how you use the SecureServiceLocator to set the user’s credentials. On the server, you configure a security constrait and the Web container will authenticate the user against a back-end user store. This integrates you directly in to the J2EE-security model, which allows you to identify the user on the server and to authorize user operations. For example, if your business logic is maintained in Stateless Session Beans (SLSBs) you can have the EJB container authorize user operations, which can help protect your application against malicious attacks. The SecureServiceLocator is not currently part of Cairngorm 2, but I hope it will be in the future.

To use the Cairngorm 2 Flex Library Project follow these steps:

  • Extract the ZIP file into your Flex Builder/Eclipse workspace.
  • In Flex Builder/Eclipse select File > Import and follow the Existing Projects into Workspace wizard.

If you build the project it will create a Cairngorm SWC in the bin folder, which you can then copy in to your Flex Project. Alternatively you can add the Project itself to the library path of a Flex Project.