SlideShare a Scribd company logo
Hierarchical MVC
Transform your Monolith
WHO AM I?
• Luis Majano
• Computer Engineer
• Born in El Salvador ->Texas
• CEO of Ortus Solutions
• Sandals -> ESRI -> Ortus
@lmajano
@ortussolutions
The Legacy Problem
Monolithic Applications
HMVC Architecture
ColdBox Modules
API Demo
THE LEGACY PROBLEM
LEGACY PROBLEM
• Gives CFML a bad name
• Security Issues
• Performance Issues
• Employee Issues
• Development Issues
• Finding Developer Issues
LEGACY PROBLEM
•>35% No MVC
•>60% No DI
•>55% No Testing
FuseBox is NOT MVC
LIKE MY CFML APP?
• MVC Framework or spaghetti hell?
• OO or cfinclude hell?
• Automated Tests? Continuous Integration?
• Agile/Scrum Methodologies?
• Source Control? (Zip files don’t count!)
• Continuous Delivery? Container Strategy?
• Developer Automation?
Monolithic Apps
Legacy Fun Comments
<!—- Do not remove the following lines or things break —>
<!— Dont’ know what this variable does, but don’t touch it —->
<!—- Remove at your own risk —->
<!—- I have no idea where this variable is set —>
“Software is always bound
to change”
BACK TO THE SCHOOL OF ARCHITECTURE
1. COHESION - COUPLING
2. MVC
• Separates layers of concerns
• Helps enforce OO
• Specialized team members
• but…..
• Layers are still tightly coupled
• MVC Monoliths
3. N-TIER - MEXICAN CHALUPA
• Add more layers for organization
• Layers are still tightly coupled
• Still monolithic!
• Yummy, but hard to eat!
4. HMVC
4. HMVC
• Evolution of MVC
• Independent MVCTriads
• Benefits
• Higher Cohesion
• Lower Coupling
• Modularization
• Better
• Organization
• Reusability
• Extensibility
• Testability
5. MICROSERVICES
AN APPROACH TO DEVELOPING A SINGLE
APPLICATION AS A SUITE OF SMALL SERVICES,
EACH RUNNING IN ITS OWN PROCESS AND
COMMUNICATING WITH LIGHTWEIGHT
MECHANISMS.
Martin Fowler
5. MICROSERVICES
M C
V
M C
V
M C
V
• Legacy code updates less intimidating
• Fault tolerance
• Versionable & Maintainable
• Short release cycles
• Monoliths Evolution
5. MICROSERVICES
Identify
Break	
Out
Scale
DOCKER PULL ORTUSSOLUTIONS/COMMANDBOX
Run any CFML Engine
Run any WAR
Portable Server Settings
Portable CFML Engine Settings
Image Healthchecks
Secure Headless Modes
HMVC Microservices
+
FORMULA FOR SUCCESS
A
FUNDAMENTAL
CHANGE IN
APPROACH OR
UNDERLYING
ASSUMPTIONS.
PARADIGM SHIFT:
MODERNIZE…
Let’s Begin!
Monolithic)
App)
App#Security#
Billing#
Blog#
Cart#
User#
Admin#
EVOLVE
TO 

HMVC MODULES
“As a system evolves, It’s complexity will increase unless work
is done to maintain or reduce it.” 

Lehman’s 2nd Law of software evolution
WHAT IS A MODULE?
"In structured design and data-driven design, a module is a
generic term used to describe a named and addressable
group of program statements” 

by Craig Borysowich (ChiefTechnologyTactician)
“A software module is a deployable, manageable, natively
reusable, composable, unit of software that provides a
concise interface to consumers.” 

by Kirk Knoernschild
COLDBOX MODULES = SUPER POWERS
• Supports HMVC since 2011
• MVC triads = Modules
• Addressable
• Composed (Inception)
• Dependencies
• At Runtime:
• Installed
• Reloaded
• Unloaded
COLDBOX MODULETRIADS
Host%Application%
Security%
News%
RSS%
eStore%
Admin%
Users% Comments% Posts% Billing%
WHAT DOYOU GET?
• MVC Conventions
• Automatic Model Mappings (DI)
• Automatic CFML Mappings
• Automatic URL Routing
• Automatic Interceptors
• Overridable Settings
• Environment Detection
• Module Dependencies
ColdBox MVC Application
handlers
layouts
models
modules
views
box.json
modules_app
Tracked by
CommandBox
Custom
Lists Dependencies
Anatomy of a Module
ModuleCong.cfc
handlers
layouts
models
modules
modules_app
Module Name

