Cairngorm Microarchitecture. Pronunciation Cairngorm (kârn gôrm) n. yellowish-brown variety of quartz, especially found in Scottish Cairngorm mountain.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

Apache Struts Technology
Zoiner Tejada Hershey Technologies. About Zoiner Tejada.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Component-Level Design
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
System Architecture Lecture 3 CSE 111 Spring /22/20151Copyright William E. Howden.
How Does Remote Method Invocation Work? –Systems that use RMI for communication typically are divided into two categories: clients and servers. A server.
Object-Oriented Analysis and Design
ASP.NET Programming with C# and SQL Server First Edition
The Design Discipline.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
1 Lecture 22 George Koutsogiannakis Summer 2011 CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Chapter 10 Managing Data with ASP.NET. ASP.NET 2.0, Third Edition2.
Exploring Real-time apps with ColdFusion and Blaze DS / Live Cycle Data Services ES Dan Blackman
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Advanced Web Forms with Databases Programming Right from the Start with Visual Basic.NET 1/e 13.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
J2EE Structure & Definitions Catie Welsh CSE 432
+ A Short Java RMI Tutorial Usman Saleem
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
LAB 1CSIS04021 Briefing on Assignment One & RMI Programming February 13, 2007.
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
1 Chapter 28 Networking. 2 Objectives F To comprehend socket-based communication in Java (§28.2). F To understand client/server computing (§28.2). F To.
Swing MVC Application Layering A Layer is a collection of components that Perform similar tasks. Perform similar tasks. Isolate implementation details.
An Object-Oriented Approach to Programming Logic and Design Chapter 3 Using Methods and Parameters.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Spring Remoting Simplifying.
An Introduction to Programming and Object Oriented Design using Java 3 rd Edition. Dec 2007 Jaime Niño Frederick Hosch Chapter 18 Integrating user interface.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
CS324e - Elements of Graphics and Visualization Java GUIs - Event Handling.
Field Trip #28 Securing a VNC Connection with Java By Keith Lynn.
ARCH-11: Building your Presentation with Classes John Sadd Fellow and OpenEdge Evangelist Sasha Kraljevic Principal TSE.
Eric Tryon Brian Clark Christopher McKeowen. System Architecture The architecture can be broken down to three different basic layers Stub/skeleton layer.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
AMQP, Message Broker Babu Ram Dawadi. overview Why MOM architecture? Messaging broker like RabbitMQ in brief RabbitMQ AMQP – What is it ?
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
.NET Mobile Application Development XML Web Services.
L10: Model-View-Controller General application structure. User Interface: Role, Requirements, Problems Design patterns: Model – View – Controller, Observer/Observable.
Distributed objects and remote invocation Pages
CEN6502, Spring Understanding the ORB: Client Side Structure of ORB (fig 4.1) Client requests may be passed to ORB via either SII or DII SII decide.
DEVELOPING WEB SERVICES WITH JAVA DESIGN WEB SERVICE ENDPOINT.
Apache Struts Technology A MVC Framework for Java Web Applications.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 29 Remote Method.
Chapter 5 Introduction to Defining Classes Fundamentals of Java.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
CSC 205 Programming II Lecture 5 AWT - I.
Forms Concepts Triggers Fired when Internal/External events occur
Java Servlets By: Tejashri Udavant..
Delegates and Events 14: Delegates and Events
Chapter 3: Using Methods, Classes, and Objects
Out-of-Process Components
Network and Distributed Programming in Java
The Model Layer What is Model?
Chapter 40 Remote Method Invocation
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
Chapter 46 Remote Method Invocation
Chapter 46 Remote Method Invocation
Out-of-Process Components
Enterprise Java Beans.
Java Remote Method Invocation
Presentation transcript:

Cairngorm Microarchitecture

Pronunciation Cairngorm (kârn gôrm) n. yellowish-brown variety of quartz, especially found in Scottish Cairngorm mountain.

What is it? Collection of classes/interfaces against which we can compile Elegant collaboration and partitioning of design responsibilities "microarchitecture" - Provide the skeleton or internal structure of moving parts, around which the flesh and muscle particular to a business domain can be layered A standard way of building a Flex app.

Why use it? Multiple developers working on the project, and run the risk of them all solving the same problem in multiple different ways Unified approach to problems Inject complex functionality in a well understood manner Promote, enable and encourage reuse (business objects, business services, etc.)

