Some Useful links for Cairngorm
Cairngorm overview and downlolad
http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm
Cairngorm forums
http://forums.adobe.com/community/opensource/cairngorm
About Cairngorm
Some Useful links for Cairngorm
Cairngorm overview and downlolad
http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm
Cairngorm forums
http://forums.adobe.com/community/opensource/cairngorm
About Cairngorm
The Cairngorm Plugin is an Eclipse plugin that augments Flex Builder to provide tooling that improves productivity when developing Cairngorm-based RIAs.
The initial focus of the Cairngorm Plugin is on the Controller. It aims to improve productivity by removing the repetitive action of creating a new Command and associated Event and adding them to the Controller.
It provides a new class wizard for the following Cairngorm artifacts:
The class templates used for the codegen are externalized and distributed with Cairngorm. This allows you to modify the templates to support your own code style.
To learn how to use the Cairngorm Plugin please see the Plugin Documentation.
The Cairngorm Plugin has been developed for Flex Builder 3. Please refer to the Flex Builder 3 system requirements.
Eclipse and Flex Builder
To install the Cairngorm Plugin you will need to have Eclipse and Flex Builder installed.
Firstly, you must install Eclipse. We recommend the Eclipse IDE for Java EE Developers package, which can be downloaded from here.
After you have Eclipse installed you must install the Flex Builder plugins, which can be downloaded from here.
If you are new to Eclipse and want to learn more please see the Eclipse “Getting Started” resources.
Cairngorm Plugin
The Cairngorm Plugin is installed from an Eclipse update site:
Cairngorm
This is a beta release to enable use of the Cairngorm Plugin. The SWC has been compiled with Flex 3, which required code changes that we have not yet focused on making backward compatible with Flex 2. It also contains a number of bug fixes (see the release notes for details). We can not guarantee that the final release of 2.2.2 will contain these bug fixes and we may decide to support backward compatibility with Flex 2. These decisions will not be made until the Cairngorm Committee has consulted with the community. At this time we do not recommend that you use this SWC in your projects. You can safely use the Cairngorm Plugin with the Cairngorm 2.2.1 SWC, which can be downloaded from here, it only requires the 2.2.2Codegen-beta distribution for the codegen templates that are packaged with Cairngorm.
This section introduces you to the event model in Flex 2. In addition, this section describes the Event object and its subclasses, and describes the event dispatching model. For a quick start in using events in Flex, you can skip this section and see sample code in Using events.
Events let a developer know when something happens within a Flex application. They can be generated by user devices, such as the mouse and keyboard, or other external input, such as the return of a web service call. Events are also triggered when changes happen in the appearance or life cycle of a component, such as the creation or destruction of a component or when the component is resized.
Any user interaction with your application can generate events. Events can also occur without any direct user interaction, such as when data finishes loading from a server or when an attached camera becomes active. You can “listen” for these events in your code by adding an event listener. Event listeners are the functions or methods that you write to respond to specific events. They are also sometimes referred to as event handlers.
The Flex event model is based on the Document Object Model (DOM) Level 3 Events Model. Although Flex does not adhere specifically to the Document Object Model standard, the implementations are very similar.
Components generate and dispatch events and consume (listen to) other events. An object that requires information about another object’s events registers a listener with that object. When an event occurs, the object dispatches the event to all registered listeners by calling a function that was requested during registration. To receive multiple events from the same object, you must register your listener for each event.
Components have built-in events that you can handle in ActionScript blocks in your MXML applications. You can also take advantage of the Flex event system’s dispatcher-listener model to define your own event listeners outside of your applications, and define which methods of your custom listeners will listen to certain events. You can register listeners with the target object so that when the target object dispatches an event, the listeners get called.
All visual objects, including Flex controls and containers, are subclasses of the DisplayObject class. They are in a tree of visible objects that make up your application. The root of the tree is the Stage. Below that is the SystemManager object, and then the Application object. Child containers and components are leaf nodes of the tree. That tree is known as the display list. An object on the display list is analogous to a node in the DOM hierarchical structure. The terms display list object and node are used interchangeably in this topic.
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000462.html
2000–2003: ActionScript “1.0″ With the release of Flash 5 in September 2000, the “actions” from Flash 4 were enhanced once more and named “ActionScript” for the first time.[2] This was the first version of ActionScript with influences from JavaScript and the ECMA-262 (Third Edition) standard, supporting the said standard’s object model and many of its core data types. Local variables may be declared with the var statement, and user-defined functions with parameter passing and return values can also be created. Notably, ActionScript could now also be typed with a text editor rather than being assembled by choosing actions from drop-down lists and dialog box controls. With the next release of its authoring tool, Flash MX, and its corresponding player, Flash Player 6, the language remained essentially unchanged; there were only minor changes, such as the addition of the switch statement and the “strict equality” (===) operator, which brought it closer to being ECMA-262-compliant. Two important features of ActionScript that distinguish it from later versions are its loose type system and its reliance on prototype-based inheritance. Loose typing refers to the ability of a variable to hold any type of data. This allows for rapid script development and is particularly well-suited for small-scale scripting projects. Prototype-based inheritance is the ActionScript 1.0 mechanism for code reuse and object-oriented programming. Instead of a class keyword that defines common characteristics of a class, ActionScript 1.0 uses a special object that serves as a “prototype” for a class of objects. All common characteristics of a class are defined in the class’s prototype object and every instance of that class contains a link to that prototype object.
2003–2006: ActionScript 2.0 The next major revision of the language, ActionScript 2.0, was introduced in September 2003 with the release of Flash MX 2004 and its corresponding player, Flash Player 7. In response to user demand for a language better equipped for larger and more complex applications, ActionScript 2.0 featured compile-time type checking and class-based syntax, such as the keywords class and extends. (While this allowed for a more flexible object-oriented programming approach, the code would still be compiled to ActionScript 1.0 bytecode, allowing it to be used on the preceding Flash Player 6 as well. In other words, the class-based inheritance syntax was a layer on top of the existing prototype-based system.) With ActionScript 2.0, developers could constrain variables to a specific type by adding a type annotation so that type mismatch errors could be found at compile-time. ActionScript 2.0 also introduced class-based inheritance syntax so that developers could create classes and interfaces, much as they would in class-based languages such as Java and C++. This version conformed partially to the ECMAScript Fourth Edition draft specification.
2006–today: ActionScript 3.0 In June 2006, ActionScript 3.0 debuted with Adobe Flex 2.0 and its corresponding player, Flash Player 9. ActionScript 3.0 was a fundamental restructuring of the language, so much so that it uses an entirely different virtual machine. Flash Player 9 contains two virtual machines, AVM1 for code written in ActionScript 1.0 and 2.0, and AVM2 for content written in ActionScript 3.0. ActionScript 3.0 provides not only a significant enhancement in performance, but also a more robust programming model that lends itself to complex Rich Internet Application development.
The update to the language introduced several new features:
ActionScript primarily consists of “fundamental” or “simple” data types which are used to create other data types. These data types are very similar to Java data types. Since ActionScript 3 was a complete rewrite of ActionScript 2, the data types and their inheritances have changed
ActionScript 2 top level data types
ActionScript 2 complex data types
There are additional “complex” data types. These are more processor and memory intensive and consist of many “simple” data types. For AS2, some these data types are:
ActionScript 3 top level data types (see Data type descriptions)
ActionScript 3 complex data types (see Data type descriptions)
ActionScript is a scripting language based on ECMAScript (Javascript), used primarily for the development of websites and software using the Adobe Flash Player platform (in the form of SWF files embedded into Web pages). Originally developed by Macromedia, the language is now owned by Adobe (which acquired Macromedia in 2005) which continues its development. ActionScript was initially designed for controlling simple 2D vector animations made in Adobe Flash (formerly Macromedia Flash). Later versions added functionality allowing for the creation of Web-based games and rich Internet applications with streaming media (such as video and audio).
ActionScript code is free form and thus may be created with whichever amount or style of whitespace that the author desires. The basic syntax is similar to the C++ programming language.
ActionScript 3.0 has a similar syntax to ActionScript 2.0 but different set of APIs for creating objects.
var greet:* = addChild(new TextField()); greet.text = "Hello world";
Minimal ActionScript 3.0 programs may be somewhat larger and more complicated due to the increased separation of the programming language and the Flash IDE.
Presume the following file to be Greeter.as:
package com.example { import flash.text.TextField; import flash.display.Sprite; public class Greeter extends Sprite { public function Greeter() { var txtHello:TextField = new TextField(); txtHello.text = "Hello World"; addChild(txtHello); } } }
Finally, an example of using ActionScript when developing Flex applications, again presuming the following content to be in a file named Greeter.as:
package { public class Greeter { public static function sayHello():String { var greet:String = "Hello, world!"; return greet; } } }
This code will work with the following MXML application file:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="vertical" creationComplete="initApp()"> <mx:Script> <![CDATA[[ public function initApp():void { // Prints our "Hello, world!" message into "mainTxt". mainTxt.text = Greeter.sayHello(); } ]]> </mx:Script> <mx:Label id="title" fontSize="24" fontStyle="bold" text="\"Hello, world!\" Example"/> <mx:TextArea id = "mainTxt" width="250"/> </mx:Application>
This Hello World example uses ActionScript 3.0:
package { import flash.display.Sprite; import flash.text.TextField; import flash.filters.DropShadowFilter; public class HelloWorld2 extends Sprite { public function HelloWorld2() { var shad:DropShadowFilter = new DropShadowFilter (2, 45, 0x000000, 25, 3, 3, 2, 2); var txt:TextField = new TextField(); txt.textColor = 0xFFFFFF; txt.filters = [shad]; txt.width = 200; txt.x = Math.random() * 300; txt.y = Math.random() * 300; txt.selectable = false; txt.text = "Hello World welcome! [" + Math.round(txt.x) + "," + Math.round(txt.y) + "]"; addChild(txt); } } }
Adobe Flex is a collection of technologies released by Adobe Systems for the development and deployment of cross platform, rich Internet applications based on the proprietary Adobe Flash platform. The initial release in March 2004 by Macromedia included a software development kit, an IDE, and a J2EE integration application known as Flex Data Services. Since Adobe acquired Macromedia in 2005, subsequent releases of Flex no longer require a license for Flex Data Services, which has become a separate product rebranded as LiveCycle Data Services.
In April 2007, Adobe announced plans to open source the Flex 3 SDK. Adobe Flash Player, the runtime on which Flex applications are viewed, and Flex Builder, the IDE used to build Flex applications, remain proprietary and commercial.
Traditional application programmers found it challenging to adapt to the animation metaphor upon which the Flash Platform was originally designed. Flex seeks to minimize this problem by providing a workflow and programming model that is familiar to these developers. MXML, an XML-based markup language, offers a way to quickly build and layout graphic user interfaces. Interactivity is achieved through the use of ActionScript, the core language of Flash Player that is based on the ECMAScript standard.
The Flex SDK comes with a set of user interface components including buttons, list boxes, trees, data grids, several text controls, and various layout containers. Charts and graphs are available as an add-on. Other features like web services, drag and drop, modal dialogs, animation effects, application states, form validation, and other interactions round out the application framework.
In a multi-tiered model, Flex applications serve as the presentation tier. Unlike page-based HTML applications, Flex applications provide a stateful client where significant changes to the view don’t require loading a new page. Similarly, Flex and Flash Player provide many useful ways to send and load data to and from server-side components without requiring the client to reload the view. Though this functionality offered advantages over HTML and JavaScript development in the past, the increased support for XMLHttpRequest in major browsers has made asynchronous data loading a common practice in HTML-based development too.
Technologies that are commonly compared to Flex include OpenLaszlo, Ajax, XUL, JavaFX and Windows Presentation Foundation .
| This article or section contains information about computer software currently in development. The content may change as the software development progresses. |
On April 26, 2007 Adobe announced their intent to release the Flex 3 SDK under the terms of the open source Mozilla Public License.
Adobe released the first beta of Flex 3, codenamed Moxie, in June 2007. Major enhancements include integration with the new versions of Adobe’s Creative Suite products, support for AIR (Adobe’s new desktop application runtime), and the addition of profiling and refactoring tools to the Flex Builder IDE.
In October 2007, Adobe released the second beta of Flex 3.
On December 12, 2007, Adobe released the third beta of Flex 3.
LiveCycle Data Services (previously called Flex Data Services) is a server-side complement to the main Flex SDK and Flex Builder IDE and is part of a family of server-based products available from Adobe. Deployed as a Java EE application, LiveCycle Data Services adds the following capabilities to Flex applications:
Source — http://en.wikipedia.org/wiki/Adobe_Flex
Courtsey– Jon Rose’s Blog
When it comes to Rich Internet Applications (RIA), I am way behind to some, and way too far out there for others… Oh well!
It is time to completely embrace the RIA model and put to bed the old Request/Response type model of building web applications. My conclusion is simple, no longer do we have to train our customers to be disappointed with the final product when purchasing online software. The tools are finally good enough to give our business stakeholders and users the ‘rich’ applications they have been asking our industry to build for all these years.
Until recently, I have avoided the ‘Rich Internet Applications’/’Web 2.0’ craze, mostly because I saw Ajax as the primary method available to Java developers, like myself, for enhancing web based applications. I am finally ready to get onboard, but I am still uncomfortable with using the Ajax techniques on a large scale.
In this post, I am asserting the underlying assumption that the majority of the online user interface work going forward will be done in a Client Server like model over the Internet (e.g. Ajax and the like). As far as I am concerned, debate around the question of continuing to use JSF and Struts like frameworks is pretty much over, and any further discussion is for someone else’s blog. We should all be excited that we finally have better ways to build online applications. For me, it has been about finding a method that will enhance the user’s experience, but not be a complete pain to me as a developer.
Going forward, my personal platform of choice for building online user interfaces will be Adobe Flex. Adobe’s recent 2.0 release of Flex finally gives developers a robust solution for building ‘real’ applications and delivering them over HTTP through a browser.
I think Flex is cool and you can clearly build ‘sexy’ applications using it, but really who cares? I see way better reasons to utilize the Flex 2 framework as a Java developer:
I have been getting a bit of push back when I suggest Flex/Flash as a viable option for building user interfaces to other Java developers. Some of the more common questions/comments are below:
If you are willing to embrace the Ajax-like model for building web applications there are a number of options to consider in addition to Adobe Flex: Microsoft SilverLight, Open Laszlo, Java FX, and the many Ajax frameworks. Below is a brief review of each of these from my perspective as a Java developer.
Ajax
My depth of knowledge on Ajax is limited, as I have avoided using it on any large scale to this point. I do know there are many developers out there with successful deployments of online applications that incorporate significant amounts of Ajax functionality. For me, it just seems to push the standard browser functionality beyond its natural capabilities. Regardless, by its nature, it is always going to be painful for the developer, as they have to support deployment to multiple runtimes and the many cross-platform issues that arise from that.
I do believe Ajax, along with HTML, CSS, JavaScript and server side technologies, will always be some part of any comprehensive online application. The only question that still intrigues me is, what parts should they make up?
Microsoft SilverLight
I would anticipate SilverLight being the strongest competitor to Flex in the near-and-long-term. As much as I love to hate the Evil Empire, we all know they will commit to making this a world class development platform that integrates with all of their other tools. It appears to already have stronger video support than Flex, and will surely catch Flex in other areas very quickly.
My biggest reservation with SilverLight comes strictly as a Java developer. It doesn’t seem to make a lot of sense to learn a new tool set (e.g. Microsoft Visual Studio) and be outside the mainstream trying to integrate Java and SilverLight when there are comparable technologies that are much closer to the Java space. That’s not to say a .NET developer shouldn’t consider Flex, but hey, I don’t know how things work on that side of the software planet.
OpenLazslo
OpenLazslo is similar to Flex, as it is an Open Source Framework for building applications that deploy as Flash movies. However, it is my understanding that the current release of the OpenLazslo Framework does NOT target the Flash Player 9 virtual machine (and its many performance benefits). Flash Player 9 was a virtual rewrite with many improvements including support for ActionScript 3.0 and much improved performance (up-to 10 times faster than previous versions according to Adobe). The Flash Player 9 actually ships with two virtual machines for backwards capability (Flash 8 & 9).
Regardless of the performance trade-offs, it is still attractive to some because it is an Open Source project. However, Abode committed to Open Sourcing the Flex framework in recent weeks. So, I am not sure that is still a compelling motivation to choice Lazslo over Flex.
Java FX
Java FX is a complete joke to me! It’s just another grand Java One announcement with NO release date… and foggy details on what it will look like when it is released. The most promising descriptions describe an Applet like deployment (over the samples that run in Java Web Start outside the browser), which just isn’t going to cut it. Thanks Sun… Thanks for showing us the raw work going on in your R&D labs (more Jon Rose skepticism run amok).
The only interesting thing about Java FX is that it is essentially Sun’s acknowledgement that the industry has already shifted away from server side user interface frameworks (e.g. Struts, JSF), in favor of richer client side runtimes.
Summary
Each of us comes to our own conclusions on how to best build online applications. For me, Flex is clearly the way to go. As a few wise developers have said to me, ‘Flex is just another tool.’ To a large extent I agree, but the difference to me is that the end product produced from Flex is such a large leap forward when compared with the current landscape.
References:
http://www.adobe.com/aboutadobe/pressroom/pressreleases/pdfs/200606/062806Flash9.pdf
http://msdn2.microsoft.com/en-us/library/bb428859.aspx
The Cairngorm Microarchitecture is a lightweight yet prescriptive framework for rich Internet application (RIA) development.
Cairngorm is an implementation of design patterns that the consultants at Adobe Consulting have successfully taken from enterprise software development (with technologies including J2EE and .NET) and applied rich Internet application development using Adobe Flex.
The Cairngorm microarchitecture is intended as a framework for Enterprise RIA developers.
First and foremost, this assumes that developers are likely to be delivering their applications on the Adobe Flex platform. As an ActionScript 2 and ActionsScipt 3 technical architecture, Cairngorm has been used, and can continue to be used, for the rapid development of applications built with Flash MX and Flash Remoting. However, the implementation of the design patterns (the patterns that have been selected for the microarchitecture) and the future roadmap for Cairngorm development are firmly aligned with the feature set – advertised and anticipated – of the Adobe Flex platform, and the emerging ecosystem of tools (such as Apollo) around the Flex platform.
If you are writing a very simple application (such as a prototype application) or an application with only a single view, then you might consider a “Model 1″ solution that doesn’t strive for the same separation of model, view, and control that Cairngorm advocates.
The benefits of the Cairngorm architecture are realized when developing complex RIA applications with multiple use-cases and views, with a team of developers, and with a multi-disciplinary development team that includes designers as well as creative and technical developers.
Source–
http://labs.adobe.com/wiki/index.php/Cairngorm