TeraTech

The ColdFusion Experts: Develop | Secure | Optimize

  • Services
  • About
  • CF Alive
  • Blog
  • Podcast
  • Contact

  • Services
  • About
  • CF Alive
  • Blog
  • Podcast
  • Contact

059 Migrating legacy CFML to MVC (Model View Controller) with Nolan Erck

February 20, 2018 By Michaela Light 3 Comments

Nolan Erck talks about “Migrating legacy CFML to MVC (Model View Controller)” in this episode of the CF Alive Podcast, with host Michaela Light.

Contents

  • Episode highlights
  • Nolan’s CF Summit workshop description
  • Mentioned in this episode
  • Bio
  • Interview transcript

 

Episode highlights

  • What exactly is legacy ColdFusion?
    • A broad term
    • Non-framework code
    • Might use CFIncludes or some CFCs to be modular
    • Even giant 10k lines of code
    • Self-posting forms
  • What the MVC design pattern is and what problems it solves
    • MVC = Model View Controller
      • Model = biz logic and SQL
      • View = front end UI – HTML, CSS, JS
      • Controller = the glue that holds the Model and View together and says which part calls which
    • Customer in a restaurant ordering from a Menu (View) from a Waiter (Controller) to make the food in the kitchen (Model)
    • Maintenance easier
    • Whack a mole bugs
    • Biz logic, HTML, JS and SQL all mixed up together
    • Bit rot/Technical debt
    • Hard for designers to edit the code as the HTML is mixed up
    • Merge conflicts
    • Hard to fully test
      • Manually testing
    • Duplicate code, unused code (deadwood)
    • Specialization of labor
      • UI experts
      • CF developer
      • SQL database engineer
  • How the FW/1 and ColdBox frameworks use a convention-based approach to bring consistent structure to an application
    • Both are modern MVC
    • Use folder to separate the three parts, file naming conventions
    • FW/1 is minimalist, one file, easy to get started
      • MuraCMS uses it
    • ColdBox is heavyweight with more features and add-on packs in the Box ecosphere
      • Testing
      • Caching
      • Etc
      • Ortus supports
    • Other MVC frameworks that are not as maintained
      • CFWheels – These are convention based frameworks
      • Fusebox – XML config file framework
      • Mode Glue – XML config file framework
      • Mach-ii – These are convention based frameworks
  • What Dependency Injection (DI) is, how it simplifies the “model” portion of applications, and how they are used in FW/1 and ColdBox
    • Keeps your objects organized
    • Tools
      • DI/1
      • Wirebox
    • We did a whole interview on this topic in another episode of CF Alive
    • DRY = Don’t Repeat Yourself
    • DI and MVC are independent
  • How to refactor real-world procedural code into MVC-style code
    • What code belongs in the model, the view, and how the controller ties the two together.
    • Cut parts out of giant file to include files
      • Move out the SQL and CF logic
      • Dedup similar code
      • Move out the front end code to View include files
      • Start running with the remaining code in the View
  • Strategies for migrating large applications in phases.
    • ColdBox legacy tool feature
    • Version code such as Git
      • 2 branches
        • Legacy
        • MVC
      • Maintain both
      • AB test each branch
    • All URLs will change
  • Using CommandBox and Git to spin up on-demand instances of ColdFusion and manage our code.
    • CommandBox
      • command line CF
      • Instant server setup or config
      • Any version, Adobe ColdFusion, Railo, Lucee CFML
  • Tool costs
    • FW/1 free
    • ColdBox free, pay or training and support
    • CommandBox – free
    • Git free to paid
    • Source Tree – free
    • Sublime Text – free to shareware paid $35
    • CF Builder free 30-day trial, $300
  • Why are you proud to use CF?
  • WWIT for you to make CF more alive this year?
  • What did you enjoy at CF Summit?

Nolan’s CF Summit workshop description

Do you maintain legacy ColdFusion applications, perhaps written with old procedural-style code? Have you been told you should be using a Model-View-Controller (MVC) framework but don't really understand how that works? Does the idea of rewriting the entire application seem like an impossible task? What if you could instead revamp your code in phases, without having to do it all at once?

Come to this workshop and learn:

  • What the MVC design pattern is and what problems it solves
  • How the FW/1 and ColdBox frameworks use a convention-based approach to bring consistent structure to an application
  • What Dependency Injection (DI) is, how it simplifies the “model” portion of applications, and how they are used in FW/1 and ColdBox
  • How to refactor real-world procedural code into MVC-style code

Hands-on portion of the workshop will:

  • Analyze and deconstruct a simple procedural application to see what code belongs in the model, the view, and how the controller ties the two together.
  • Move the code into the appropriate MVC layers and test it.
  • Discuss strategies for migrating large applications in phases.
  • Use CommandBox and Git to spin up on-demand instances of ColdFusion and manage our code.

This workshop will help anyone with a moderate skill level in ColdFusion, and at least some familiarity with object-oriented programming concepts. It will be a Bring-Your-Own-Laptop session. Prior to the CF Summit we will provide links and instructions to download and install CommandBox and the sample application code.

