SlideShare a Scribd company logo
1 of 21
Download to read offline
ColdBox <3 Legacy App
WRAP YOUR APP WITH IMPLICIT VIEW DISPATCH
Your Host #1
‣ Scott Coldwell
‣ Developer at Computer Know How
‣ Houston, TX
‣ CF dev since 2006
‣ @scottcoldwell
Your Host #2
‣ Brad Wood
‣ Developer at Ortus Solutions
‣ Kansas City, MO
‣ twitter: @bdw429s
ColdBox seems great!
But…😔
There’s HOPE!
‣ Define Implicit View Dispatch
‣ Practical steps to port your legacy app
‣ A vision for moving forward after porting
‣ Demo using CommandBox
What We’ll Learn
Implicating a dispatched view…huh?
‣ In ColdBox, if a view file exists, it can be called
without a handler
‣ The handler/event are implicitly created
‣ The view doesn’t need to know anything about
ColdBox
‣ You could write an entire app with only views
‣ If you could write an entire app with only views, you can drop an existing
application into the views directory, and it would run*!
‣ * slight modifications may be necessary‡
‣ ‡ … are almost definitely necessary
‣ Good news: fairly straightforward
Drop in that legacy app!
‣ Make URLs compatible (index.cfm)
‣ Deal with Application.cfc/cfm
‣ Routes
‣ cfincludes, createObject, etc
Overview of Must-Dos
‣ Primary concern: index.cfm in ColdBox URLs
‣ ColdBox has URLs like this out of the box:
‣ http://myapp.com/index.cfm/user/account
‣ But your app probably had a URL such as:
‣ http://myapp.com/user/account.cfm
‣ NOTE: the .cfm extension is no longer necessary, but IS permitted
‣ To fix: Enable SES URL setting in CB; web server rewrite rules (see docs)
Must Do: URL Compatibility
‣ Coldbox is now the Application.
‣ Settings, environment variables, and other magic must find a new home
‣ May I recommend ColdBox settings and environments?
‣ Datasources, mappings, etc can be moved to ColdBox’s Application.cfc
Must Do: Application.cfm/cfc
‣ ColdBox auto-generates (implicitly dispatches) handlers and routes for
most cases
‣ You need custom routes for 2+ deep directories
‣ 	addRoute(pattern="/ajax/tags/:action", handler="ajax/tags");
‣ Use CLI tools to get a list for you
‣ find with mindepth option
Must Do: Routes
‣ Prepend all <cfinclude> template values with /?views/
‣ - <cfinclude template=“/widgets/top_nav.cfm”>
‣ + <cfinclude template=“/views/widgets/top_nav.cfm”>
‣ - myObj = createObject(“component”,”cfc.myCoolObject”);
‣ + myObj = createObject(“component”,”views.cfc.myCoolObject”);
Must Dos: cfincludes, createObject, etc
‣ CFC invocation: createobject ()-> getModel()
‣ WireBox
‣ Move settings and environmental settings to ColdBox.cfc
‣ Utilize Layouts
‣ Assign layouts to views in ColdBox.cfc
‣ empty layout
Overview of Should-Dos
‣ Use getModel() instead of CreateObject()
‣ easy search/replace
‣ Use WireBox inside of model objects
‣ + <cfproperty name="myOldCFC" inject=“model:myOldCFC">
‣ - <cfset foobar = createObject("component","myOldCFC").doSomethingAwesome() />
‣ + <cfset foobar = myOldCFC.doSomethingAwesome() />
‣ Consider how to handle the init() call, if applicable
Should Do: CFC invocation
‣ ColdBox has great settings management
‣ ColdBox has great environment management
‣ Use them
‣ Search/replace
‣ - application.mySpecialSetting
‣ + getSetting("mySpecialSetting")
Should Do: Settings, environments
Should Do: Layouts
‣ See if it makes sense for your app
‣ Control multiple layouts via Coldbox.cfc
‣ Special cases
‣ Blank layout for ajax responses
‣ Move static assets to /includes
‣ Move CFCs to /models
‣ Utilize Security interceptor
‣ Configure WireBox for models
‣ Use RC scope instead of form/url
Overview of Could-Dos
‣ New development can be ColdBoxy
‣ Refactor legacy code to be MVC using models, handlers, and views
‣ Tighter integration with ColdBox offerings: (e.g. LogBox, ForgeBox items,
etc)
Going forward
‣ Lay as much groundwork as you can, but get it out the door
‣ Search and replace (with regex) is your friend!
‣ Use a build process, not just source control
‣ Don’t take on too much at once! Port the app, then refactor
Final Notes
ColdBox all the things

