Www.universalmind.com Thomas Burleson. Using MVC with Flex & Coldfusion Projects June 27, 2007 See how Coldfusion MVC is similar to Flex MVC…

Slides:



Advertisements
Similar presentations
Apache Struts Technology
Advertisements

Web Applications Development Using Coldbox Platform Eddie Johnston.
Design Patterns and ColdFusion: Exploring Object Based Programming Dan Blackman
Model-View-Controller ("MVC") This is a architectural design pattern for interactive applications. This design pattern organizes an interactive application.
ASP MVC s/mvc-4/getting-started-with- aspnet-mvc4/intro-to-aspnet- mvc-4.
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
14 1 Chapter 14 Database Connectivity and Web Development Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
UNIT-V The MVC architecture and Struts Framework.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Exploring Real-time apps with ColdFusion and Blaze DS / Live Cycle Data Services ES Dan Blackman
Prepared by Stephen Olaño June 12, Rich Internet Applications It allow to build rich applications with data and multimedia contents, offering a.
Model View Controller (MVC) Rick Mercer with a wide variety of others 1.
ASP.NET and Model View Control Jesper Tørresø ITNET2 F08.
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
WEB 304 An Overview of ASP.NET and Windows Workflow Foundation Kashif Alam Program Manager Developer Division Microsoft Corporation.
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,
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
2006 Adobe Systems Incorporated. All Rights Reserved. Designing & Building Structured Business Reports with ColdFusion MX 7 Adam Lehman ColdFusion Specialist.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
Model View Controller MVC Web Software Architecture.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
MVC WITH CODEIGNITER Presented By Bhanu Priya.
Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks.
Mach II at Macromedia Sean Corfield Director, Architecture An introduction to Mach II and its use on macromedia.com.
Chapter 9 Web Application Design. Objectives Describe the MVC design pattern as used with Web applications Explain the role and responsibilities of each.
Mach-II Primer Ben Edwards An Introduction to Mach-II: An event-based, implicit invocation web-application framework.
ASP.NET MVC An Introduction. What is MVC The Model-View-Controller (MVC) is an architectural pattern separates an application into three main components:
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
Flux & React Web Application Development Mark Repka, Rich McNeary, Steve Mueller.
Apache Struts Technology A MVC Framework for Java Web Applications.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
Thomas Burleson. Continuous Testing with Flex & Coldfusion Projects June 27, 2007 Oooh no! Not another session of “how to test”…
CFUNITED – The premier ColdFusion conference Using Event Gateways with CFMX7 By Jeff Tapper Tapper.net Consulting.
June 28 th – July 1 st 2006 Thomas Burleson Principal Architect Understanding Flex 2 Data Services “With ColdFusion, why should.
Leveraging ColdSpring to build a robust Flex applications Chris Scott, Cynergy Systems.
National College of Science & Information Technology.
Web Technology Solutions
Windows Communication Foundation and Web Services
J2EE Platform Overview (Application Architecture)
Progress Apama Fundamentals
Class03 Introduction to Web Development (Hierarchy and the IDE)
z/Ware 2.0 Technical Overview
Introduction to Redux Header Eric W. Greene Microsoft Virtual Academy
Model View Controller
MVC and other n-tier Architectures
Processes The most important processes used in Web-based systems and their internal organization.
Unit 6-Chapter 2 Struts.
Windows Communication Foundation and Web Services
Top Reasons to Choose Angular. Angular is well known for developing robust and adaptable Single Page Applications (SPA). The Application structure is.
Design and Maintenance of Web Applications in J2EE
Model-View-Controller Patterns and Frameworks
Lecture 1: Multi-tier Architecture Overview
Model-View-Controller (MVC) Pattern
Web Application Architectures
ASP.NET Module Subtitle.
ColdSpring Powered Fusebox In Action
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Web Application Architectures
Developing a Model-View-Controller Component for Joomla
Database Connectivity and Web Development
ASP.NET MVC Web Development
Leveraging ColdSpring To Make Better Applications
ASP.NET and Model View Control
Web Application Architectures
Tom Link CTO, Universal Mind
Presentation transcript:

Thomas Burleson

Using MVC with Flex & Coldfusion Projects June 27, 2007 See how Coldfusion MVC is similar to Flex MVC…

Presentation Overview  Introduction  Review the Coldfusion MVC pattern provided in Mach-ii I. See Galleon Forums app as [traditional architecture] II. See migration of Galleon MX [MVC architecture]  Review the Flex MVC framework provided in Cairngorm I. See simple Flex version of Galleon MX [MVC architecture]  Compare Similarities & Differences I. Controller support for registration of Event-Views II. Announcing Events III. Listening for Events  See how business logic can be separated from views in BOTH frameworks.  Review how both frameworks can be used together within one application

