66
A TALE OF LEGACY TO MODERNIZATION

Take your CFML Legacy Apps to Modernization

Embed Size (px)

Citation preview

Page 1: Take your CFML Legacy Apps to Modernization

A TALE OF LEGACY TO MODERNIZATION

Page 2: Take your CFML Legacy Apps to Modernization

WHO AM I?

• Luis Majano - Computer Engineer

• El Salvador

• Texas

• Computer Engineer

• CEO of Ortus Solutions

• Creator of many boxes

www.ortussolutions.com@ortussolutions

@lmajano

Page 3: Take your CFML Legacy Apps to Modernization

Story Time

You are still coding in that!

Page 4: Take your CFML Legacy Apps to Modernization

ME @ 2013

tooling

engine roadmaps

ecosystem

CLI

Package Manager

Frustration

Page 5: Take your CFML Legacy Apps to Modernization

CFML SHAMING

• Lack of tooling

• Package Management

• CLI

• OS Integrations

• Applications

• Legacy Hell

• Way behind the cool kids

Page 6: Take your CFML Legacy Apps to Modernization

CFML TOOLING LANDSCAPE

Copy + Paste

Page 7: Take your CFML Legacy Apps to Modernization

HOW DO WE MODERNIZE CFML?

Page 8: Take your CFML Legacy Apps to Modernization

Vendors Cannot Do It All!

THE HARD REALITY

Make CFML HUUGE Great AGAIN!!

Page 9: Take your CFML Legacy Apps to Modernization

Tooling

Community

Engine Portability

Containers

OUR FOCUS

Legacy Apps

Page 10: Take your CFML Legacy Apps to Modernization

TOOLING

Page 11: Take your CFML Legacy Apps to Modernization

CLI PackageManager

REPL

Read-EvalPrint-Loop

IntegratedServer

ScaffoldingForgeBox

CFML

ColdFusion Automation

3+ Years Now!

Page 12: Take your CFML Legacy Apps to Modernization

Come On! Get with the program!

Page 13: Take your CFML Legacy Apps to Modernization

COMMUNITY

•Newbie Initiatives•Documentation Priorities•ITB, ODW•All CFML Conferences•Non-CFML Conferences•API Implementations•Rollbar, github, bcrypt, S3, Google, freshbooks, twitter, salesforce, etc.

•Slack, blogs, webinars

Page 14: Take your CFML Legacy Apps to Modernization

FORGEBOX.IO

CFML Repository438+ contributions

9 Releases in < 1 yearGrowing Features

Do you have an account?

Page 15: Take your CFML Legacy Apps to Modernization

CONTAINERS

Page 16: Take your CFML Legacy Apps to Modernization

CFML + CONTAINERS

• Eliminate Dev-Ops Headaches

• Increased Security

• Zero-Downtime Deployments

• Scaleability and Fault Tolerance

Page 17: Take your CFML Legacy Apps to Modernization

DOCKERRun any CFML Engine

Run any WAR

Portable Server Settings

Portable CFML Engine Settings

Image Healthchecks

Secure Headless Modes

Page 18: Take your CFML Legacy Apps to Modernization

DOCKERH2 DB or any RDBMS

Auto session distribution

Auto cache distribution

Redis/Couchbase

Headless Mode

Page 19: Take your CFML Legacy Apps to Modernization

CFML Engines

PORTABILITY

Page 20: Take your CFML Legacy Apps to Modernization

• Package any server with server.json

• Updating CF engine install is a non-issue

• Use multiple CF engines/versions at the same time

• New Docker images make it easy for cloud scaling

• CFConfig one tool to rule them all

$ docker pull ortussolutions/commandbox$ docker run -v "/path/to/your/app:/app" ortussolutions/commandbox

PORTABILITY

Page 21: Take your CFML Legacy Apps to Modernization

BUT…..

Page 22: Take your CFML Legacy Apps to Modernization

LEGACY PROBLEM

• Gives CFML a bad name

• Security Issues

• Performance Issues

• Employee Issues

• Development Issues

• Finding Developer Issues

Page 23: Take your CFML Legacy Apps to Modernization

LEGACY PROBLEM

•>35% No MVC•>60% No DI•>55% No Testing

Page 24: Take your CFML Legacy Apps to Modernization

CAN’T FIND DEVELOPERS!

• 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?

Page 25: Take your CFML Legacy Apps to Modernization

YOU NEED TO ACT!

• Drive innovation internally• Get out of legacy hell, modernize• Build cool apps, APIs, libraries• Collaborate with open source• Share in forgebox.io• Blog, present, share your knowledge• Proud of your CFML apps again!

Page 26: Take your CFML Legacy Apps to Modernization

EVOLVE OR DIE!

Page 27: Take your CFML Legacy Apps to Modernization

The end!!

Page 28: Take your CFML Legacy Apps to Modernization

LEGACY PROBLEM

Page 29: Take your CFML Legacy Apps to Modernization

PAST EXPERIENCES

Page 30: Take your CFML Legacy Apps to Modernization

SPAGHETTI CODE (PROCEDURAL)

• Quick and dirty• Logic and display mixed together• Monolithic app design• No separation• Difficult to extend/scale

Page 31: Take your CFML Legacy Apps to Modernization

OBJECT ORIENTED (OO) - WITH MEATBALLS

• Logic organized better• Service-oriented• Monolithic app design • Some separation• Difficult to scale