More Related Content

What's hot

Grunt training deck
Grunt training deckGrunt training deck
Grunt training deckJames Ford
 
Brad wood - Integrating MVC Into Legacy [Into The Box 2020]
Brad wood - Integrating MVC Into Legacy [Into The Box 2020]Brad wood - Integrating MVC Into Legacy [Into The Box 2020]
Brad wood - Integrating MVC Into Legacy [Into The Box 2020]Ortus Solutions, Corp
 
WordPress Bhubaneswar Meetup - dive into gutenberg creation
WordPress Bhubaneswar Meetup - dive into gutenberg creationWordPress Bhubaneswar Meetup - dive into gutenberg creation
WordPress Bhubaneswar Meetup - dive into gutenberg creationPriyanka Behera
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startQuentin Adam
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013Valeri Karpov
 
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapakBrief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapakRiza Fahmi
 
NodeSummit - MEAN Stack
NodeSummit - MEAN StackNodeSummit - MEAN Stack
NodeSummit - MEAN StackValeri Karpov
 
Progressive Web Apps. What, why and how
Progressive Web Apps. What, why and howProgressive Web Apps. What, why and how
Progressive Web Apps. What, why and howRiza Fahmi
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSJumping Bean
 
Preprocessor Workflow with Grunt
Preprocessor Workflow with GruntPreprocessor Workflow with Grunt
Preprocessor Workflow with GruntVlad Filippov
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesKeith Fitzgerald
 
NativeScript: mobile app. no webview.
NativeScript: mobile app. no webview.NativeScript: mobile app. no webview.
NativeScript: mobile app. no webview.Tomek Sułkowski
 
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...WordCamp Sydney
 
Integrating grunt and bower with maven
Integrating grunt and bower with mavenIntegrating grunt and bower with maven
Integrating grunt and bower with mavenRahul Nanwani
 
React Typescript for beginners: Translator app with Microsoft cognitive services
React Typescript for beginners: Translator app with Microsoft cognitive servicesReact Typescript for beginners: Translator app with Microsoft cognitive services
React Typescript for beginners: Translator app with Microsoft cognitive servicesFabio Biondi
 

What's hot (20)

Grunt training deck
Grunt training deckGrunt training deck
Grunt training deck
 
Stripe con 2021 UI stack
Stripe con 2021 UI stackStripe con 2021 UI stack
Stripe con 2021 UI stack
 
Brad wood - Integrating MVC Into Legacy [Into The Box 2020]
Brad wood - Integrating MVC Into Legacy [Into The Box 2020]Brad wood - Integrating MVC Into Legacy [Into The Box 2020]
Brad wood - Integrating MVC Into Legacy [Into The Box 2020]
 
WordPress Bhubaneswar Meetup - dive into gutenberg creation
WordPress Bhubaneswar Meetup - dive into gutenberg creationWordPress Bhubaneswar Meetup - dive into gutenberg creation
WordPress Bhubaneswar Meetup - dive into gutenberg creation
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to start
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
 
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapakBrief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
 
NodeSummit - MEAN Stack
NodeSummit - MEAN StackNodeSummit - MEAN Stack
NodeSummit - MEAN Stack
 
Progressive Web Apps. What, why and how
Progressive Web Apps. What, why and howProgressive Web Apps. What, why and how
Progressive Web Apps. What, why and how
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
Sculpin
SculpinSculpin
Sculpin
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Preprocessor Workflow with Grunt
Preprocessor Workflow with GruntPreprocessor Workflow with Grunt
Preprocessor Workflow with Grunt
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web Architectures
 
NativeScript: mobile app. no webview.
NativeScript: mobile app. no webview.NativeScript: mobile app. no webview.
NativeScript: mobile app. no webview.
 
