Cairngorm Enterprise

Bugquash Application

Bugquash Application

When creating the BugQuash application we knew right from the beginning that we were going to be using LCDS right from the beginning to handle all of our data persistence. When you use Cairngorm 2 with LCDS it is best to use the CairngormEnterprise build. Have you ever tried to find information online about how this all works? No? I did and there isn’t much out there. I played around with it and figured out why. It is dirt simple. However it is still nice to get some information on how to use it right?

Here it is.

My First Mistake
You may guess that you use the Cairngorm SWC for normal applications and the Cairngorm Enterprise SWC for applications that use LCDS right? I did. And that was my first mistake.
You actually use both of the SWCs in your library folder together. The base Cairngorm SWC provides the majority of the Cairngorm framework. And the CairngormEnterprise SWC gives you additional functionality to connect to a data service.

Continuing With Your Development
Knowing that 99% of your application is the same Cairngorm framework that you are already used to developing for you now know that your application really hasn’t changed. Except now you have a new ServiceLocator, a singleton class called EnterpriseServiceLocator. This is what you are going to use for your services base and where you will put your LCDS services.

To get services from this class your just need to use the following line and connect right up to your data service.

1
var dataService:DataService = EnterpriseServiceLocator.getInstance().getDataService("yourDataService");

Now you have a reference to your data service and your application development can keep going. Easy enough!

  • Share/Bookmark

Comments (1)

[...] When creating the BugQuash application we knew right from the beginning that we were going to be using LCDS right from the beginning to handle all of our. See the rest here: Cairngorm Enterprise | The World In A State of Flex [...]

Leave a comment

Your comment