Presentation is loading. Please wait.

Presentation is loading. Please wait.

ColdSpring Powered Fusebox In Action

Similar presentations


Presentation on theme: "ColdSpring Powered Fusebox In Action"— Presentation transcript:

1 ColdSpring Powered Fusebox In Action
Adam Wayne Lehman ColdFusion Specialist Adobe Systems, Inc.

2 ColdFusion Specialist at Adobe
About Me ColdFusion Specialist at Adobe Solutions Engineer Technical Evangelist Member of the ColdFusion Product Team 10+ years of ColdFusion experience Previous Lives US Department of State Johns Hopkins University

3 Agenda Introduction to ColdSpring Fusebox / ColdSpring MVC
ColdSpring Lexicons Demo Q & A

4 What is ColdSpring? ColdSpring is a Model Framework
Community driven, open source ColdFusion component container inspired by J2EE Spring Framework Dave Ross Chris Scott Uses the J2EE Spring syntax and DTD for its xml config file ColdFusion’s first Aspect Oriented Programming framework Service layer framework for CFCs Manages the lifecycle and dependencies of your CFCs You don’t have to alter your existing CFCs to get them to work with ColdSpring Enforces best practices in domain design The most popular ColdFusion framework today!

5 Fusebox MVC Controller View Model Event
(fuseaction) Processes and responded to events Can update the model directly Circuit.xml Controller Domain model Abstracts the database acts, qrys & CFCs Renders model into UI HTML dsp_myForm.cfm View Model

6 Fusebox _VC Use Fusebox to manage the controller and the view View
Procedural style better suited for HTML development Easier for designers and content managers Controller Configured ‘declaratively’ through xml Highly extensible (lexicons) Tons of existing solutions to common problems (plugins) Controller View

7 ColdSpring M_ _ Use ColdSpring to manage the model and define the domain OO design solves complex problems Full Component Lifecycle Manages Dependencies Configured ‘declaratively’ through xml Very lightweight Model is framework agnostic Model

8 Singletons & Factories
Objects that persist across requests Minimal object creation = fast application Factories Responsible for maintaining Singletons Handles configuration Manages the object lifecycle Creates the object Persist the object Directs requests to the object

9 Inversion of Control / Dependency Injection
Objects not responsible for managing dependencies ColdSpring’s factory bakes the dependencies in during object creation (dependency injection) Setter Injection Construction Injection

10 All CFCs are not the same
Value Object (DTO or Domain Object) DAO fetch, save, remove, create, update Gateway Services Façade for a group of model components Should only talk to their components or other services Service DAO Gateway Value Object

11 ColdSpring and Fusebox in Action
PDF and FlashPaper 2 reports with <CFReport /> and the ColdFusion Report Builder tool Integrated printable documents with <CFDocument /> Demonstrate a ColdFusion MX 7 SMS mobile application LitePost Demo ColdSpring Lexicons Working with ColdSpring

12 Initializing ColdSpring
Create a fuseaction to initialize ColdSpring <circuit access="internal" xmlns:cs="coldspring/"> <cs:initialize coldspringfactory="servicefactory“> <cs:bean beanDefinitionFile="#expandPath(‘coldspring-services.xml')#" /> </cs:initialize> </circuit> Add fuseaction call to fusebox.xml.cfm <globalfuseactions> <appinit> <do action="home.initColdSpring" /> </appinit> </globalfuseactions>

13 Using ColdSpring Getting a ColdSpring object in circuit.xml
<fuseaction name=“displayAllEntries” <cs:get bean=“entryService” returnvariable=“REQUEST.entryService” /> <invoke object=“REQUEST.entryService” method=“getEntries” returnvariable=“REQUEST.entries” /> or <set name=“REQUEST.entries” value=“#REQUEST.entryService()#” /> </fuseaction>

14 Resources Official FuseBox Website Official ColdSpring Website
Official ColdSpring Website Sean Corfield (primary contributor to FuseBox 5)

15


Download ppt "ColdSpring Powered Fusebox In Action"

Similar presentations


Ads by Google