So what is Model-View-Controller (MVC)? Model contain your business data, and manages relationships between your data objects View displays formatted data in controls allows users to “interact with model data” announces user “gestures” using events Controller listens for events processes events [according to configurations] updates model notifies views of model changes Simply a way of writing code and specifying “who does what…” Really simple… don’t be intimidated!

You will see code SOON … don’t worry! Developers’ version of “show me the money…” or “where’s the beef?”

Coldfusion MVC pattern provided in Mach-ii Model contain your business data, and manages relationships between your data objects View *.cfm pages that access data from Request scope Supports JavaScript, Spry, etc. announces events using GET/POST /index.cfm?event= Controller Your webapp “registered” listeners for events using /config/mach-ii.xml Listeners remove issues of “scope” and delegate to business layer Listeners insert data into Request scope Controller loads specified view when listeners are “done” Page-Based HTML Solution Mach-ii is a actually another web app that allows custom applications to “register” configurations for their own needs.

Yeah! Let’s look at code… Traditional Coldfusion Application: Galleon Forums Does not use CFCs Complicated use of Not maintainable No way to call services or business layer directly No central location to configure events and views

WOW! Much better… MVC Coldfusion Application: Galleon MX Uses Mach-ii Uses CFCs Uses Design templates with editable regions Much simpler than most CFIncludes… allows complete design time rendering. Listener CFCs now call Service CFCs XML configuration file to register listeners, events, and views.

Super Kewl! Extending Coldfusion Galleon MX Could use ColdSpring for persistence… “under-the-hood” changes do not affect views, listeners, or navigation. Could add different views without affecting core services; listeners can simple aggregate information as needed Remember Our views simply render model data and do NOT know anything about event processing Our listeners and services handle events and do NOT know anything about views.

Huh? Let’s look at code… Traditional Flex Application: Galleon Flex Does not use MVC framework Makes dataservice calls directly Dataservice calls… huh? Views contain logic for dataservices Not scalable if the views get complicated or if multiple developers want to work on the app. No central location to configure events and views

MVC Flex Application: Galleon Flex Uses Adobe Cairngorm MVC framework So what is the MVC within Flex? Views are standard Flex composites Model can be same as ColdFusion Model Controller is 3-part: FrontController Commands [and Delegates] Events

Hang on… here is the code! MVC Flex Application: Galleon Flex Commands (essentially the “controller”) Respond to events. Handle logic and update model Ask delegates to handle remote calls Think of these as proxies directly to the Service CFCs

MVC Flex Application: Galleon Flex Let’s explore some source code…

Remember Flex gives us effects and transitions… Why is Flex MVC so much more complicated? 1) Views are nested compositions 2) View relationships are much more complex 3) Events are everywhere & contain custom data  We have application-level events [MVC events] and view-local events  Some events notify other views of state changes  Some events notify the controller of app requests or changes 4) Remote data calls are ASYNCHRONOUS This is a important concept & means coding Flex apps can be fundamentally different from CFML.

MVC similarities between Flex & Coldfusion  Views render data and announce events 1) Event announcing is different. 2) Flex uses dispatchEvent versus HTML GET/POST i. Flex events dispatched internal to client ii. HTML events dispatched via TCP/IP to server.  Model can be the same 1) “Value Object” (VO) classes can match 1-to-1 2) use Eclipse wizards to auto-generate Flex VOs from CFCs  Controllers are DIFFERENT

MVC DIFFERENCES between Flex & Coldfusion  Controllers are DIFFERENT  Mach-ii uses mach-ii.xml file  Flex uses FrontController  no xml file  Mach-ii Listeners are special CFCs  Flex Listeners are “Command” classes  Flex DataService calls talk DIRECTLY to Service CFCs (asynchronously).  Mach-ii Events ALL come back to the server.  Flex MVC events may NOT come back to the server (optional).

Integrating Coldfusion and Flex MVC Apps  Service CFCs are used as the “common” API  Mach-ii Listeners [should] forward requests to Service CFCs  Flex Dataservice calls talk DIRECTLY to Service CFCs (asynchronously) via Flash Remoting.  Flex client-side logic should be related to view interactions  Flex client-side may validate/format model changes  Coldfusion business layers (Services, etc.) validates model changes  Coldfusion business layers access & persist model data  Flex apps may be hosted in complex web pages (e.g. Hybrid Solutions) Used by both apps