SlideShare a Scribd company logo
Integrating MVC into
legacy
There is hope yet
The State of Your App
● What does your app look like?
● Using other frameworks?
● Partially converted to Coldbox?
● What are your goals?
Reasons to migrate to a modern framework
● Code organization
● Devs are all using the same organization and patterns
● Consolidated functionality like logging, caching, tier
detection
● Regular updates
● Makes your dev shop more attractive to prospective
employees
Gotcha’s
● You still have to write code
● Not a silver bullet
● Don’t try a full 100% rewrite
● Baby steps are better than trying everything new at once
● Refactor, refactor, refactor
● The pilot system (write a throwaway test)
Legacy/ColdBox App Demo
https://github.com/bdw429s/coldbox-legacy-app-demo
● Clone repo and start server
● Each page tells you how it works
● Half of the demo site runs legacy .cfm files
● Half of the demo site runs ColdBox handlers
Install ColdBox
● Environment (tier) detection
● Can use legacy checks for environment
● It’s ok for the ColdBox config to reference old application
variables
● It’s also possible to find/replace legacy code to use
ColdBox settings!
Application.cfm -> Application.cfc
● Convert <CFApplication> tag to “this.settings”
<CFApplication
name=”myApp”
sessionManagement=”true”>
this.name=”myApp”;
this.sessionManagement=”true”;
Application.cfm -> Application.cfc
● Watch out for transcendent variables scope
○ Use onRequest() if needed
function onRequest( targetPage ) {
variables.mySetting = “myValue”;
include arguments.targetPage;
}
Add in ColdBox bootstrap
● ColdBox is always loaded
○ onApplicationStart()
● You get to decide what requests will be
processed by ColdBox
○ onRequestStart()
Add in ColdBox bootstrap
● Non ColdBox requests need some magic for
Coldbox to be usable
application.cbController.getModuleService().loadMappings();
● You can manually announce core interception points
for consolidated logic
application.cbController.getInterceptorService().processState("preProcess");
Create a Layout
● Convert your main layout
● Reuse as much as possible via includes
● This will let you start converting views
event.setLayout( “main” )
Start plugging in ColdBox aspects
● Proactively convert legacy:
○ Logging -> LogBox
○ Caching -> CacheBox
○ CFC creation -> Wirebox
● This can happen outside of ColdBox!
application.wirebox.getInstance( “myService” )
Pick a site area to start
● Maybe something simple like login
● Move .cfm pages into a view
○ Implicit view dispatch
○ Swap out build links calls
<a href=”/login.cfm”>Login</a>
<a href=”#event.buildLink(“main.login”)#”>Login</a>
Handle external URLs
● Just change them and have people update
bookmarks
● Put in URL rewrites at the web server level
● Put in routing in your Application.cfc to
re-route to ColdBox
Shorten your feedback loop
● When you have a part of the app working, test it and RELEASE IT!
● Don’t try to save up and do a huge chunk. You’ll never finish!
● Use this as an opportunity to do script conversion, etc but don’t get
bogged down
● Employ group code reviews to discuss conventions and stay on the
same page
● Make sure you update your product owner so they know about your
progress!

More Related Content

PPT
Starting with Reactjs
PPTX
A Brief Introduction to React.js
PDF
Robust web apps with React.js
PPTX
React, Flux and more (p1)
PPTX
001. Introduction about React
PPTX
MOKA .Net Study Week 03
PDF
Introduction to ReactJS
PPTX
Getting Started With ReactJS
Starting with Reactjs
A Brief Introduction to React.js
Robust web apps with React.js
React, Flux and more (p1)
001. Introduction about React
MOKA .Net Study Week 03
Introduction to ReactJS
Getting Started With ReactJS

What's hot (20)

