SlideShare a Scribd company logo
1 of 34
FW1 introduction
SaravanaMuthu.J
@cfmitrah
2
Agenda
ColdFusion Frameworks
• MVC
• Dependency injection
• ORM
MVC
• What is MVC
• MVC Architecture
FW 1
• What is FW1
• Action = Section & Item
• Folder structure
• Views
• Layouts
• Views & Layout functions & variables
• Controller & services intro
• Controllers
• Services
• Request Context
• Method execution sequence
• Configuration variables
• Subsystems
• Bean Factories
3
ColdFusion Frameworks
4
MVC Frameworks
• Fusebox - www.fusebox.org
- Oldest MVC framework
- XML config files used to define application settings in old versions.
- Not been updated since March 2008
- Fuseaction, circuit.xml, fusebox.xml
- Current Version: Fusebox: 5.5
• Mach II - www.mach-ii.com
- It was the first Object-Oriented framework for CFML.
- Event based. listeners and filters defined in XML file
- Current Version: Mach II: 1.8
• Model-Glue - www.model-glue.com
- Event-based implicit invocation OO framework
- direct integration with ColdSpring, Transfer and Reactor
- Scaffolding functionality available with ORM
- Current Version: Model-Glue: 3.2 RC
5
MVC Frameworks continues..
• ColdBox - www.coldbox.org
- More than an MVC, it is a development kit and event driven
remote framework
- Rich documentation, CFB & cfeclipse tools
- Current Version: ColdBox : 3.1
• CFWheels - www.cfwheels.org
- MVC framework inspired by Ruby on Rails
- It implements the Active Record Pattern for the built in Object-
relational mapping.
- Current Version: CF Wheels 1.1.5
• FW1 - http://fw1.riaforge.org
- It is Convention over configuration MVC Framework.
- Light weight
- Current Version: FW1: 2.0 RC
6
DI Frameworks
• LightWire - http://lightwire.riaforge.org
- LightWire is optimized to create transient objects as well
as singletons and allows for programmatic AS WELL AS
XML configuration.
• ColdSpring - www.coldspringframework.org
- ColdSpring is a inversion-of-control framework/container for
ColdFusion Compontents.
• DI 1 - http://di1.riaforge.org
- DI 1 is very lightweight, convention over configuration DI framework.
- Development phase, can easily integrate with FW1
7
ORM Frameworks
• Transfer - www.transfer-orm.com
Main focus is to automate the repetitive tasks of creating the SQL and
custom CFCs
Developed by Mark Mandel, Great CFML contributor
Current version 1.1
• Reactor - www.reactorframework.com
Used to generate ColdFusion objects which are used to access data in
your database
• built-in ORM- www.adobe.com/orm
Hibernate is high performance OR persistence & query service.
Introduced in CF 9 & Railo 3.2
8
MVC
9
What Is MVC
• Architectural Pattern often used by applications that need the ability to maintain multiple
views of the same data.
• Models for maintaining data.
• Views for displaying all or a portion of the data.
• Controllers for handling events that affect the model or view(s)
• Usage
Clarity
Maintainability
Reusability
Teamwork
10
MVC Architecture
Our Code ;)
11
Framework One
12
What is FW1
• Lightweight MVC framework developed by Sean Corfield
• Convention over Configuration . No XML
• Installing - Just extend your Application.cfc to FW1 core file
• SES URLs support
+ =
13
Section & Item
• All functionality are based upon the Action value
• Action consists of a section and an item
• Section is group of items Ex. Blog, comment
• Item is a specific task inside a section Ex. List, Add, Update
Index.cfm?action=blog.list
(or)
Index.cfm/blog/add/ (SES URL)
• Default section is “Main” & default Item is “Default”
14
Folder Structure
• Controllers
• Views
• Layouts
• Services
• gsfgsfgsfgsfg
15
Views
• View is a User Interaction. [Form or UI]
• View = html/css/js
• Very little dynamic code
Loops
Sets
IFs
• View Contain full page content or Fragment
• Folder per section with files named for item
• All files and folders must be in lowercase.
16
View Demo Application - 1
17
Layouts
• Layout is a Wrapper. It may render Header, Footer, Navigation.
• Provided a variable named body
• Generated output that the layout should wrap
• Layout request is a cascaded action. A request can have 3 layouts executed
• FW/1 looks for layouts in the following places:
layouts/section/item.cfm
layouts/section.cfm
layouts/default.cfm
• To stop the layout cascade, use request.layout = false. It is helpful for returning XML/JSON
or AJAX calls
18
Layout Demo Application - 2
19
Views & Layout functions & variables
Commonly used functions Variables
view() body
buildURL() rc[]
layout() local[]
getBeanFactory() framework[]
request.layout
20
Controllers & Services
• May contain a CFC for each section
• Each CFC contains a method for each item
• Caution: Cached in FW/1’s application cache!
We can clear that cache using “?reload=true” querystring. Configurable using 3 options.
reload = 'reload’
password = 'true’
reloadApplicationOnEveryRequest = false - Suitable for development phase
• Methods Cached, so function local variables is not thread safe.
So declare local variables using var
21
Controllers
• Contain the high-level "traffic cop" logic
• Validation and Control flow
• commonly used functions
variables.fw.redirect()
variables.fw.service()
variables.fw.setView()
variables.fw.customizeViewOrLayoutPath()
22
Services
• Intended to be agnostic of and decoupled from FW/1 conventions.
• Inside controllers you can use the service() method to manually queue calls to service
• Methods, passing the results back into the request.context.data
23
Controllers and Services Demo Application
24
The Request Context
• The main “data bus” through the application.
• Contains URL and FORM variables.
• Controller methods receive an rc argument.
• Service methods receive as argument collection.
• All Views / layouts have access to rc.
25
Method execution sequence
• Called by FW1 when asked for section.item:
• Application.cfc : before()
• controllers/section.cfc:before()
• controllers/section.cfc:startItem()
• controllers/section.cfc:item()
• services/section.cfc:item()
return value stored in rc.data
• additional service calls added via service() API
• controllers/section.cfc:endItem()
• controllers/section.cfc:after()
• Application.cfc : after()
• All Methods are optional, if that do not exist are not called.
26
Controllers methods - 4
27
Configuration variables
• All config is in a simple structure in Application.cfc
variables.framework = {
home = "main.default",
defaultSection = 'main',
defaultItem = 'default',
usingSubsystems = true,
defaultSubsystem = 'user',
subsystemDelimiter = '-',
siteWideLayoutSubsystem = "common",
generateSES = true,
SESOmitIndex = true,
base = '/cfml',
cfcbase = '/cfc'
};
28
Config variables - 5
29
Simple form submit - 6
30
Subsystems
• Drop an FW/1 app into an existing one
• Used as modules with no parent app dependencies
• Must enable in parent application’s Application.cfc
• usingSubsystems = true
• FW/1 Examples can be run standalone or as subsystems in another application
31
Sub systems demo
32
Bean Factories
• Supports any bean factory (IoC Container or DI factory) with the following API methods
containsBean(name) - returns true if factory knows of named bean
getBean(name) - returns fully initialized bean identified by name
IoC - Inversion of Control
DI - Dependency Injection
33
UserManager Demo Application
34
Resources
http://www.adobe.com/devnet/coldfusion/articles/frameworks_intro.html
https://github.com/seancorfield/fw1