Mentioned in this episode

  • MVC
  • FW/1
  • ColdBox
  • Dependency Injection, why is it awesome and why should I care? with Nolan Erck
  • Kishore CF Summit East episode
  • Adobe CF Summit (Las Vegas)
  • OrtusSolutions
  • BlueRiver
  • DI/1
  • Wirebox
  • CommandBox
  • Git episode
  • Sublime Text
  • CF Builder
  • Convective CF tuning guide 
  • Bring Order to the Chaos: Take the MVC Plunge

And to continue learning how to make your ColdFusion apps more modern and alive, I encourage you to download our free ColdFusion Alive Best Practices Checklist.

Because… perhaps you are responsible for a mission-critical or revenue-generating CF application that you don’t trust 100%, where implementing new features is a painful ad-hoc process with slow turnaround even for simple requests.

What if you have no contingency plan for a sudden developer departure or a server outage? Perhaps every time a new freelancer works on your site, something breaks. Or your application availability, security, and reliability are poor.

And if you are depending on ColdFusion for your job, then you can’t afford to let your CF development methods die on the vine.

You’re making a high-stakes bet that everything is going to be OK using the same old app creation ways in that one language — forever.

All it would take is for your fellow CF developer to quit or for your CIO to decide to leave the (falsely) perceived sinking ship of CFML and you could lose everything—your project, your hard-won CF skills, and possibly even your job.

Luckily, there are a number of simple, logical steps you can take now to protect yourself from these obvious risks.

No Brainer ColdFusion Best Practices to Ensure You Thrive No Matter What Happens Next

ColdFusion Alive Best Practices Checklist

ColdFusion Alive Best Practices Checklist

Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.

√ Easily create a consistent server architecture across development, testing, and production

√ A modern test environment to prevent bugs from spreading

√ Automated continuous integration tools that work well with CF

√ A portable development environment baked into your codebase… for free!

 

Learn about these and many more strategies in our free ColdFusion Alive Best Practices Checklist.

http://traffic.libsyn.com/coldfusionalive/059_Migrating_legacy_CFML_to_MVC_Model_View_Controller_with_Nolan_Erck.mp3

Podcast: Play in new window | Download | Embed

Subscribe: Apple Podcasts | RSS

Bio

Nolan Erck has been developing software for 19 years. Starting in the video game industry working on titles for Maxis and LucasArts, then advancing to web development in 1999, his list of credits includes Grim Fandango, StarWars Rogue Squadron, SimPark, SimSafari as well as high-traffic websites for clients. Nolan manages the SacInteractive User Group, teaches classes on aspects of software development, and regularly gives presentations at conferences and user groups across the country. He is also Chief consultant at South of Shasta.

Interview transcript

Michaela Light 0:01
Welcome back to the show. And today we're going to be looking at migrating legacy cold fusion code to MBC. That's model view controller for those of you haven't come across it yet have been around for quite a while. And we'll look in the episode with Nolan arc, who is the chief genius at south of Sastre

does a lot of ColdFusion. And he's been doing software development for like 19 or 20 years now.

And we'll look at what MBC is, and what problem it solves. And in particular, we'll dig down into framework one and code box, which are two frameworks which use MBC. And we'll also look at dependency injection and why you should be using that in your MBC apps, and how you can use it in framework one and code box and how you can refactor your real world procedural code. I think that procedural code maybe as a special way of saying it might be a little like spaghetti but maybe not. Maybe

Your code is better.

And we'll look at some strategies for migrating large apps

over to MPC in phases, so you don't have to freak out with this. And if we get time, we'll also mentioned CommandBox and get and how they could help you out do this faster. So welcome, Nolan.

Nolan Erck 1:18
Thank you. Thanks for having me.

Michaela Light 1:19
Yeah. So I know you did a whole day workshop on this at CF Summit out in Las Vegas. And you had hordes of developers learning how to do it, or a horde is about 40 people, I think,

Nolan Erck 1:34
yeah, we had, I think there were about 40 students in the class.

Michaela Light 1:38
That's great. So what exactly is legacy ColdFusion because that term gets thrown around a lot.

Nolan Erck 1:47
It does. And that's a that's a pretty broad, maybe ambiguous term. My opinion is, it's 2018. Pretty much any ColdFusion code that is not really

In a proper framework ColdBox, framework one,

Read more

Related Posts

  • TestBox and MockBox- How Using Them Helps ColdFusion Leaders Save MoneyTestBox and MockBox- How Using Them Helps ColdFusion Leaders Save Money
  • Adobe ColdFusion Summit East 2019 Full ReportAdobe ColdFusion Summit East 2019 Full Report
  • 4 Ways to Recognize a Good ColdFusion Consultant4 Ways to Recognize a Good ColdFusion Consultant
  • ColdFusion Hosting (How To Choose the Best One)ColdFusion Hosting (How To Choose the Best One)
  • Introducing Swansea Jack (Lucee CFML 6 announced)Introducing Swansea Jack (Lucee CFML 6 announced)
  • 096 Adobe ColdFusion 2020 Roadmap (Multi-cloud, micro-services and more), with Ashish Garg096 Adobe ColdFusion 2020 Roadmap (Multi-cloud, micro-services and more), with Ashish Garg
  • Facebook
  • Twitter
  • LinkedIn