(unique on disk)
box.json
views
{
"name":"cbSwagger-shell",
"version":"1.1.0",
"slug":"cbSwagger-shell",
"private":false,
"dependencies":{
“coldbox":"^5.0.0",
“workbench":"git+https://github.com/ortus/unified-workbench.git",
"cbjavaloader":">1.0.0",
"swagger-sdk":">0.0.9"
},
"devDependencies":{
"testbox":"^2.8.0"
},
"installPaths":{
"coldbox":"coldbox/",
"testbox":"testbox/",
"cbjavaloader":"modules/cbjavaloader/",
"swagger-sdk":"modules/swagger-sdk/",
"workbench":"workbench"
},
"testbox":{
"runner":"http://localhost:49616"
},
"scripts":{
"postVersion":"recipe workbench/bump.boxr"
}
}
box.json
MODULECONFIG.CFC
• Simple CFC
• Bootstraps your module
• Must exist in the root of your module folder
• Has public properties
• Several callback methods
• Tier-detection enabled
• It’s an interceptor too!
MODULE PROPERTIES
component{
this.activate = true;
this.disabled = false;
this.title = "My Test Module";
this.author = "Luis Majano";
this.webURL = "http://www.coldbox.org";
this.description = "A funky test module";
this.version = "1.0.0";
this.viewParentLookup = true;
this.layoutParentLookup = true;
this.entryPoint = "/testing";
this.inheritEntryPoint = true;
this.autoMapModels = true;
this.modelNamespace = "cbstore";
this.cfmapping = "cbstore";
this.aliases = [ "store", "ecommerce", "shop" ];
this.dependencies = [ "JavaLoader", "CFCouchbase" ];
}
CALLBACK METHODS
MODULECONFIG.CFCCONFIGURE
function configure(){
        settings = {
            caching = false,
            mailTo = "lmajano@ortussolutions.com"
        };
        layoutSettings = { defaultLayout = "relax.cfm" };
        i18n = {
            resourceBundles = {
                "cbcore" = "#moduleMapping#/i18n/cbcore"
            },
            defaultLocale = "en_US",
            localeStorage = "cookie"
        };
        interceptorSettings = {
            // ContentBox Custom Events
            customInterceptionPoints = [
                // Code Rendering
                "cb_onContentRendering", "cb_onContentStoreRendering"
            ]
        };
router.
route( “/“ ).to( “Main.index” )
route( “/:handler/:action” ).end();
    }
Bonus:
ModuleCong is also an interceptor
box install cors
LEVERAGING WIREBOX
• Automatically maps all your models in the models folder:
• {modelName}@{moduleName}
• property name=“builder” inject=“builder@qb”
• If you have a model with the same name as your module, we have a shortcut injection:
• property name=“mockdataCFC” inject=“@mockdataCFC”
MODULAR EXECUTION
#runEvent( ‘module:users.dashboard' )#
DemoTime!
modules
v1 v2 vx
modules_app
API
handlers models
QUESTIONS?
Go Modularize!
www.ortussolutions.com
@ortussolutions

More Related Content

PDF
Cold box hierarchical mvc
PDF
ColdBox Hierarchical MVC for ColdFusion/CFML
PDF
ColdBox Hierarchical MVC - Transform Your Monolith
PDF
Take your CFML Legacy Apps to Modernization
PDF
The JavaFX Ecosystem
PPTX
Discuss About ASP.NET MVC 6 and ASP.NET MVC 5
PDF
Sergey Puzankov "How to see a bug the size of 1px"
 
PPTX
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Cold box hierarchical mvc
ColdBox Hierarchical MVC for ColdFusion/CFML
ColdBox Hierarchical MVC - Transform Your Monolith
Take your CFML Legacy Apps to Modernization
The JavaFX Ecosystem
Discuss About ASP.NET MVC 6 and ASP.NET MVC 5
Sergey Puzankov "How to see a bug the size of 1px"
 
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js

What's hot (19)