More Related Content

What's hot

Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans Hitesh-Java
 
Java spring framework
Java spring frameworkJava spring framework
Java spring frameworkRajiv Gupta
 
Hibernate
HibernateHibernate
HibernateAjay K
 
Apache Calcite: One planner fits all
Apache Calcite: One planner fits allApache Calcite: One planner fits all
Apache Calcite: One planner fits allJulian Hyde
 
Cassandra Introduction & Features
Cassandra Introduction & FeaturesCassandra Introduction & Features
Cassandra Introduction & FeaturesDataStax Academy
 
Introduction to Storm
Introduction to Storm Introduction to Storm
Introduction to Storm Chandler Huang
 
Dead Letter Queues for Kafka Consumers in Robinhood, Sreeram Ramji and Wenlon...
Dead Letter Queues for Kafka Consumers in Robinhood, Sreeram Ramji and Wenlon...Dead Letter Queues for Kafka Consumers in Robinhood, Sreeram Ramji and Wenlon...
Dead Letter Queues for Kafka Consumers in Robinhood, Sreeram Ramji and Wenlon...HostedbyConfluent
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - CoreDzmitry Naskou
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC ArchitecturePrem Sanil
 
Microservices Design Patterns | Edureka
Microservices Design Patterns | EdurekaMicroservices Design Patterns | Edureka
Microservices Design Patterns | EdurekaEdureka!
 
Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Claus Ibsen
 