The Pieces of Cairngorm Model Locator: Stores all of your application’s Value Objects (data) and shared variables, in one place. Similar to an HTTP Session object, except that its stored client side in the Flex interface instead of server side within a middle tier application server. View: One or more Flex components (button, panel, combo box, Tile, etc) bundled together as a named unit, bound to data in the Model Locator, and generating custom Cairngorm Events based on user interaction (clicks, rollovers, dragndrop.) Front Controller: Receives Cairngorm Events and maps them to Cairngorm Commands. Command: Handles business logic, calls Cairngorm Delegates and/or other Commands, and updates the Value Objects and variables stored in the Model Locator Delegate: Created by a Command, they instantiate remote procedure calls (HTTP, Web Services, etc) and hand the results back to that Command. Service: Defines the remote procedure calls (HTTP, Web Services, etc) to connect to remote data stores.

Cairngorm 2 Microarchitecture

Model All client “state” data Anything retrieved from server Implements ModelLocator Cairngorm interface The model locator in an application is a singleton that the application uses to store the client side model. Summary: Model is a Singleton containing data.

View User Interface.mxml files w/controls (text fields, combobox, datagrid, etc.) All data is pulled from model via a binding

Controller Allows communication between tiers of application via  Events  extend class com.adobe.cairngorm.control.CairngormEvent  Commands  implement interfaces com.adobe.cairngorm.commands.ICommand com.adobe.cairngorm.business.IResponder (optional) Tie Events and Commands together in Controller class Conduit between user events and model changes

Events Events classes usually just a  Collection of properties  Constructor with params to populate those properties Used to pass data between layers of an application

Event - example package com.echoeleven.controller.event { import com.adobe.cairngorm.control.CairngormEvent; import com.echoeleven.controller.ApplicationController; public class LoginEvent extends CairngormEvent { public var username:String; public var password:String; public function LoginEvent(username:String, password:String) { super(ApplicationController.EVENT_LOGIN); this.username = username; this.password = password; }

Command “Service to Worker” command pattern Must implement the Cairngorm Command interface If receiving data from server (e.g. RemoteObject), should also implement Responder Interface Command class must implement execute() method execute() usually takes an event argument as a parameter

Command - example package com.echoeleven.controller.command { import com.echoeleven.model.ApplicationModel; import com.echoeleven.controller.event.LoginDataChangeEvent; public class LoginDataChangeCommand implements Command { public function execute(eventParam:CairngormEvent):void { var event:LoginDataChangeEvent = eventParam as LoginDataChangeEvent; var appData:ApplicationModel = ApplicationModel.getInstance(); appData.username = event.username; appData.password = event.password; }

Controller Tie Event and Command classes together in Controller class constructor addCommand( ApplicationController.EVENT_LOGIN, LoginCommand ); Controller listens for event When event is dispatched, command’s execute() method called (by controller) Conduit between user events and model changes

Controller – Big Picture 1. View event triggered (e.g. click event) 2. Caught by private method in view (mxml file) 3. View method creates instance of event (extending CairngormEvent) 4. View method dispatches that event via CairngormEventDispatcher 5. Controller catches CairngormEvent and executes associated Cairngorm Command private function btnClick( event:Event ):void { var evt:LoginEvent = new LoginEvent(userName.text, password.text); CairngormEventDispatcher.getInstance().dispatchEvent( evt ); }

Example Flow Create LoginDataChangeEvent class Create LoginDataChangeCommand class Connect Event to Command in controller Catch the TextField.change event, and call local function dataChange() Create instance of LoginDataChangeEvent and dispatch it LoginDataChangeCommand.execute() automatically called execute() method modifies Model Change to model reflected in View through binding

Service Locator Singleton Abstracts data communication layer Defines which protocol (http, SOAP, AMF, etc.) and which endpoint params (which service, which channel, etc.)

Business Delegate Who should handle the results of a server operation? Avoids attaching result/error routines to data services (e.g. RemoteObject) Allows Command to call remote object method, and handle the result and fault methods Multiple instances may exist

Business Delegate The Business Delegate typically fulfills its role in collaboration with the Service Locator; it uses the Service Locator to locate and look up remote services, such as web services, remote Java objects, or HTTP services. Once located, the Business Delegate invokes these services on behalf of the class that has delegated responsibility to it for business logic invocation.

References Cairngorm Docs Borrowed contents from Scott Talsma’s slideScott Talsma’s