SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
ColdBox <3 Legacy App
IMPLICIT VIEW DISPATCH WRAPS YOUR APP IN COLDBOX
Your Host
‣ Scott Coldwell
‣ Developer at Computer Know How
‣ Houston, TX
‣ CF dev since 2006
‣ @scottcoldwell
‣ Define Implicit View Dispatch
‣ Practical steps to port your legacy app
‣ A vision for moving forward after porting
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

Weitere ähnliche Inhalte

Andere mochten auch

ITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSOrtus Solutions, Corp
 
ITB2015 - Real Life ContentBox Modular CMS
ITB2015 - Real Life ContentBox Modular CMSITB2015 - Real Life ContentBox Modular CMS
ITB2015 - Real Life ContentBox Modular CMSOrtus Solutions, Corp
 
Description and Critique of Slideshare
Description and Critique of SlideshareDescription and Critique of Slideshare
Description and Critique of Slidesharegtravis_9197
 
Nimmy digital text book
Nimmy digital text bookNimmy digital text book
Nimmy digital text booknimmysajikumar
 
話題呼
話題呼話題呼
話題呼eppii
 
Работа с подрядчиками
Работа с подрядчикамиРабота с подрядчиками
Работа с подрядчикамиAndrey Glinskiy
 
Star wars return of the jedi
Star wars   return of the jediStar wars   return of the jedi
Star wars return of the jediLucyAnne97
 
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 ColdFusionOrtus Solutions, Corp
 

Andere mochten auch (16)

ITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJS
 
ITB2015 - Real Life ContentBox Modular CMS
ITB2015 - Real Life ContentBox Modular CMSITB2015 - Real Life ContentBox Modular CMS
ITB2015 - Real Life ContentBox Modular CMS
 
Description and Critique of Slideshare
Description and Critique of SlideshareDescription and Critique of Slideshare
Description and Critique of Slideshare
 
과제 3
과제 3과제 3
과제 3
 
get name
get nameget name
get name
 
Gentech
GentechGentech
Gentech
 
forces
forcesforces
forces
 
Nimmy digital text book
Nimmy digital text bookNimmy digital text book
Nimmy digital text book
 
Story book evaluation
Story book evaluationStory book evaluation
Story book evaluation
 
話題呼
話題呼話題呼
話題呼
 
Работа с подрядчиками
Работа с подрядчикамиРабота с подрядчиками
Работа с подрядчиками
 
Star wars return of the jedi
Star wars   return of the jediStar wars   return of the jedi
Star wars return of the jedi
 
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
 
Center for Education on Social Responsibility (CESR) Introduction
Center for Education on Social Responsibility (CESR) IntroductionCenter for Education on Social Responsibility (CESR) Introduction
Center for Education on Social Responsibility (CESR) Introduction
 
Mood boards
Mood boards Mood boards
Mood boards
 
მუქარა
მუქარამუქარა
მუქარა
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Kürzlich hochgeladen (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

ITB2015 - Migrating legacy applications to ColdBox MVC

  • 1. ColdBox <3 Legacy App IMPLICIT VIEW DISPATCH WRAPS YOUR APP IN COLDBOX
  • 2. Your Host ‣ Scott Coldwell ‣ Developer at Computer Know How ‣ Houston, TX ‣ CF dev since 2006 ‣ @scottcoldwell
  • 3. ‣ Define Implicit View Dispatch ‣ Practical steps to port your legacy app ‣ A vision for moving forward after porting What We’ll Learn
  • 4. 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
  • 5. ‣ 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!
  • 6. ‣ Make URLs compatible (index.cfm) ‣ Deal with Application.cfc/cfm ‣ Routes ‣ cfincludes, createObject, etc Overview of Must-Dos
  • 7. ‣ 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
  • 8. ‣ 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
  • 9. ‣ 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
  • 10. ‣ 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
  • 11. ‣ 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
  • 12. ‣ 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
  • 13. ‣ ColdBox has great settings management ‣ ColdBox has great environment management ‣ Use them ‣ Search/replace ‣ - application.mySpecialSetting ‣ + getSetting(“mySpecialSetting”) Should Do: Settings, environments
  • 14. Should Do: Layouts ‣ See if it makes sense for your app ‣ Control multiple layouts via Coldbox.cfc ‣ Special cases ‣ Blank layout for ajax responses
  • 15. ‣ 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
  • 16. ‣ 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
  • 17. ‣ 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
  • 18. ColdBox all the things