Spring Boot+Kafka: the New Enterprise Platform
Spring Boot+Kafka: the New Enterprise PlatformSpring Boot+Kafka: the New Enterprise Platform
Spring Boot+Kafka: the New Enterprise PlatformVMware Tanzu
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public APIJeff Potts
 
Capture the Streams of Database Changes
Capture the Streams of Database ChangesCapture the Streams of Database Changes
Capture the Streams of Database Changesconfluent
 
SQL Server Upgrade and Consolidation - Methodology and Approach
SQL Server Upgrade and Consolidation - Methodology and ApproachSQL Server Upgrade and Consolidation - Methodology and Approach
SQL Server Upgrade and Consolidation - Methodology and ApproachIndra Dharmawan
 
P1 introduction à android
P1 introduction à androidP1 introduction à android
P1 introduction à androidLilia Sfaxi
 

What's hot (20)

Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans
 
Java spring framework
Java spring frameworkJava spring framework
Java spring framework
 
Hibernate
HibernateHibernate
Hibernate
 
P5 stockage
P5 stockageP5 stockage
P5 stockage
 
Apache Calcite: One planner fits all
Apache Calcite: One planner fits allApache Calcite: One planner fits all
Apache Calcite: One planner fits all
 
Cassandra Introduction & Features
Cassandra Introduction & FeaturesCassandra Introduction & Features
Cassandra Introduction & Features
 
Introduction to Storm
Introduction to Storm Introduction to Storm
Introduction to Storm
 
Dead Letter Queues for Kafka Consumers in Robinhood, Sreeram Ramji and Wenlon...
Dead Letter Queues for Kafka Consumers in Robinhood, Sreeram Ramji and Wenlon...Dead Letter Queues for Kafka Consumers in Robinhood, Sreeram Ramji and Wenlon...
Dead Letter Queues for Kafka Consumers in Robinhood, Sreeram Ramji and Wenlon...
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
P4 intents
P4 intentsP4 intents
P4 intents
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Microservices Design Patterns | Edureka
Microservices Design Patterns | EdurekaMicroservices Design Patterns | Edureka
Microservices Design Patterns | Edureka
 
PlantUML
PlantUMLPlantUML
PlantUML
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2
 
Spring Boot+Kafka: the New Enterprise Platform
Spring Boot+Kafka: the New Enterprise PlatformSpring Boot+Kafka: the New Enterprise Platform
Spring Boot+Kafka: the New Enterprise Platform
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public API
 
Capture the Streams of Database Changes
Capture the Streams of Database ChangesCapture the Streams of Database Changes
Capture the Streams of Database Changes
 
SQL Server Upgrade and Consolidation - Methodology and Approach
SQL Server Upgrade and Consolidation - Methodology and ApproachSQL Server Upgrade and Consolidation - Methodology and Approach
SQL Server Upgrade and Consolidation - Methodology and Approach
 
P1 introduction à android
P1 introduction à androidP1 introduction à android
P1 introduction à android
 

Viewers also liked

Building ColdFusion And AngularJS Applications
Building ColdFusion And AngularJS ApplicationsBuilding ColdFusion And AngularJS Applications
Building ColdFusion And AngularJS ApplicationsColdFusionConference
 
Participation Patterns in Formal, Non-Formal, and Informal Online Learning En...
Participation Patterns in Formal, Non-Formal, and Informal Online Learning En...Participation Patterns in Formal, Non-Formal, and Informal Online Learning En...
Participation Patterns in Formal, Non-Formal, and Informal Online Learning En...Richard Schwier
 