PDF
Jayway Web Tech Radar 2015
PDF
Go With The Flow
PDF
So you want to write a cloud function
PDF
Introduction to react
PPTX
React js Online Training
PDF
Orchestrating workflows Apache Airflow on GCP & AWS
PDF
From business requirements to working pipelines with apache airflow
PPTX
Introduction to react_js
PDF
React Fundamentals - Jakarta JS, Apr 2016
PDF
React JS - Introduction
PDF
Introduction to React, Flux, and Isomorphic Apps
PDF
React + Redux for Web Developers
PPTX
React.js - The Dawn of Virtual DOM
PDF
React.js+Redux Workshops
PDF
Understanding Facebook's React.js
PPT
React js
PPTX
Introduction to react js
PPTX
Experiences sharing about Lambda, Kinesis, and Postgresql
PDF
Introduction to the qooxdoo Inspector
PDF
Embracing Serverless with Google
Jayway Web Tech Radar 2015
Go With The Flow
So you want to write a cloud function
Introduction to react
React js Online Training
Orchestrating workflows Apache Airflow on GCP & AWS
From business requirements to working pipelines with apache airflow
Introduction to react_js
React Fundamentals - Jakarta JS, Apr 2016
React JS - Introduction
Introduction to React, Flux, and Isomorphic Apps
React + Redux for Web Developers
React.js - The Dawn of Virtual DOM
React.js+Redux Workshops
Understanding Facebook's React.js
React js
Introduction to react js
Experiences sharing about Lambda, Kinesis, and Postgresql
Introduction to the qooxdoo Inspector
Embracing Serverless with Google
Ad

Similar to Brad Wood integrating mvc into legacy (20)

PDF
Itb2018 integrating mvc into legacy
PDF
Intro to ColdBox MVC at Japan CFUG
PDF
ITB2016 Converting Legacy Apps into Modern MVC
PDF
CBDW2014 - This is ColdBox 4
PDF
ITB 2023 Real World ColdBox App Architecture - Nolan Erck.pdf
PPTX
ColdFusion Fw1 (FrameWork1) introduction
PDF
ColdBox Hierarchical MVC for ColdFusion/CFML
PDF
Power of Simplicity in FW/1
PDF
CFWheels - Pragmatic, Beautiful Code
PDF
Take your CFML Legacy Apps to Modernization
PDF
ITB2016 Intro To ColdBox MVC
PDF
Into The Box 2018 Ortus Keynote
PPTX
ColdSpring the basics
PDF
Cold box hierarchical mvc
PDF
Revamp your monolith with Hierarchical MVC at CFSummit 2018
PDF
Itb 2021 - Bulding Quick APIs by Gavin Pickin
PPT
ColdFusion framework comparison
PPTX
Level up your front-end skills- going beyond cold fusion’s ui tags
PDF
Setup ColdFusion application using fusebox mvc architecture
PPTX
CODE IGNITER
Itb2018 integrating mvc into legacy
Intro to ColdBox MVC at Japan CFUG
ITB2016 Converting Legacy Apps into Modern MVC
CBDW2014 - This is ColdBox 4
ITB 2023 Real World ColdBox App Architecture - Nolan Erck.pdf
ColdFusion Fw1 (FrameWork1) introduction
ColdBox Hierarchical MVC for ColdFusion/CFML
Power of Simplicity in FW/1
CFWheels - Pragmatic, Beautiful Code
Take your CFML Legacy Apps to Modernization
ITB2016 Intro To ColdBox MVC
Into The Box 2018 Ortus Keynote
ColdSpring the basics
Cold box hierarchical mvc
Revamp your monolith with Hierarchical MVC at CFSummit 2018
Itb 2021 - Bulding Quick APIs by Gavin Pickin
ColdFusion framework comparison
Level up your front-end skills- going beyond cold fusion’s ui tags
Setup ColdFusion application using fusebox mvc architecture
CODE IGNITER
Ad

More from Ortus Solutions, Corp (20)

PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
PDF
June Webinar: BoxLang-Dynamic-AWS-Lambda
PDF
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
PDF
What's-New-with-BoxLang-Brad Wood.pptx.pdf
PDF
Getting Started with BoxLang - CFCamp 2025.pdf
PDF
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
PDF
What's New with BoxLang Led by Brad Wood.pdf
PDF
Vector Databases and the BoxLangCFML Developer.pdf
PDF
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
PDF
Use JSON to Slash Your Database Performance.pdf
PDF
Portable CI wGitLab and Github led by Gavin Pickin.pdf
PDF
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
PDF
Supercharging CommandBox with Let's Encrypt.pdf
PDF
Spice up your site with cool animations using GSAP..pdf
PDF
Passkeys and cbSecurity Led by Eric Peterson.pdf
PDF
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
PDF
Integrating the OpenAI API in Your Coldfusion Apps.pdf
PDF
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
PDF
Geting-started with BoxLang Led By Raymon Camden.pdf
PDF
From Zero to CRUD with ORM - Led by Annette Liskey.pdf
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
June Webinar: BoxLang-Dynamic-AWS-Lambda
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
What's-New-with-BoxLang-Brad Wood.pptx.pdf
Getting Started with BoxLang - CFCamp 2025.pdf
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
What's New with BoxLang Led by Brad Wood.pdf
Vector Databases and the BoxLangCFML Developer.pdf
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
Use JSON to Slash Your Database Performance.pdf
Portable CI wGitLab and Github led by Gavin Pickin.pdf
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
Supercharging CommandBox with Let's Encrypt.pdf
Spice up your site with cool animations using GSAP..pdf
Passkeys and cbSecurity Led by Eric Peterson.pdf
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Integrating the OpenAI API in Your Coldfusion Apps.pdf
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
Geting-started with BoxLang Led By Raymon Camden.pdf
From Zero to CRUD with ORM - Led by Annette Liskey.pdf

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Approach and Philosophy of On baking technology
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Machine Learning_overview_presentation.pptx
PPT
Teaching material agriculture food technology
PPTX
TLE Review Electricity (Electricity).pptx
Empathic Computing: Creating Shared Understanding
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Spectroscopy.pptx food analysis technology
Approach and Philosophy of On baking technology
OMC Textile Division Presentation 2021.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
MIND Revenue Release Quarter 2 2025 Press Release
Univ-Connecticut-ChatGPT-Presentaion.pdf
Machine Learning_overview_presentation.pptx
Teaching material agriculture food technology
TLE Review Electricity (Electricity).pptx

Brad Wood integrating mvc into legacy

  • 2. The State of Your App ● What does your app look like? ● Using other frameworks? ● Partially converted to Coldbox? ● What are your goals?
  • 3. Reasons to migrate to a modern framework ● Code organization ● Devs are all using the same organization and patterns ● Consolidated functionality like logging, caching, tier detection ● Regular updates ● Makes your dev shop more attractive to prospective employees
  • 4. Gotcha’s ● You still have to write code ● Not a silver bullet ● Don’t try a full 100% rewrite ● Baby steps are better than trying everything new at once ● Refactor, refactor, refactor ● The pilot system (write a throwaway test)
  • 5. Legacy/ColdBox App Demo https://github.com/bdw429s/coldbox-legacy-app-demo ● Clone repo and start server ● Each page tells you how it works ● Half of the demo site runs legacy .cfm files ● Half of the demo site runs ColdBox handlers
  • 6. Install ColdBox ● Environment (tier) detection ● Can use legacy checks for environment ● It’s ok for the ColdBox config to reference old application variables ● It’s also possible to find/replace legacy code to use ColdBox settings!
  • 7. Application.cfm -> Application.cfc ● Convert <CFApplication> tag to “this.settings” <CFApplication name=”myApp” sessionManagement=”true”> this.name=”myApp”; this.sessionManagement=”true”;
  • 8. Application.cfm -> Application.cfc ● Watch out for transcendent variables scope ○ Use onRequest() if needed function onRequest( targetPage ) { variables.mySetting = “myValue”; include arguments.targetPage; }
  • 9. Add in ColdBox bootstrap ● ColdBox is always loaded ○ onApplicationStart() ● You get to decide what requests will be processed by ColdBox ○ onRequestStart()
  • 10. Add in ColdBox bootstrap ● Non ColdBox requests need some magic for Coldbox to be usable application.cbController.getModuleService().loadMappings(); ● You can manually announce core interception points for consolidated logic application.cbController.getInterceptorService().processState("preProcess");
  • 11. Create a Layout ● Convert your main layout ● Reuse as much as possible via includes ● This will let you start converting views event.setLayout( “main” )
  • 12. Start plugging in ColdBox aspects ● Proactively convert legacy: ○ Logging -> LogBox ○ Caching -> CacheBox ○ CFC creation -> Wirebox ● This can happen outside of ColdBox! application.wirebox.getInstance( “myService” )
  • 13. Pick a site area to start ● Maybe something simple like login ● Move .cfm pages into a view ○ Implicit view dispatch ○ Swap out build links calls <a href=”/login.cfm”>Login</a> <a href=”#event.buildLink(“main.login”)#”>Login</a>
  • 14. Handle external URLs ● Just change them and have people update bookmarks ● Put in URL rewrites at the web server level ● Put in routing in your Application.cfc to re-route to ColdBox
  • 15. Shorten your feedback loop ● When you have a part of the app working, test it and RELEASE IT! ● Don’t try to save up and do a huge chunk. You’ll never finish! ● Use this as an opportunity to do script conversion, etc but don’t get bogged down ● Employ group code reviews to discuss conventions and stay on the same page ● Make sure you update your product owner so they know about your progress!