PPTX
The wild wild west of Selenium Capabilities
PPTX
MVC 6 Introduction
PPTX
Introducing ASP.NET Core 2.0
PPT
Testing Java Web Apps With Selenium
PPTX
Spring boot
PPTX
Spring Boot & WebSocket
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
PDF
Microservices with Spring Boot
PDF
Serverless in production, an experience report (codemotion milan)
PDF
JavaFX JumpStart @JavaOne 2016
PDF
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
PPTX
A. De Biase/C. Quatrini/M. Barsocchi - API Release Process: how to make peopl...
PDF
Apache DeltaSpike the CDI toolbox
PDF
How To Use Selenium Successfully (Java Edition)
PDF
Conquering AngularJS Limitations
PDF
Testing desktop apps with selenium
PDF
Asec r01-resting-on-your-laurels-will-get-you-pwned
PDF
Spring framework 3.2 > 4.0 — themes and trends
PDF
Getting Reactive with Spring Framework 5.0’s GA release
The wild wild west of Selenium Capabilities
MVC 6 Introduction
Introducing ASP.NET Core 2.0
Testing Java Web Apps With Selenium
Spring boot
Spring Boot & WebSocket
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Microservices with Spring Boot
Serverless in production, an experience report (codemotion milan)
JavaFX JumpStart @JavaOne 2016
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
A. De Biase/C. Quatrini/M. Barsocchi - API Release Process: how to make peopl...
Apache DeltaSpike the CDI toolbox
How To Use Selenium Successfully (Java Edition)
Conquering AngularJS Limitations
Testing desktop apps with selenium
Asec r01-resting-on-your-laurels-will-get-you-pwned
Spring framework 3.2 > 4.0 — themes and trends
Getting Reactive with Spring Framework 5.0’s GA release
Ad

Similar to Revamp your monolith with Hierarchical MVC at CFSummit 2018 (20)

PPTX
Training: MVVM Pattern
PDF
Intro to ColdBox MVC at Japan CFUG
PPTX
Modern ASP.NET Webskills
PPTX
Mobile App Architectures & Coding guidelines
PPTX
Knockout implementing mvvm in java script with knockout
PPTX
WPF For Beginners - Learn in 3 days
PDF
Asp 1a-aspnetmvc
PDF
Aspnetmvc 1
PPTX
Coldbox developer training – session 4
PPTX
Aspnet mvc
PPTX
Protractor survival guide
PDF
O2 platform and ASP.NET MVC, by Michael Hidalgo
PDF
How to grow your own Microservice?
PPTX
Advanced MVVM in Windows 8
PPTX
Adopting MVVM
PDF
The JavaFX Ecosystem
PPTX
Continuous Delivery Applied
PPTX
Continuous Delivery Applied
PPTX
Continuous Delivery Applied (Agile Richmond)
PPTX
Continuous delivery applied
Training: MVVM Pattern
Intro to ColdBox MVC at Japan CFUG
Modern ASP.NET Webskills
Mobile App Architectures & Coding guidelines
Knockout implementing mvvm in java script with knockout
WPF For Beginners - Learn in 3 days
Asp 1a-aspnetmvc
Aspnetmvc 1
Coldbox developer training – session 4
Aspnet mvc
Protractor survival guide
O2 platform and ASP.NET MVC, by Michael Hidalgo
How to grow your own Microservice?
Advanced MVVM in Windows 8
Adopting MVVM
The JavaFX Ecosystem
Continuous Delivery Applied
Continuous Delivery Applied
Continuous Delivery Applied (Agile Richmond)
Continuous delivery applied
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)

DOCX
The AUB Centre for AI in Media Proposal.docx
 
PPTX
Cloud computing and distributed systems.
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Approach and Philosophy of On baking technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
The AUB Centre for AI in Media Proposal.docx
 
Cloud computing and distributed systems.
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
sap open course for s4hana steps from ECC to s4
Per capita expenditure prediction using model stacking based on satellite ima...
Network Security Unit 5.pdf for BCA BBA.
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectroscopy.pptx food analysis technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
20250228 LYD VKU AI Blended-Learning.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Approach and Philosophy of On baking technology
Reach Out and Touch Someone: Haptics and Empathic Computing

Revamp your monolith with Hierarchical MVC at CFSummit 2018