Showing posts with label Cairngorm. Show all posts
Showing posts with label Cairngorm. Show all posts

Thursday, August 07, 2008

Cairngorm : Makes a few announcements

There has been no shortage of discussion about Cairngorm over the last twelve months. In particular there has been a lot of discussion comparing Cairngorm with the other Flex frameworks that have been, and continue to emerge. But there has been surprisingly few announcements from the Cairngorm team. That all changed yesterday with a lengthy posting by both Alistair Mcleod and Steven Webster. The raw essence of both of these posts is that Cairngorm public face has moved to Adobe Open Source with all the support features that entails (community forums, source code available in a subversion repository, a JIRA bugbase for logging bugs and feature requests). There was also mention of plans for Cairngorm 3 but there were no hints ta how far away that might be. What was most interesting was that both posts read almost like a manifesto, a statement of their philosophy. At no point did they directly respond to Cairngorms quite vocal critics but there were a number of assertion of principles that indirectly dealt with some of these criticisms. The following comment from Steven Webster is quite telling :

"Blog posts that " is evil", " is bad", " sucks" certainly catch a great deal of fleeting attention, but I don't believe that investing our limited time and energy in these debates is the most effective way of advancing the state of our art."

Some other quotes of interest :

Alistair McLeod :

"At Adobe Consulting, we've always had a minimalist approach to Cairngorm; we don't want to add feature for feature sake, add functionality that doesn't belong within an architectural framework, or introduce another design pattern into the mix because it's the latest fad in the software industry. The framework is there to allow us to build well-architected software solutions, and we've only ever added features we truly believe helps us do that."

Steven Webster:

"We have no desire to convolute the framework, to introduce abstraction, or to discourage the use of idioms or techniques specific to Flex, in order that we might create applications that could be ported to other presentation-tier technologies."

"We wish for Cairngorm to encourage best-practice leverage of underlying Flex features, and we are keen to ensure that we never add something to Cairngorm that is better suited to the underlying Flex SDK."

"One of the things we'll look to lock down as we go forward from here, is a simple charter by which we measure suggestions; this has been very implicit and shared understanding amongst the Adobe Consulting team, but we need to document and agree this with the community as we go forward. But in essence, it's as important to decide what Cairngorm is, as well as what it isn't, both now and in the future."

Wednesday, July 23, 2008

Frameworks : Cairngorn, Mate, Swiz & Gaia

Just a quick post to share a couple of useful and interesting recent posts relating to Flex Frameworks. First up Andrew Powell has written a big picture overview comparing Cairngorn, Mate and Swiz. He notes :

"I think that Cairngorm will make more sense to developers coming from the Java world. Developers coming to Flex from ColdFusion would probably be much more comfortable in Mate, due to its tag-based nature. Does this mean that any one is more right for you than another? No. As with anything else in this field, it depends on the task, the developer's skill and comfort levels with different technologies, and the time you have to learn something new."

Secondly, "calm in the chaos" has written a few insights into their experience using Gaia. At one points he says :

"In essence it’s a Framework that takes a lot of the leg work out of creating page based Flash sites. By Page based I mean sites that have a fairly standard navigation hierarchy. It can be used for more complex projects, though I found I struggled against the Framework more than it helped me some of the time."

Tuesday, April 15, 2008

Talking about Cairngorm

There is a lot of informed and intelligent debate around Cairngorm and it's dependance on "Singletons". We have been using Cairngorm for the last six months and while we are aware of it's faults we also feel that it offers many benefits. It's not my intention here to get involved in an argument about it's strengths and weaknesses, I've made a few posts touching on this already. Instead I want to use this post to collect some of the better posts on this topic:

Blogged with the Flock Browser

Tuesday, October 30, 2007

Cairngorm vs PureMVC : a quick comparison

After watching Ali Mills and Luke Bayes presentation comparing the available Flex Frameworks I decided it was time to have a much closer look at PureMVC. After spending some time getting familiar with PureMVC it is hard to argue with their conclusion that PureMVC does a better job of solving many of the potential problems of using an MVC pattern. PureMVC is less dependant on Singletons, individual components are more reusable because they have fewer dependancies and there is less repeatition in setting up new functions within the framework. Despite all of these benefits I'm not convinced that this makes PureMVC a clear winner.

Towards the end of the Framework comparison presentation it is pointed out that Cairngorm is the framework that all Flex developers need to know. Well it would be nice if there were a few more developers in Melbourne who know Flex. Let alone developers with an understanding of Flex Frameworks. So the question I asked myself is if I had to train someone new next week who was unfamiliar with any Flex Frameworks which Framework would I want to teach them. The following table lists the concepts you need to understand for Cairngorm development compared to PureMVC. What is immediately evident is that there is a lot more to learn to get up to speed with PureMVC. To achieve a cleaner/purer framework PureMVC has added more complexity and this is a problem when you need to train people to use a Framework. When we started using Cairngorm it didn't take long to explain the basics of the Framework. But I think it would take a lot more explanation to get started on PureMVC despite the similarities in the two frameworks.


CairngormPureMVC
Model
View
Controller
Command
CairngormEvent
Delegate
Service
Model
View
Controller
Command
Facade
Proxy
Mediator
Observer
Notification