Filed Under: CF Alive Podcast, CFSummit Tagged With: CF Summit, ColdFusion, Into The Box

← Previous Post 8 Important Components for a Leader of a ColdFusion Development Project
Next Post → 059 Migrating legacy CFML to MVC (Model View Controller) with Nolan Erck- Transcript

Subscribe on iTunes

CF Alive Best Practices Checklist

 

Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.

Recent Posts

  • 4 Reasons Why Your ColdFusion Web Apps Are Suffering (And How To Avoid It)
  • Google Down – An Unprecedented Event (Save Your Data Fast!)
  • 107 ColdFusion 2021 Revealing Details on How it was Created with Rakshith Naresh
  • Into The Box LatAm 2020 Virtual Conference – Free to Register!
  • Slow ColdFusion Applications May Ruin Your Business (3 Steps to Prevent It)

Categories

  • ActionScript
  • Adobe CF Summit
  • Adobe CF Summit East
  • Adobe CF Summit East 2018
  • Adobe ColdFusion 11
  • Adobe ColdFusion 2020 Beta
  • Adobe ColdFusion 2021
  • Adobe ColdFusion Project Stratus
  • Adobe ColdFusion Security
  • AIR
  • Ajax
  • AngularJS
  • Announcement
  • API
  • Apollo
  • Auto Security Lockdown
  • AWS
  • C#
  • Certification
  • CF Alive
  • CF Alive Book
  • CF Alive Podcast
  • CF Camp
  • CF Developer week
  • CF Maintenance
  • CF Summit India
  • CF Tags
  • CF Training
  • CF Vs. Other Languages
  • CFEclipse
  • CFML
  • CFML Open- Source
  • CFObjective
  • cfquery
  • CFSummit
  • CFUnited
  • China Chopper
  • CIO
  • Classes
  • Client Highlights
  • ColdBox
  • ColdFusion
  • ColdFusion 2018
  • ColdFusion 2020
  • ColdFusion 2021
  • ColdFusion 9
  • ColdFusion community
  • ColdFusion Conference
  • ColdFusion Consulting
  • ColdFusion Developer
  • ColdFusion Development
  • ColdFusion Hosting
  • ColdFusion Security
  • ColdFusion Webinar
  • CommandBox
  • Conference
  • Cool Stuff
  • Culture
  • Cybercrime
  • Database
  • Development Approach
  • DevOps
  • Docker
  • Fixinator
  • Flex
  • Frameworks
  • Fusebox
  • FusionReactor
  • Futurology
  • Garbage Collector
  • Google Down
  • Into The Box Latam
  • IntoTheBox Conference
  • Java
  • JavaScript
  • JVM
  • Learn ColdFusion
  • Legacy Code
  • Load Testing
  • Lucee
  • Management
  • MAX
  • MDCFUG Lunch
  • Microsoft Azure
  • Mindmapping
  • MockBox
  • Modernize ColdFusion
  • Monitoring
  • Muracon
  • NCDevCon
  • New Intern
  • News
  • Node.js
  • Open- Source
  • ORM
  • Ortus Developer Week
  • Ortus Roadshow
  • Performance
  • Performance Tuning
  • PHP
  • Productivity
  • Programming Languages
  • Project planning
  • Query of Queries
  • Roadmap
  • Scalability
  • Security
  • Server Software
  • Server Tuning
  • Social Media
  • Spiral Web
  • SQL
  • Success Story
  • Survey
  • Technology
  • TestBox
  • Tips
  • Transcript
  • Trapeze Development
  • Uncategorized
  • Web 2.0
  • Web Application
  • Web Server
  • Webinar
  • Webmail
  • What is ColdFusion?
  • Whole Brain Development
  • Women in Tech
  • Work From Home

Recent Comments

  • Michaela Light on A Comprehensive Guide to Running a Successful CFML Project
  • Michaela Light on Is Lucee CFML now better than Adobe ColdFusion?
  • Michaela Light on Introducing Swansea Jack (Lucee CFML 6 announced)
  • Michaela Light on 082 ColdFusion and the Blockchain Revolution with Mike Brunt
  • Michaela Light on 082 ColdFusion and the Blockchain Revolution with Mike Brunt
  • Home
  • Services
  • About Us
  • CF Alive
    • CF Alive Book
    • CF Alive Inner Circle
    • CF Alive full resources cheatsheet
  • Blog
  • Podcast
    • Podcast Guest schedule
  • Contact
  • Sitemap

The ColdFusion Experts:
Develop, Secure, Optimize

TeraTech Inc
451 Hungerford Drive Suite 119
Rockville, MD 20850

Tel : +1 (301) 424 3903
Fax: +1 (301) 762 8185

Follow us on Facebook Follow us on LinkedIn Follow us on Twitter Follow us on Pinterest Follow us on YouTube

Copyright © 1998–2021 TeraTech Inc. All rights Reserved.