Page 32: Take your CFML Legacy Apps to Modernization

MVC

• Separates layers of concerns• Helps enforce OO• Specialized team members• but….

• Layers are still tightly coupled

Page 33: Take your CFML Legacy Apps to Modernization

N-TIER - MEXICAN CHALUPA

• Add more layers for organization• Layers are still tightly coupled• Still monolithic!

Page 34: Take your CFML Legacy Apps to Modernization

ONCE YOUR APP GROWS….

• Complex real-life apps• Large “surface area”• So...much...code...• No one understands it all• Too big for one plate

// Don’t change this value, else things break.// Not sure how this works, don’t change.// Don’t remove this please, else nothing displays

Page 35: Take your CFML Legacy Apps to Modernization

PERFORMANCE

Page 36: Take your CFML Legacy Apps to Modernization

IF IT DOESN’T PERFORM……BIGGER HARDWARE!

Page 37: Take your CFML Legacy Apps to Modernization

IF IT STILL DOESN’T…

…MORE HARDWARE!

Page 38: Take your CFML Legacy Apps to Modernization

A FUNDAMENTAL CHANGE IN APPROACH OR UNDERLYING ASSUMPTIONS.

PARADIGM SHIFT:

MODERNIZE…

Page 39: Take your CFML Legacy Apps to Modernization

CFML : EVOLVED

• Modularization (HMVC)

• Cohesion + Coupling

• Containerization

• Feature Maps

• Parallel Development

• Continuous Improvement

• Microservices

Page 40: Take your CFML Legacy Apps to Modernization

MODULARITY TO THE RESCUE

• HMVC - Hierarchical MVC• Software Modules (ColdBox)• Break app into logical pieces

• Microservices• Drop-in functionality• Re-usable• Multi-team approach• Easier to distribute

Page 41: Take your CFML Legacy Apps to Modernization

HMVC

Page 42: Take your CFML Legacy Apps to Modernization

COHESION AND COUPLING

Page 43: Take your CFML Legacy Apps to Modernization

REAL LIFE MIGRATION

ColdBox Platform

<3

Page 44: Take your CFML Legacy Apps to Modernization

MODULE MAPS

ColdBox MVC 4I18n

Validation

JavaLoader

Mail Services

Debugger Security

AntiSamyORM

• 85% source code reduction• Rich eco-system• Less coupling• Higher cohesion• 35% performance improvements• Agile + Maintainable• Sanity

Page 45: Take your CFML Legacy Apps to Modernization

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

Page 46: Take your CFML Legacy Apps to Modernization

MICROSERVICES

• Make legacy code updates less intimidating

• Fewer resources required to maintain fault tolerance

• Versionable & maintainable• Short release cycles• Monolithic apps can be evolved piece

by piece

Page 47: Take your CFML Legacy Apps to Modernization

MICROSERVICES

M CV

M CV

M CV

Page 48: Take your CFML Legacy Apps to Modernization

PLATFORMS AS SERVICES (PAAS)

Page 49: Take your CFML Legacy Apps to Modernization

NEW PARADIGM: ORCHESTRATION

> Less is more

> Applications as collections of independent parts

> Incremental upgrades and versioning in lieu of massive release cycles

Page 50: Take your CFML Legacy Apps to Modernization

NEW PARADIGM: ORCHESTRATION

> Hardware Independence

> Platform independence

> Disposable instances: scale on-demand, teardown when demand decreases

Page 51: Take your CFML Legacy Apps to Modernization

FORMULA FOR SUCCESS

MICROSERVICES

Page 52: Take your CFML Legacy Apps to Modernization

STEP 1:Identify performance bottlenecks and pain points in your application

Page 53: Take your CFML Legacy Apps to Modernization

STEP 2:Build, test, and deploy new microservices to address and deliver the functionality of your pain points

Page 54: Take your CFML Legacy Apps to Modernization

STEP 3:Update endpoints in monolithic app to use new microservice endpoints

Page 55: Take your CFML Legacy Apps to Modernization

STEP 4:Rinse and repeat, with additional bottlenecks and pain points

Page 56: Take your CFML Legacy Apps to Modernization

TOOLSET

Page 57: Take your CFML Legacy Apps to Modernization

HMVCREST

Dependency InjectionBDD

Continuous IntegrationDocker

Page 58: Take your CFML Legacy Apps to Modernization

IN A…

Page 59: Take your CFML Legacy Apps to Modernization

INSTEAD OF ONE BIG THING, DOING MANY THINGS…

ISOLATE

ALL THE THINGS!

Page 60: Take your CFML Legacy Apps to Modernization

…WE DEVELOP MANY THINGS, EACH DOING ONE THING VERY, VERY WELL.

ISOLATE

ALL THE THINGS!

Page 61: Take your CFML Legacy Apps to Modernization

IF WE DO THIS, ONE SMALL PIECE AT A TIME

Page 62: Take your CFML Legacy Apps to Modernization

SOMEDAY SOON, THIS

Page 63: Take your CFML Legacy Apps to Modernization

EVOLVES INTO TO THIS

Page 64: Take your CFML Legacy Apps to Modernization

• Work is required• Renewed Creativity and Inspiration in Your Work• Sense of Accomplishment and Pride of Platform

( CFML! )• The REST if up to you!

NEW HORIZONS

Page 65: Take your CFML Legacy Apps to Modernization
Page 66: Take your CFML Legacy Apps to Modernization

The End!