Aranès-català 01
Aranès-català 01Aranès-català 01
Aranès-català 01guest113035
 
Presentazione Festa Paas 2009
Presentazione Festa Paas 2009Presentazione Festa Paas 2009
Presentazione Festa Paas 2009Andrea Grandi
 
Using Videos in Online Learning - Take 2
Using Videos in Online Learning - Take 2Using Videos in Online Learning - Take 2
Using Videos in Online Learning - Take 2Stella Porto
 
Porto China-US Distance Education Research & Exchange 2011
Porto China-US Distance Education Research & Exchange 2011Porto China-US Distance Education Research & Exchange 2011
Porto China-US Distance Education Research & Exchange 2011Stella Porto
 
De Overheid verbonden in Openheid
De Overheid verbonden in OpenheidDe Overheid verbonden in Openheid
De Overheid verbonden in OpenheidFabrice Mous
 
ICDE 2015 - International Partnership
ICDE 2015 - International PartnershipICDE 2015 - International Partnership
ICDE 2015 - International PartnershipStella Porto
 
python-mafw intoduction at Maemo Summit 2009
python-mafw intoduction at Maemo Summit 2009python-mafw intoduction at Maemo Summit 2009
python-mafw intoduction at Maemo Summit 2009Andrea Grandi
 
Pacote De Biscoitosj
Pacote De BiscoitosjPacote De Biscoitosj
Pacote De Biscoitosjguestf77bdb
 
Designing for Change
Designing for ChangeDesigning for Change
Designing for ChangeFabrice Mous
 
Open Scholarship of Teaching and Learning
Open Scholarship of Teaching and LearningOpen Scholarship of Teaching and Learning
Open Scholarship of Teaching and LearningRichard Schwier
 
Pursuing the elusive metaphor of community in e-learning environments
Pursuing the elusive metaphor of community in e-learning environmentsPursuing the elusive metaphor of community in e-learning environments
Pursuing the elusive metaphor of community in e-learning environmentsRichard Schwier
 
Taller de creación literaria 2014
Taller de creación literaria 2014Taller de creación literaria 2014
Taller de creación literaria 2014dracruz
 
Competencies for DE professionals
Competencies for DE professionalsCompetencies for DE professionals
Competencies for DE professionalsStella Porto
 

Viewers also liked (20)

Building ColdFusion And AngularJS Applications
Building ColdFusion And AngularJS ApplicationsBuilding ColdFusion And AngularJS Applications
Building ColdFusion And AngularJS Applications
 
Git preso to valtech cfml team
Git preso to valtech cfml teamGit preso to valtech cfml team
Git preso to valtech cfml team
 
Participation Patterns in Formal, Non-Formal, and Informal Online Learning En...
Participation Patterns in Formal, Non-Formal, and Informal Online Learning En...Participation Patterns in Formal, Non-Formal, and Informal Online Learning En...
Participation Patterns in Formal, Non-Formal, and Informal Online Learning En...
 
Aranès-català 01
Aranès-català 01Aranès-català 01
Aranès-català 01
 
Presentazione Festa Paas 2009
Presentazione Festa Paas 2009Presentazione Festa Paas 2009
Presentazione Festa Paas 2009
 
Using Videos in Online Learning - Take 2
Using Videos in Online Learning - Take 2Using Videos in Online Learning - Take 2
Using Videos in Online Learning - Take 2
 
Porto China-US Distance Education Research & Exchange 2011
Porto China-US Distance Education Research & Exchange 2011Porto China-US Distance Education Research & Exchange 2011
Porto China-US Distance Education Research & Exchange 2011
 
De Overheid verbonden in Openheid
De Overheid verbonden in OpenheidDe Overheid verbonden in Openheid
De Overheid verbonden in Openheid
 
ICDE 2015 - International Partnership
ICDE 2015 - International PartnershipICDE 2015 - International Partnership
ICDE 2015 - International Partnership
 
Mountain
MountainMountain
Mountain
 
중국대지진
중국대지진중국대지진
중국대지진
 