Nodejs
NodejsNodejs
Nodejs
 
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
 
Integrating grunt and bower with maven
Integrating grunt and bower with mavenIntegrating grunt and bower with maven
Integrating grunt and bower with maven
 
Handle the error
Handle the errorHandle the error
Handle the error
 
React Typescript for beginners: Translator app with Microsoft cognitive services
React Typescript for beginners: Translator app with Microsoft cognitive servicesReact Typescript for beginners: Translator app with Microsoft cognitive services
React Typescript for beginners: Translator app with Microsoft cognitive services
 

Viewers also liked

Viewers also liked (20)

ITB2016 -BDD testing and automation from the trenches
ITB2016 -BDD testing and automation from the trenchesITB2016 -BDD testing and automation from the trenches
ITB2016 -BDD testing and automation from the trenches
 
ITB2016 - AWS lambda
ITB2016 - AWS lambdaITB2016 - AWS lambda
ITB2016 - AWS lambda
 
Sinister
SinisterSinister
Sinister
 
ORM Pink Unicorns
ORM Pink UnicornsORM Pink Unicorns
ORM Pink Unicorns
 
Pro forma
Pro formaPro forma
Pro forma
 
CBDW2014 - Intro to ContentBox Modular CMS for Java and ColdFusion
CBDW2014 - Intro to ContentBox Modular CMS for Java and ColdFusionCBDW2014 - Intro to ContentBox Modular CMS for Java and ColdFusion
CBDW2014 - Intro to ContentBox Modular CMS for Java and ColdFusion
 
Into The Box 2016 Keynote
Into The Box 2016 KeynoteInto The Box 2016 Keynote
Into The Box 2016 Keynote
 
Олі Мельник
Олі МельникОлі Мельник
Олі Мельник
 
Storyboard final
Storyboard finalStoryboard final
Storyboard final
 
Aritra Final Report Declaration
Aritra Final Report DeclarationAritra Final Report Declaration
Aritra Final Report Declaration
 
Presentation1 achu 2
Presentation1 achu 2Presentation1 achu 2
Presentation1 achu 2
 
Storyboard (day 1 of filming)
Storyboard (day 1 of filming)Storyboard (day 1 of filming)
Storyboard (day 1 of filming)
 
Into The Box 2015 Keynote
Into The Box 2015 KeynoteInto The Box 2015 Keynote
Into The Box 2015 Keynote
 
Физика и техника.
Физика и техника.Физика и техника.
Физика и техника.
 
Creating a Drop Shadow
Creating a Drop ShadowCreating a Drop Shadow
Creating a Drop Shadow
 
Michael jackson
Michael jacksonMichael jackson
Michael jackson
 
Presentation1
Presentation1Presentation1
Presentation1
 
Customer service lead
Customer service leadCustomer service lead
Customer service lead
 
Mood boards
Mood boards Mood boards
Mood boards
 
CBDW2014 - This is ColdBox 4
CBDW2014 - This is ColdBox 4CBDW2014 - This is ColdBox 4
CBDW2014 - This is ColdBox 4
 

Similar to ITB2016 Converting Legacy Apps into Modern MVC

iOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3cityiOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3cityMichał Zygar
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKBrendan Lim
 
Development tools at Base
Development tools at BaseDevelopment tools at Base
Development tools at BaseDominik Kapusta
 
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...Dominik Obermaier
 
Turku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsTurku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsJames Stone
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalDrupalDay
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 
Brad Wood integrating mvc into legacy
Brad Wood   integrating mvc into legacyBrad Wood   integrating mvc into legacy
Brad Wood integrating mvc into legacyOrtus Solutions, Corp
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Massimo Oliviero
 
More efficient, usable web
More efficient, usable webMore efficient, usable web
More efficient, usable webChris Mills
 
Autolayout primer
Autolayout primerAutolayout primer
Autolayout primerInferis
 
Android studio tips and tricks
Android studio tips and tricksAndroid studio tips and tricks
Android studio tips and tricksOleg Mazhukin
 
Building a JavaScript Module Framework at Gilt
Building a JavaScript Module Framework at GiltBuilding a JavaScript Module Framework at Gilt
Building a JavaScript Module Framework at GiltEric Shepherd
 
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
 Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2   Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2 Adil Khan
 
