The new me…

July 29, 2008

Ok, so it’s been a while. I’m sorry to those that were waiting for the cairngorm module examples. I don’t have a lot of time lately and I don’t use cairngorm so much now.

I hope to blog a bit more often now that I have a worspress app for my new iPhone 3G. I will be discussing the MVP pattern in my next few blogs and I will be doing a cairngorm compare and contrast.

If anyone still wants to see some cairngorm module code, let me know.

photo

Cairngorm Modularity…

December 7, 2007

Using modules in Flex isn’t all that difficult to understand. But as I have read on many a blog, using Cairngorm with modules is giving people fits. Well, not me…

You use modules so that you can load a portion of your application (functional or visual) and unload it independent of the main application. You do this (using Flex Builder) by extending mx.modules.Module either in a different project or the same, making sure your component is registered as an application in the properties. This Module Component then can be loaded into your main application (shell app) by use of the ModuleLoader class. Simply set the attribute ‘url’ on the ModuleLoader (which is a DisplayObject) and YourModuleLoaderID.loadModule() and YourModuleLoaderID.unloadModule(). If the module is a visual component it will be loaded wherever you place it. Likewise you can place a non visual module anywhere and reference it by id. This is where the difficulty starts.

Now that you have a loaded module, unless it’s a trivial thing, you are going to want to interact with it. With Cairngorm this is very interesting. All sorts of things can happen when you get an application running with the FrontController and ServiceLocator patterns then you just up and load an entirely autonomous Cairngorm implementation in the same player. So don’t. The interaction between module and shell application is communicated by implementing interfaces. If you are going to be using Cairngorm in the base or shell app, then you need to use IoC (inversion of control) to plug a Cairngorm based module into the shell. Specifically, your module will more then likely be using the FrontController to register events/command pairs and it will need to use the shell app’s ServiceLocator to access services. You can easily create an interface that allows you to pass these two items to the module being loaded and if your like me, you can even extend the Module component to make a lot of things happen in the background.

Read the rest of this entry »

What does Cairngorm do?

October 5, 2007

If you use Flex, then Cairngorm makes your life easier. Cairngorm makes your Flex programming more responsible, easier to maintain and extend and it promotes more efficient teamwork.

But what does it do?

Well, Cairngorm is a library (a compiled flash swf) of classes and interfaces that are plumbed together to allow the programmer to plug-in commands (control logic) and interfaces (views) in an easy, efficient manner. By using Cairngorm you are leveraging hundreds of thousands of hours of developer time figuring out what patterns work best for enterprise applications. The Adobe team used guidelines from the J2EE Enterprise Design Pattern catalog to create a very powerful framework (some say micro-architecture) for Flex distributed applications. This framework is logical so it is easy to learn and more importantly easy to teach.

Cairngorm in the work place: A trilogoy – in four parts… Read the rest of this entry »

A general introduction: The Session Facade enterprise design pattern allows you to create a clean, well-defined interface to complex and/or composited business objects. The Service Locator is an object that gives you a one-stop shop for all your service needs. It holds a reference to all of your services whether they are Remoting, web services, http service calls or other external resources. The Business Delegate is a layer of separation between the Service Locator and the control (command) code, which is very helpful in Flex as it’s an excellent place to setup your responders to the asynchronous calls that you will make and handle service problems.

Facades

The Facade pattern is widely used and usually without notice… Read the rest of this entry »

:: guest.booq 1.5 ::

September 20, 2007

:: guest.booq 1.5 :: With a lot more meat to it, here is the next iteration in the guest.booq series. I will be blogging about the methodology as time permits… hopefully someone enjoys.

:: guest.booq ::

September 16, 2007

Ok, so I’m just spicing up a lame name with punctuation (that’s always a bad sign) but I wanted a little more then a hello world type application.

: guest.booq : here it is. This is about the most simple application using Cairngorm you will probably find. There are no fancy effects or transitions and the form isn’t saving to the database yet, but I wanted to get a simple listing/drill-down project up for preview. In the coming days I’m going to add functionality to this same interface to show you how easy it is to extend and alter with Flex and ColdFusion.

Some things to note: The View is being controlled by a ViewModel and the fields are bound to data model objects in the ModelLocator (another solid denterprise design pattern) . The Services are registered as RemoteObjects in the Services.MXML a very clever implementation of the ServiceLocator design pattern offered by Cairngorm.

I hope to get the users editable in a day or so (possibly changing jobs so I’m sorry if it takes longer). Eventually I hope to consume some third-party services, get some Stock Ticking maybe weather, Account management, usage tracking… all kinds of high-hopes for this little jewel!

When will I ever get to Flex?

September 1, 2007

I’m working on it… I want to cover these other important issues about application development before I drop the bomb. And it is… The Bomb…

The Cairngorm Framework…

August 15, 2007

Cairngorm – If you are using Flex without it for anything more than a very simple application, please give it a try.

There are many who will state that there is no reason to code so many pieces to get a small application up and running. I believe that if you aren’t creating applications that will grow then you are fine to be in that camp. I hardly ever work on applications, even for my own personal use, that are small enough that they don’t grow. The growth of an application gets exponentially more difficult (time-consuming, error-prone) as you repair and extend the application over a long period of time especially if you are working on more than one project. The smaller and more defined (with a socially accepted convention) the chunks of your applications, in a team or alone, the easier it is to step into a project and know right were to go. I often still get a laugh when I go into a large project (Flex or otherwise) to fix or add a small feature and can wrap the task up (and test) in a half-hour. Because the structure is so second nature, the application tells me where to go to make the change. And this is true of any application where you effectively employ good design patterns.

There are some key Design Patterns, most of which can be found here J2EE Design Patters . Some you may be using and not even know the name. I hope to blog soon about some specific implementations using ColdFusion and Flex in the near future.

Bloging about Flex…

August 12, 2007

For the most part I intend to use this blog to tout the power, elegance and simplicity of Flex. I will undoubtedly spend a great deal of time discussing ColdFusion, J2EE Design Patterns, and Cairngorm – why they are an important part of my development and what they can mean to you. RIAs (Rich Internet Applications) are becoming a big thing both in the browser and on the desktop, and I hope to learn a lot and educated some on the richness of the king of the Rich Internet Application technologies Flex.

Flex, ColdFusion and Flash Remoting make the job so simple. Really, when you are setting out to prototype you can’t beat Flex Builder for pulling together a great looking mockup that you will more than likely be able to use all the way to production. The ability to get designers and developers (or those of us so endowed to do both equally well) using the same IDE for drawing an interface or scripting one together in xml (mxml) is a huge advantage in team work exchange.