python-mafw intoduction at Maemo Summit 2009
python-mafw intoduction at Maemo Summit 2009python-mafw intoduction at Maemo Summit 2009
python-mafw intoduction at Maemo Summit 2009
 
Pets in the US
Pets in the USPets in the US
Pets in the US
 
Pacote De Biscoitosj
Pacote De BiscoitosjPacote De Biscoitosj
Pacote De Biscoitosj
 
Designing for Change
Designing for ChangeDesigning for Change
Designing for Change
 
Open Scholarship of Teaching and Learning
Open Scholarship of Teaching and LearningOpen Scholarship of Teaching and Learning
Open Scholarship of Teaching and Learning
 
Pursuing the elusive metaphor of community in e-learning environments
Pursuing the elusive metaphor of community in e-learning environmentsPursuing the elusive metaphor of community in e-learning environments
Pursuing the elusive metaphor of community in e-learning environments
 
Taller de creación literaria 2014
Taller de creación literaria 2014Taller de creación literaria 2014
Taller de creación literaria 2014
 
Kaveri
KaveriKaveri
Kaveri
 
Competencies for DE professionals
Competencies for DE professionalsCompetencies for DE professionals
Competencies for DE professionals
 

Similar to ColdFusion Fw1 (FrameWork1) introduction

CFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful CodeCFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful Codeindiver
 
Using MVC with Kentico 8
Using MVC with Kentico 8Using MVC with Kentico 8
Using MVC with Kentico 8Thomas Robbins
 
Building Blocks of Angular 2 and ASP.NET Core
Building Blocks of Angular 2 and ASP.NET CoreBuilding Blocks of Angular 2 and ASP.NET Core
Building Blocks of Angular 2 and ASP.NET CoreLevi Fuller
 
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)Serena Software
 
Developing Portlets
Developing PortletsDeveloping Portlets
Developing Portletssydeburn
 
OSGi Community Event 2010 - OSGi Technical Update
OSGi Community Event 2010 - OSGi Technical UpdateOSGi Community Event 2010 - OSGi Technical Update
OSGi Community Event 2010 - OSGi Technical Updatemfrancis
 
(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in AlfrescoAngel Borroy López
 
MVC 6 - the new unified Web programming model
MVC 6 - the new unified Web programming modelMVC 6 - the new unified Web programming model
MVC 6 - the new unified Web programming modelAlex Thissen
 
Enhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptxEnhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptxRohit Radhakrishnan
 
How to configure alfred desktop in your alfresco project in two days
How to configure alfred desktop in your alfresco project in two daysHow to configure alfred desktop in your alfresco project in two days
How to configure alfred desktop in your alfresco project in two daysXeniT Solutions nv
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO DevsWO Community
 
Asp 1-mvc introduction
Asp 1-mvc introductionAsp 1-mvc introduction
Asp 1-mvc introductionFajar Baskoro
 
Edp bootstrapping a-software_company
Edp bootstrapping a-software_companyEdp bootstrapping a-software_company
Edp bootstrapping a-software_companyGanesh Kulkarni
 
ASP.NET MVC 2.0
ASP.NET MVC 2.0ASP.NET MVC 2.0
ASP.NET MVC 2.0Buu Nguyen
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...Frank Munz
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoopclairvoyantllc
 

Similar to ColdFusion Fw1 (FrameWork1) introduction (20)

CFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful CodeCFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful Code
 
Using MVC with Kentico 8
Using MVC with Kentico 8Using MVC with Kentico 8
Using MVC with Kentico 8
 
Drupal 8 - Quick bites
Drupal 8 - Quick  bitesDrupal 8 - Quick  bites
Drupal 8 - Quick bites
 
Building Blocks of Angular 2 and ASP.NET Core
Building Blocks of Angular 2 and ASP.NET CoreBuilding Blocks of Angular 2 and ASP.NET Core
Building Blocks of Angular 2 and ASP.NET Core
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvcAsp 1a-aspnetmvc
Asp 1a-aspnetmvc
 
Aspnetmvc 1
Aspnetmvc 1Aspnetmvc 1
Aspnetmvc 1
 
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)
Overview and Demonstration of Dimensions CM 14.2 (FUG presentation track 2)
 