Friday, October 19, 2007

Flex Frameworks Reviewed

Just spent some time watching a presentation by Ali Mills and Luke Bayes which reviews the available Flex Frameworks. If you are looking for an up to date summary of the available Flex Frameworks you really can't go past this presentation. If I were to summarise their findings it's that most Frameworks are still too immature. The two exceptions they identified were Cairngorm and PureMVC. They felt that Cairngorm was too tightly coupled to it's Singleton's and that this made unit testing very problematic. In contrast they were very taken with PureMVC. They felt it was a more elegant solution despite it's use of Singleton's. If you are interested in Flex and Frameworks you should watch this very informative presentation.

Update : a post presentation debrief (with link to presentation) is available. The most interesting addition here for me is the following quote :

"Doug McCune brought up a really great point about Cairngorm. He mentioned that if you’re a contractor that is working on other people’s projects and going from client to client, the only framework that you must know is Cairngorm. He made the point that it’s the most likely Application Framework that you’ll encounter within the enterprise. We both agreed with that point, but added that you should investigate PureMVC as the very next step."

David Tucker : Getting Started with Cairngorm

We've adopted Cairngorm as our preferred framework for Flex development. Now we are up and running with it we are finding it clear and simple to use and that is starting to show real dividends in terms of speed, flexibility and reliability.

But we did find it quite hard to find a good starting point for getting up and running. Essentially we had to setup a few of the Cairngorm example apps (available from cairngormdocs), open all the files and flick backwards and forwards between them until it started to make sense. The good news for newbies is that a few brave souls have started posting getting started articles. The best of these so far is from David Tucker. I'll add links to the various parts as he adds them :

Wednesday, August 15, 2007

Flex Frameworks : Getting Started with Cairngorm

We've being looking for an appropriate Flex framework to use over the last few months. Adopting a framework has been on my mind since I started using Flex. But initially learning Flex offered a big enough learning curve and being the only Flex developer in the office made it less of an imperative. But earlier this year we appointed a new web developer and part of his job description was to become a Flex developer. He has just completed his first Flex project and we are about to start on a larger collaborative project. Consequently adopting a suitable framework became a higher priority.

I was aware of Cairngorm long before I did any Flex work. But everything I've read says it's not worth the effort for smaller projects and I guess I consider our projects quite small. But when I started looking around the alternative frameworks they either seemed a bit immature or nearly as complex as Cairngorm (but without a strong support community). Consequently we've decided to bite the bullet and use this smaller project as a good place to start learning Cairngorm. To test the idea I built a really small module based project using Cairngorm. The first day was like pulling teeth, but each day after that it became easier and easier. I think the hardest thing about getting started with Cairngorm is there is no obvious starting point. There is an excellent series of six articles written long ago that provide a great insight into the thinking behind Cairngorm and some examples of how things are done. But it doesn't really explain all the elements and how they relate to each other. There are also a number of example applications over at Cairngormdocs that I highly recommend. But looking through these examples involved a lot of opening files and trying to make sense of how the different bits relate to each other. In the end it seemed there were quite a few balls to juggle and so I put together a small document defining our project structure with some notes on how the bits relate. Below are some outtakes from that document that might help fellow Cairngorm newbies. Now keep in mind I'm still a newbie myself so I'm probably off on a few points (I'd appreciate anyone who knows better correcting my mistakes so I'm not spreading mis-information). Each point looks at a typical folder you'll need for a Cairngorm project and their purpose :

  • business : The business folder contains Services.mxml which defines all web service definitions (ie. HTTPService, remoteObject etc). Also add Delegate files here. Delgates initiate the service calls and listen and respond to results/faults.
  • command : Create a Command for each action. Commands are called from the Views in response to user interaction. They could update the model directly or use a Delegate to make a service request.
  • control : The Controller connects events to commands so that when the view dispatches an event through the CairngormEventDispatcher the relevant command is called. These connections are made using addCommand().
  • event : define the custom events (that the control connects to a command) that will be called by the view to trigger commands.
  • model : The Model stores all required state data. Bind views to the model properties so they reflect changes to the model. Update the model through commands or in response to Delegate results.
  • view : The basis for all views in our project will be modules and hence in same folder as the main application file. But it still makes sense to encapsulate many view functions within their own components. These should be stored here.
  • vo : Value Objects (vo's) represent more complex elements of the model. Store value object definitions here.

Wednesday, March 28, 2007

Flex : Depth & Breadth

This is a kind of follow up to my last post (Apollo : Too Simple). In that post I was saying the difficult part about learning Apollo is learning Flex. But this sort of misrepresents my attitude towards Flex. On the way to work this morning I was rummaging under the Cairngorm bonnet (as a consequence of Robin Hilliard's excellent MVC session at webDu ) and I found myself awed by some of the powerful Flex techniques Cairngorm uses. It made me really appreciate the depth of what Flex offers. But then I started to reflect on the things I've been able to build with Flex without this deep knowledge. The great thing about Flex is that it has a gentle learning curve. It allows you to very quickly start to develop powerful GUI's with a very shallow understanding of the framework. It's this combination of depth and breadth that continues to fuel my excitement for Flex.