Can you contain the future - Docker, Container Technologies, The Future, and You
Can you contain the future - Docker, Container Technologies, The Future, and YouCan you contain the future - Docker, Container Technologies, The Future, and You
Can you contain the future - Docker, Container Technologies, The Future, and YouColdFusionConference
 
Practicing AppDevKit in kata training
Practicing AppDevKit in kata trainingPracticing AppDevKit in kata training
Practicing AppDevKit in kata traininganistar sung
 
2013-03-07 indie developer toolkit
2013-03-07 indie developer toolkit2013-03-07 indie developer toolkit
2013-03-07 indie developer toolkitCocoaHeads Tricity
 

Similar to ITB2016 Converting Legacy Apps into Modern MVC (20)

iOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3cityiOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3city
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDK
 
Development tools at Base
Development tools at BaseDevelopment tools at Base
Development tools at Base
 
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
 
Turku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsTurku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-components
 
JavaScript on the Desktop
JavaScript on the DesktopJavaScript on the Desktop
JavaScript on the Desktop
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Brad Wood integrating mvc into legacy
Brad Wood   integrating mvc into legacyBrad Wood   integrating mvc into legacy
Brad Wood integrating mvc into legacy
 
groovy & grails - lecture 9
groovy & grails - lecture 9groovy & grails - lecture 9
groovy & grails - lecture 9
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)
 
More efficient, usable web
More efficient, usable webMore efficient, usable web
More efficient, usable web
 
Autolayout primer
Autolayout primerAutolayout primer
Autolayout primer
 
Android studio tips and tricks
Android studio tips and tricksAndroid studio tips and tricks
Android studio tips and tricks
 
Building a JavaScript Module Framework at Gilt
Building a JavaScript Module Framework at GiltBuilding a JavaScript Module Framework at Gilt
Building a JavaScript Module Framework at Gilt
 
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
 Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2   Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
 
Can you contain the future - Docker, Container Technologies, The Future, and You
Can you contain the future - Docker, Container Technologies, The Future, and YouCan you contain the future - Docker, Container Technologies, The Future, and You
Can you contain the future - Docker, Container Technologies, The Future, and You
 
Practicing AppDevKit in kata training
Practicing AppDevKit in kata trainingPracticing AppDevKit in kata training
Practicing AppDevKit in kata training
 
ITB2016 Intro To ColdBox MVC
ITB2016   Intro To ColdBox MVCITB2016   Intro To ColdBox MVC
ITB2016 Intro To ColdBox MVC
 
2013-03-07 indie developer toolkit
2013-03-07 indie developer toolkit2013-03-07 indie developer toolkit
2013-03-07 indie developer toolkit
 

More from Ortus Solutions, Corp

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionOrtus Solutions, Corp
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Ortus Solutions, Corp
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfOrtus Solutions, Corp
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfOrtus Solutions, Corp
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfOrtus Solutions, Corp
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfOrtus Solutions, Corp
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfOrtus Solutions, Corp
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfOrtus Solutions, Corp
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfOrtus Solutions, Corp
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfOrtus Solutions, Corp
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfOrtus Solutions, Corp
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfOrtus Solutions, Corp
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfOrtus Solutions, Corp
 