Developing Portlets
Developing PortletsDeveloping Portlets
Developing Portlets
 
OSGi Community Event 2010 - OSGi Technical Update
OSGi Community Event 2010 - OSGi Technical UpdateOSGi Community Event 2010 - OSGi Technical Update
OSGi Community Event 2010 - OSGi Technical Update
 
(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco(Re)Indexing Large Repositories in Alfresco
(Re)Indexing Large Repositories in Alfresco
 
MVC 6 - the new unified Web programming model
MVC 6 - the new unified Web programming modelMVC 6 - the new unified Web programming model
MVC 6 - the new unified Web programming model
 
Enhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptxEnhanced Reframework Session_16-07-2022.pptx
Enhanced Reframework Session_16-07-2022.pptx
 
How to configure alfred desktop in your alfresco project in two days
How to configure alfred desktop in your alfresco project in two daysHow to configure alfred desktop in your alfresco project in two days
How to configure alfred desktop in your alfresco project in two days
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
 
Asp 1-mvc introduction
Asp 1-mvc introductionAsp 1-mvc introduction
Asp 1-mvc introduction
 
Edp bootstrapping a-software_company
Edp bootstrapping a-software_companyEdp bootstrapping a-software_company
Edp bootstrapping a-software_company
 
ASP.NET MVC 2.0
ASP.NET MVC 2.0ASP.NET MVC 2.0
ASP.NET MVC 2.0
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoop
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
 

Recently uploaded

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

ColdFusion Fw1 (FrameWork1) introduction

  • 2. 2 Agenda ColdFusion Frameworks • MVC • Dependency injection • ORM MVC • What is MVC • MVC Architecture FW 1 • What is FW1 • Action = Section & Item • Folder structure • Views • Layouts • Views & Layout functions & variables • Controller & services intro • Controllers • Services • Request Context • Method execution sequence • Configuration variables • Subsystems • Bean Factories
  • 4. 4 MVC Frameworks • Fusebox - www.fusebox.org - Oldest MVC framework - XML config files used to define application settings in old versions. - Not been updated since March 2008 - Fuseaction, circuit.xml, fusebox.xml - Current Version: Fusebox: 5.5 • Mach II - www.mach-ii.com - It was the first Object-Oriented framework for CFML. - Event based. listeners and filters defined in XML file - Current Version: Mach II: 1.8 • Model-Glue - www.model-glue.com - Event-based implicit invocation OO framework - direct integration with ColdSpring, Transfer and Reactor - Scaffolding functionality available with ORM - Current Version: Model-Glue: 3.2 RC
  • 5. 5 MVC Frameworks continues.. • ColdBox - www.coldbox.org - More than an MVC, it is a development kit and event driven remote framework - Rich documentation, CFB & cfeclipse tools - Current Version: ColdBox : 3.1 • CFWheels - www.cfwheels.org - MVC framework inspired by Ruby on Rails - It implements the Active Record Pattern for the built in Object- relational mapping. - Current Version: CF Wheels 1.1.5 • FW1 - http://fw1.riaforge.org - It is Convention over configuration MVC Framework. - Light weight - Current Version: FW1: 2.0 RC
  • 6. 6 DI Frameworks • LightWire - http://lightwire.riaforge.org - LightWire is optimized to create transient objects as well as singletons and allows for programmatic AS WELL AS XML configuration. • ColdSpring - www.coldspringframework.org - ColdSpring is a inversion-of-control framework/container for ColdFusion Compontents. • DI 1 - http://di1.riaforge.org - DI 1 is very lightweight, convention over configuration DI framework. - Development phase, can easily integrate with FW1
  • 7. 7 ORM Frameworks • Transfer - www.transfer-orm.com Main focus is to automate the repetitive tasks of creating the SQL and custom CFCs Developed by Mark Mandel, Great CFML contributor Current version 1.1 • Reactor - www.reactorframework.com Used to generate ColdFusion objects which are used to access data in your database • built-in ORM- www.adobe.com/orm Hibernate is high performance OR persistence & query service. Introduced in CF 9 & Railo 3.2
  • 9. 9 What Is MVC • Architectural Pattern often used by applications that need the ability to maintain multiple views of the same data. • Models for maintaining data. • Views for displaying all or a portion of the data. • Controllers for handling events that affect the model or view(s) • Usage Clarity Maintainability Reusability Teamwork
  • 12. 12 What is FW1 • Lightweight MVC framework developed by Sean Corfield • Convention over Configuration . No XML • Installing - Just extend your Application.cfc to FW1 core file • SES URLs support + =
  • 13. 13 Section & Item • All functionality are based upon the Action value • Action consists of a section and an item • Section is group of items Ex. Blog, comment • Item is a specific task inside a section Ex. List, Add, Update Index.cfm?action=blog.list (or) Index.cfm/blog/add/ (SES URL) • Default section is “Main” & default Item is “Default”
  • 14. 14 Folder Structure • Controllers • Views • Layouts • Services • gsfgsfgsfgsfg
  • 15. 15 Views • View is a User Interaction. [Form or UI] • View = html/css/js • Very little dynamic code Loops Sets IFs • View Contain full page content or Fragment • Folder per section with files named for item • All files and folders must be in lowercase.
  • 17. 17 Layouts • Layout is a Wrapper. It may render Header, Footer, Navigation. • Provided a variable named body • Generated output that the layout should wrap • Layout request is a cascaded action. A request can have 3 layouts executed • FW/1 looks for layouts in the following places: layouts/section/item.cfm layouts/section.cfm layouts/default.cfm • To stop the layout cascade, use request.layout = false. It is helpful for returning XML/JSON or AJAX calls
  • 19. 19 Views & Layout functions & variables Commonly used functions Variables view() body buildURL() rc[] layout() local[] getBeanFactory() framework[] request.layout
  • 20. 20 Controllers & Services • May contain a CFC for each section • Each CFC contains a method for each item • Caution: Cached in FW/1’s application cache! We can clear that cache using “?reload=true” querystring. Configurable using 3 options. reload = 'reload’ password = 'true’ reloadApplicationOnEveryRequest = false - Suitable for development phase • Methods Cached, so function local variables is not thread safe. So declare local variables using var
  • 21. 21 Controllers • Contain the high-level "traffic cop" logic • Validation and Control flow • commonly used functions variables.fw.redirect() variables.fw.service() variables.fw.setView() variables.fw.customizeViewOrLayoutPath()
  • 22. 22 Services • Intended to be agnostic of and decoupled from FW/1 conventions. • Inside controllers you can use the service() method to manually queue calls to service • Methods, passing the results back into the request.context.data
  • 23. 23 Controllers and Services Demo Application
  • 24. 24 The Request Context • The main “data bus” through the application. • Contains URL and FORM variables. • Controller methods receive an rc argument. • Service methods receive as argument collection. • All Views / layouts have access to rc.
  • 25. 25 Method execution sequence • Called by FW1 when asked for section.item: • Application.cfc : before() • controllers/section.cfc:before() • controllers/section.cfc:startItem() • controllers/section.cfc:item() • services/section.cfc:item() return value stored in rc.data • additional service calls added via service() API • controllers/section.cfc:endItem() • controllers/section.cfc:after() • Application.cfc : after() • All Methods are optional, if that do not exist are not called.
  • 27. 27 Configuration variables • All config is in a simple structure in Application.cfc variables.framework = { home = "main.default", defaultSection = 'main', defaultItem = 'default', usingSubsystems = true, defaultSubsystem = 'user', subsystemDelimiter = '-', siteWideLayoutSubsystem = "common", generateSES = true, SESOmitIndex = true, base = '/cfml', cfcbase = '/cfc' };
  • 30. 30 Subsystems • Drop an FW/1 app into an existing one • Used as modules with no parent app dependencies • Must enable in parent application’s Application.cfc • usingSubsystems = true • FW/1 Examples can be run standalone or as subsystems in another application
  • 32. 32 Bean Factories • Supports any bean factory (IoC Container or DI factory) with the following API methods containsBean(name) - returns true if factory knows of named bean getBean(name) - returns fully initialized bean identified by name IoC - Inversion of Control DI - Dependency Injection