More from Ortus Solutions, Corp (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Ortus Government.pdf
Ortus Government.pdfOrtus Government.pdf
Ortus Government.pdf
 
Luis Majano The Battlefield ORM
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
 
ITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdf
 

Recently uploaded

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 

Recently uploaded (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 

ITB2016 Converting Legacy Apps into Modern MVC

  • 1. ColdBox <3 Legacy App WRAP YOUR APP WITH IMPLICIT VIEW DISPATCH
  • 2. Your Host #1 ‣ Scott Coldwell ‣ Developer at Computer Know How ‣ Houston, TX ‣ CF dev since 2006 ‣ @scottcoldwell
  • 3. Your Host #2 ‣ Brad Wood ‣ Developer at Ortus Solutions ‣ Kansas City, MO ‣ twitter: @bdw429s
  • 6. ‣ Define Implicit View Dispatch ‣ Practical steps to port your legacy app ‣ A vision for moving forward after porting ‣ Demo using CommandBox What We’ll Learn
  • 7. Implicating a dispatched view…huh? ‣ In ColdBox, if a view file exists, it can be called without a handler ‣ The handler/event are implicitly created ‣ The view doesn’t need to know anything about ColdBox ‣ You could write an entire app with only views
  • 8. ‣ If you could write an entire app with only views, you can drop an existing application into the views directory, and it would run*! ‣ * slight modifications may be necessary‡ ‣ ‡ … are almost definitely necessary ‣ Good news: fairly straightforward Drop in that legacy app!
  • 9. ‣ Make URLs compatible (index.cfm) ‣ Deal with Application.cfc/cfm ‣ Routes ‣ cfincludes, createObject, etc Overview of Must-Dos
  • 10. ‣ Primary concern: index.cfm in ColdBox URLs ‣ ColdBox has URLs like this out of the box: ‣ http://myapp.com/index.cfm/user/account ‣ But your app probably had a URL such as: ‣ http://myapp.com/user/account.cfm ‣ NOTE: the .cfm extension is no longer necessary, but IS permitted ‣ To fix: Enable SES URL setting in CB; web server rewrite rules (see docs) Must Do: URL Compatibility
  • 11. ‣ Coldbox is now the Application. ‣ Settings, environment variables, and other magic must find a new home ‣ May I recommend ColdBox settings and environments? ‣ Datasources, mappings, etc can be moved to ColdBox’s Application.cfc Must Do: Application.cfm/cfc
  • 12. ‣ ColdBox auto-generates (implicitly dispatches) handlers and routes for most cases ‣ You need custom routes for 2+ deep directories ‣ addRoute(pattern="/ajax/tags/:action", handler="ajax/tags"); ‣ Use CLI tools to get a list for you ‣ find with mindepth option Must Do: Routes
  • 13. ‣ Prepend all <cfinclude> template values with /?views/ ‣ - <cfinclude template=“/widgets/top_nav.cfm”> ‣ + <cfinclude template=“/views/widgets/top_nav.cfm”> ‣ - myObj = createObject(“component”,”cfc.myCoolObject”); ‣ + myObj = createObject(“component”,”views.cfc.myCoolObject”); Must Dos: cfincludes, createObject, etc
  • 14. ‣ CFC invocation: createobject ()-> getModel() ‣ WireBox ‣ Move settings and environmental settings to ColdBox.cfc ‣ Utilize Layouts ‣ Assign layouts to views in ColdBox.cfc ‣ empty layout Overview of Should-Dos
  • 15. ‣ Use getModel() instead of CreateObject() ‣ easy search/replace ‣ Use WireBox inside of model objects ‣ + <cfproperty name="myOldCFC" inject=“model:myOldCFC"> ‣ - <cfset foobar = createObject("component","myOldCFC").doSomethingAwesome() /> ‣ + <cfset foobar = myOldCFC.doSomethingAwesome() /> ‣ Consider how to handle the init() call, if applicable Should Do: CFC invocation
  • 16. ‣ ColdBox has great settings management ‣ ColdBox has great environment management ‣ Use them ‣ Search/replace ‣ - application.mySpecialSetting ‣ + getSetting("mySpecialSetting") Should Do: Settings, environments
  • 17. Should Do: Layouts ‣ See if it makes sense for your app ‣ Control multiple layouts via Coldbox.cfc ‣ Special cases ‣ Blank layout for ajax responses
  • 18. ‣ Move static assets to /includes ‣ Move CFCs to /models ‣ Utilize Security interceptor ‣ Configure WireBox for models ‣ Use RC scope instead of form/url Overview of Could-Dos
  • 19. ‣ New development can be ColdBoxy ‣ Refactor legacy code to be MVC using models, handlers, and views ‣ Tighter integration with ColdBox offerings: (e.g. LogBox, ForgeBox items, etc) Going forward
  • 20. ‣ Lay as much groundwork as you can, but get it out the door ‣ Search and replace (with regex) is your friend! ‣ Use a build process, not just source control ‣ Don’t take on too much at once! Port the app, then refactor Final Notes
  • 21. ColdBox all the things