SlideShare a Scribd company logo
Putting Legacy to REST
with Middleware
By:
Adam Culp
Twitter: @adamculp
2
Putting Legacy to REST with Middleware
●
About me
– DevRel and Tech Lead at Nexmo
– OSS Contributor
– PHP-Fig voting member (IBM i Toolkit)
– Organizer SoFloPHP (South Florida)
– Organizer SunshinePHP (Miami)
– Long distance (ultra) runner
– Judo Black Belt Instructor
3
Putting Legacy to REST with Middleware
●
About me
– DevRel and Tech Lead at Nexmo
– OSS Contributor
– PHP-Fig voting member (IBM i Toolkit)
– Organizer SoFloPHP (South Florida)
– Organizer SunshinePHP (Miami)
– Long distance (ultra) runner
– Judo Black Belt Instructor
I am the
PHP Ninja!!!
4
Putting Legacy to REST with Middleware
●
Fan of iteration
– Pretty much everything requires iteration to do well:
●
Long distance running
●
Judo
●
Development
●
Evading project managers
●
Refactoring!
5
Refactoring Legacy Code
●
What is “Legacy Code”?
– Is there a coding standard for your project?
6
Refactoring Legacy Code
●
What is “Legacy Code”?
– Is there a coding standard for your project?
– Is code using OOP?
7
Refactoring Legacy Code
●
What is “Legacy Code”?
– Is there a coding standard for your project?
– Is code using OOP?
– Is Composer used in your project?
8
Refactoring Legacy Code
●
What is “Legacy Code”?
– Is there a coding standard for your project?
– Is code using OOP?
– Is Composer used in your project?
– Is the project using a framework?
9
Refactoring Legacy Code
●
What is “Legacy Code”?
– Is there a coding standard for your project?
– Is code using OOP?
– Is Composer used in your project?
– Is the project using a framework?
– Are you unit testing?
10
Refactoring Legacy Code
●
What is “Legacy Code”?
– Is there a coding standard for your project?
– Is code using OOP?
– Is Composer used in your project?
– Is the project using a framework?
– Are you unit testing?
– Does your project avoid NIH?
11
Refactoring Legacy Code
●
What is “Legacy Code”?
– Is there a coding standard for your project?
– Is code using OOP?
– Is Composer used in your project?
– Is the project using a framework?
– Are you unit testing?
– Does your project avoid NIH?
If you can answer “No” to any of these,
you may be creating “Legacy Code”!!!
12
Refactoring Legacy Code
●
What is “legacy” really?
– According to https://en.wikipedia.org/wiki/Legacy_code
●
“...no longer supported or manufactured...”
●
“...code inserted into modern software for the purpose of maintaining
an older or previously supported feature...”
●
“...supporting older file formats...”
●
“...code may no longer work without changes...”
●
“...code that no longer runs on a later version of a system, or requires
a compatibility layer to do so...”
13
Putting Legacy to REST with Middleware
●
Why Rewrite?
– Change technology (PHP to Javascript, Python, etc.)
– Code is REALLY bad
– If less expensive to rewrite versus refactor
– Little to no chance to lose business logic
– Desire a “different” application
14
Putting Legacy to REST with Middleware
●
API First!
– API is first class citizen
15
Putting Legacy to REST with Middleware
●
API First!
– API is first class citizen
– API comes first, then implementation
16
Putting Legacy to REST with Middleware
●
API First!
– API is first class citizen
– API comes first, then implementation
– Development teams can work in parallel
17
Putting Legacy to REST with Middleware
●
API First!
– API is first class citizen
– API comes first, then implementation
– Development teams can work in parallel
– Reduces cost of developing apps
●
Through re-use of business logic
18
Putting Legacy to REST with Middleware
●
API First!
– API is first class citizen
– API comes first, then implementation
– Development teams can work in parallel
– Reduces cost of developing apps
●
Through re-use of business logic
– Faster time to market
19
Putting Legacy to REST with Middleware
●
API First!
– API is first class citizen
– API comes first, then implementation
– Development teams can work in parallel
– Reduces cost of developing apps
●
Through re-use of business logic
– Faster time to market
– OpenAPI
20
Putting Legacy to REST with Middleware
●
API First!
– API is first class citizen
– API comes first, then implementation
– Development teams can work in parallel
– Reduces cost of developing apps
●
Through re-use of business logic
– Faster time to market
– OpenAPI
– Reduces risk of failure
21
Putting Legacy to REST with Middleware
●
Modernization Methods
22
Putting Legacy to REST with Middleware
●
Modernization Methods
– #1 Total Rewrite
●
Create entirely new app
●
Build until complete
●
Big BANG!
23
Putting Legacy to REST with Middleware
●
Modernization Methods
– #1 Total Rewrite
●
Create entirely new app
●
Build until complete
●
Big BANG!
24
Putting Legacy to REST with Middleware
●
Modernization Methods
– #1 Total Rewrite
●
Create entirely new app
●
Build until complete
●
Big BANG!
●
Pitfalls
– Constant “scope creep”
– Maintain 2 apps
– Expensive!
25
Putting Legacy to REST with Middleware
●
Modernization Methods
– #1 Total Rewrite
●
Create entirely new app
●
Build until complete
●
Big BANG!
●
Pitfalls
– Constant “scope creep”
– Maintain 2 apps
– Expensive!
●
Benefits
– Clean slate
– Energy/Excitement
– Less business disruption
26
Putting Legacy to REST with Middleware
●
Modernization Methods (cont’d)
– #2 REST API Backend
●
Build an API
●
Use the API to drive logic and data
27
Putting Legacy to REST with Middleware
●
Modernization Methods (cont’d)
– #2 REST API Backend
●
Build an API
●
Use the API to drive logic and data
●
Pitfalls
– Requires cleanup of objects first
– Longer time to get productive
– Very difficult for spaghetti apps
28
Putting Legacy to REST with Middleware
●
Modernization Methods (cont’d)
– #2 REST API Backend
●
Build an API
●
Use the API to drive logic and data
●
Pitfalls
– Requires cleanup of objects first
– Longer time to get productive
– Very difficult for spaghetti apps
●
Benefits
– Cleans up data/business logic
– Shorter time to completion
29
Putting Legacy to REST with Middleware
●
Modernization Methods #2 (How-To)
– Create standalone REST API
●
Add one module at a time
30
Putting Legacy to REST with Middleware
●
Modernization Methods #2 (How-To)
– Create standalone REST API
●
Add one module at a time
– Refactor the Legacy application to use API as Service/Model
31
Putting Legacy to REST with Middleware
●
Modernization Methods #2 (How-To)
– Create standalone REST API
●
Add one module at a time
– Refactor the Legacy application to use API as Service/Model
– Eventually API First, w/ frontend application
32
Putting Legacy to REST with Middleware
●
Modernization Methods (cont’d)
– #3 Legacy Middleware
●
New application (as with rewrite)
●
In stages
33
Putting Legacy to REST with Middleware
●
Modernization Methods (cont’d)
– #3 Legacy Middleware
●
New application (as with rewrite)
●
In stages
●
Pitfalls
– Takes upfront planning
– Takes longer
– Overall, still creating 2 new apps
– Not API first until the end
34
Putting Legacy to REST with Middleware
●
Modernization Methods (cont’d)
– #3 Legacy Middleware
●
New application (as with rewrite)
●
In stages
●
Pitfalls
– Takes more planning
– Takes longer
– Overall, still creating 2 new apps
– Not API first until the end
●
Benefits
– Can update/implement new frontend faster (duplicated)
– Spaghetti app easier to manage
– Less business impact
– Marketing “new” features regularly
35
Putting Legacy to REST with Middleware
●
Modernization Methods #3 (How-To)
– New sub-directory for new app
36
Putting Legacy to REST with Middleware
●
Modernization Methods #3 (How-To)
– New sub-directory for new app
– Create LegacyMiddleware, add it before FinalMiddleware
37
Putting Legacy to REST with Middleware
●
Modernization Methods #3 (How-To)
– New sub-directory for new app
– Create LegacyMiddleware, add it before FinalMiddleware
– Fix issues with routing and includes
38
Putting Legacy to REST with Middleware
●
Modernization Methods #3 (How-To)
– New sub-directory for new app
– Create LegacyMiddleware, add it before FinalMiddleware
– Fix issues with routing and includes
– Update doc_root to be new location
●
Site working as it used to
39
Putting Legacy to REST with Middleware
●
Modernization Methods #3 (How-To)
– New sub-directory for new app
– Create LegacyMiddleware, add it before FinalMiddleware
– Fix issues with routing and includes
– Update doc_root to be new location
●
Site working as it used to
– Start creating new modules in new app
40
Putting Legacy to REST with Middleware
●
Modernization Methods #3 (How-To)
– New sub-directory for new app
– Create LegacyMiddleware, add it before FinalMiddleware
– Fix issues with routing and includes
– Update doc_root to be new location
●
Site working as it used to
– Start creating new modules in new app
– LegacyMiddleware called less and less
41
Putting Legacy to REST with Middleware
●
Modernization Methods #3 (How-To)
– New sub-directory for new app
– Create LegacyMiddleware, add it before FinalMiddleware
– Fix issues with routing and includes
– Update doc_root to be new location
●
Site working as it used to
– Start creating new modules in new app
– LegacyMiddleware called less and less
– Remove legacy app once all endpoints satisfied
42
Putting Legacy to REST with Middleware
●
What is “Middleware”?
– NEW? way to build multi-layers as tiered approach to execution
– “Software glue” - wikipedia
●
Implement communication and input/output
●
Popular in ‘80s to link newer applications to legacy systems
43
Putting Legacy to REST with Middleware
●
Frameworks!
– Expressive (Laminas Project, formerly Zend Framework)
– Slim PHP
– Most others:
●
Laravel
●
Symfony
●
Etc.
44
Putting Legacy to REST with Middleware
●
Testing
– Always test prior to refactoring
– Then refactor
– Then test again
– Refactor tests as needed
– Repeat
45
Putting Legacy to REST with Middleware
●
Tools
– Source Control
●
Allows easier rollback
●
Allows collaboration
●
Git makes branching easier
46
Putting Legacy to REST with Middleware
●
Tools (cont’d)
– CI/CD
●
Makes updates across team seamless
47
Putting Legacy to REST with Middleware
●
Conclusion
– Middleware makes modernization easier
– Do it in stages
– Test all the things...often
– Teamwork
– Love iteration!
48
Putting Legacy to REST with Middleware
●
Go!
– Your turn!
●
Thank you!
– Code: https://github.com/adamculp/
Adam Culp
https://beachcasts.com
https://geekyboy.com
https://rungeekradio.com
Twitter @adamculp
Questions?

More Related Content

What's hot

Hopper services
Hopper servicesHopper services
Hopper services
hopperdev
 
Manila MuleSoft Meetup - May 2018
Manila MuleSoft Meetup - May 2018Manila MuleSoft Meetup - May 2018
Manila MuleSoft Meetup - May 2018
Ryan Anthony Andal
 
Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019
Christopher Co
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangalore
D.Rajesh Kumar
 
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
Chen Cheng-Wei
 
MuleSoft approach to the integration - Warsaw MuleSoft Meetup
MuleSoft approach to the integration - Warsaw MuleSoft MeetupMuleSoft approach to the integration - Warsaw MuleSoft Meetup
MuleSoft approach to the integration - Warsaw MuleSoft Meetup
Patryk Bandurski
 
Ruby conf
Ruby confRuby conf
Ruby conf
Shweta Kale
 
MuleSoft Milano Meetup #7 Florence Consulting
MuleSoft Milano Meetup #7  Florence Consulting MuleSoft Milano Meetup #7  Florence Consulting
MuleSoft Milano Meetup #7 Florence Consulting
Florence Consulting
 
Rich Ajax Platform - theEdge 2012 conference presentation
Rich Ajax Platform - theEdge 2012 conference presentationRich Ajax Platform - theEdge 2012 conference presentation
Rich Ajax Platform - theEdge 2012 conference presentation
Nicko Borodachuk
 
Sydney MuleSoft Meetup #16 - 19 November 2020
Sydney MuleSoft Meetup #16 - 19 November 2020Sydney MuleSoft Meetup #16 - 19 November 2020
Sydney MuleSoft Meetup #16 - 19 November 2020
Royston Lobo
 
Manila MuleSoft Meetup - July 2019
Manila MuleSoft Meetup - July 2019Manila MuleSoft Meetup - July 2019
Manila MuleSoft Meetup - July 2019
Ryan Anthony Andal
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
Adam Paxton
 
Building APIs with the OpenApi Spec
Building APIs with the OpenApi SpecBuilding APIs with the OpenApi Spec
Building APIs with the OpenApi Spec
Pedro J. Molina
 
Two Unique Challenges NetApp has tackled while Implementing Machine Translati...
Two Unique Challenges NetApp has tackled while Implementing Machine Translati...Two Unique Challenges NetApp has tackled while Implementing Machine Translati...
Two Unique Challenges NetApp has tackled while Implementing Machine Translati...
TAUS - The Language Data Network
 
MuleSoft São Paulo Meetup #3 - 18 Jun
MuleSoft São Paulo Meetup #3 - 18 JunMuleSoft São Paulo Meetup #3 - 18 Jun
MuleSoft São Paulo Meetup #3 - 18 Jun
Guilherme Pereira Silva
 
Real-Time Metrics and Distributed Monitoring - Jeff Pierce, Change.org - Dev...
Real-Time Metrics and Distributed Monitoring - Jeff Pierce, Change.org -  Dev...Real-Time Metrics and Distributed Monitoring - Jeff Pierce, Change.org -  Dev...
Real-Time Metrics and Distributed Monitoring - Jeff Pierce, Change.org - Dev...
DevOpsDays Tel Aviv
 
Front-end for Java developers Devoxx France 2018
Front-end for Java developers Devoxx France 2018Front-end for Java developers Devoxx France 2018
Front-end for Java developers Devoxx France 2018
Deepu K Sasidharan
 
Java 10 and beyond: Keeping up with the language and planning for the future
Java 10 and beyond: Keeping up with the language and planning for the futureJava 10 and beyond: Keeping up with the language and planning for the future
Java 10 and beyond: Keeping up with the language and planning for the future
Rogue Wave Software
 
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
SmartBear
 
Mule 4 meetup @Hyderabad
Mule 4 meetup @HyderabadMule 4 meetup @Hyderabad
Mule 4 meetup @Hyderabad
Vijay Reddy
 

What's hot (20)

Hopper services
Hopper servicesHopper services
Hopper services
 
Manila MuleSoft Meetup - May 2018
Manila MuleSoft Meetup - May 2018Manila MuleSoft Meetup - May 2018
Manila MuleSoft Meetup - May 2018
 
Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangalore
 
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
DevOps:建造開發維運的跨界之橋 (@ C.C. Agile #37)
 
MuleSoft approach to the integration - Warsaw MuleSoft Meetup
MuleSoft approach to the integration - Warsaw MuleSoft MeetupMuleSoft approach to the integration - Warsaw MuleSoft Meetup
MuleSoft approach to the integration - Warsaw MuleSoft Meetup
 
Ruby conf
Ruby confRuby conf
Ruby conf
 
MuleSoft Milano Meetup #7 Florence Consulting
MuleSoft Milano Meetup #7  Florence Consulting MuleSoft Milano Meetup #7  Florence Consulting
MuleSoft Milano Meetup #7 Florence Consulting
 
Rich Ajax Platform - theEdge 2012 conference presentation
Rich Ajax Platform - theEdge 2012 conference presentationRich Ajax Platform - theEdge 2012 conference presentation
Rich Ajax Platform - theEdge 2012 conference presentation
 
Sydney MuleSoft Meetup #16 - 19 November 2020
Sydney MuleSoft Meetup #16 - 19 November 2020Sydney MuleSoft Meetup #16 - 19 November 2020
Sydney MuleSoft Meetup #16 - 19 November 2020
 
Manila MuleSoft Meetup - July 2019
Manila MuleSoft Meetup - July 2019Manila MuleSoft Meetup - July 2019
Manila MuleSoft Meetup - July 2019
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
 
Building APIs with the OpenApi Spec
Building APIs with the OpenApi SpecBuilding APIs with the OpenApi Spec
Building APIs with the OpenApi Spec
 
Two Unique Challenges NetApp has tackled while Implementing Machine Translati...
Two Unique Challenges NetApp has tackled while Implementing Machine Translati...Two Unique Challenges NetApp has tackled while Implementing Machine Translati...
Two Unique Challenges NetApp has tackled while Implementing Machine Translati...
 
MuleSoft São Paulo Meetup #3 - 18 Jun
MuleSoft São Paulo Meetup #3 - 18 JunMuleSoft São Paulo Meetup #3 - 18 Jun
MuleSoft São Paulo Meetup #3 - 18 Jun
 
Real-Time Metrics and Distributed Monitoring - Jeff Pierce, Change.org - Dev...
Real-Time Metrics and Distributed Monitoring - Jeff Pierce, Change.org -  Dev...Real-Time Metrics and Distributed Monitoring - Jeff Pierce, Change.org -  Dev...
Real-Time Metrics and Distributed Monitoring - Jeff Pierce, Change.org - Dev...
 
Front-end for Java developers Devoxx France 2018
Front-end for Java developers Devoxx France 2018Front-end for Java developers Devoxx France 2018
Front-end for Java developers Devoxx France 2018
 
Java 10 and beyond: Keeping up with the language and planning for the future
Java 10 and beyond: Keeping up with the language and planning for the futureJava 10 and beyond: Keeping up with the language and planning for the future
Java 10 and beyond: Keeping up with the language and planning for the future
 
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
 
Mule 4 meetup @Hyderabad
Mule 4 meetup @HyderabadMule 4 meetup @Hyderabad
Mule 4 meetup @Hyderabad
 

Similar to Putting legacy to REST with middleware

[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project
[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project
[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project
Rakuten Group, Inc.
 
Maintaining and Releasing Open Source Software
Maintaining and Releasing Open Source SoftwareMaintaining and Releasing Open Source Software
Maintaining and Releasing Open Source Software
Joel Nothman
 
The PRPL Pattern
The PRPL PatternThe PRPL Pattern
The PRPL Pattern
Red Pill Now
 
Cytoscape: Now and Future
Cytoscape: Now and FutureCytoscape: Now and Future
Cytoscape: Now and Future
Keiichiro Ono
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
LINAGORA
 
Broadcast Music Inc - Scaling Up, Doing More, Having More Fun!
Broadcast Music Inc - Scaling Up, Doing More, Having More Fun!Broadcast Music Inc - Scaling Up, Doing More, Having More Fun!
Broadcast Music Inc - Scaling Up, Doing More, Having More Fun!
ghodgkinson
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New Tricks
ServerlessConf
 
The Right Tool for the Right Project
The Right Tool for the Right ProjectThe Right Tool for the Right Project
The Right Tool for the Right Project
Ori Bendet
 
Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015
Dominique Boutin
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changes
Jaewoo Ahn
 
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
Dan Cundiff
 
Splunk for Developers
Splunk for DevelopersSplunk for Developers
Splunk for Developers
Splunk
 
Splunk for Developers Breakout Session
Splunk for Developers Breakout SessionSplunk for Developers Breakout Session
Splunk for Developers Breakout Session
Splunk
 
Refactoring Legacy Code
Refactoring Legacy CodeRefactoring Legacy Code
Refactoring Legacy Code
Adam Culp
 
Developing apps faster
Developing apps fasterDeveloping apps faster
Developing apps faster
Zend by Rogue Wave Software
 
Splunk for Developers
Splunk for DevelopersSplunk for Developers
Splunk for Developers
Splunk
 
Free Mongo on OpenShift
Free Mongo on OpenShiftFree Mongo on OpenShift
Free Mongo on OpenShift
Steven Pousty
 
Agile Overview Session
Agile Overview SessionAgile Overview Session
Agile Overview Session
Bahaa Farouk
 
Splunk for Developers
Splunk for DevelopersSplunk for Developers
Splunk for Developers
Splunk
 
Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015
Mirco Hering
 

Similar to Putting legacy to REST with middleware (20)

[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project
[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project
[Rakuten TechConf2014] [E-4] Rakuten Front-end Framework Project
 
Maintaining and Releasing Open Source Software
Maintaining and Releasing Open Source SoftwareMaintaining and Releasing Open Source Software
Maintaining and Releasing Open Source Software
 
The PRPL Pattern
The PRPL PatternThe PRPL Pattern
The PRPL Pattern
 
Cytoscape: Now and Future
Cytoscape: Now and FutureCytoscape: Now and Future
Cytoscape: Now and Future
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
Broadcast Music Inc - Scaling Up, Doing More, Having More Fun!
Broadcast Music Inc - Scaling Up, Doing More, Having More Fun!Broadcast Music Inc - Scaling Up, Doing More, Having More Fun!
Broadcast Music Inc - Scaling Up, Doing More, Having More Fun!
 
Donald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New TricksDonald Ferguson - Old Programmers Can Learn New Tricks
Donald Ferguson - Old Programmers Can Learn New Tricks
 
The Right Tool for the Right Project
The Right Tool for the Right ProjectThe Right Tool for the Right Project
The Right Tool for the Right Project
 
Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changes
 
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
 
Splunk for Developers
Splunk for DevelopersSplunk for Developers
Splunk for Developers
 
Splunk for Developers Breakout Session
Splunk for Developers Breakout SessionSplunk for Developers Breakout Session
Splunk for Developers Breakout Session
 
Refactoring Legacy Code
Refactoring Legacy CodeRefactoring Legacy Code
Refactoring Legacy Code
 
Developing apps faster
Developing apps fasterDeveloping apps faster
Developing apps faster
 
Splunk for Developers
Splunk for DevelopersSplunk for Developers
Splunk for Developers
 
Free Mongo on OpenShift
Free Mongo on OpenShiftFree Mongo on OpenShift
Free Mongo on OpenShift
 
Agile Overview Session
Agile Overview SessionAgile Overview Session
Agile Overview Session
 
Splunk for Developers
Splunk for DevelopersSplunk for Developers
Splunk for Developers
 
Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015
 

More from Adam Culp

Release your refactoring superpower
Release your refactoring superpowerRelease your refactoring superpower
Release your refactoring superpower
Adam Culp
 
Managing Technical Debt
Managing Technical DebtManaging Technical Debt
Managing Technical Debt
Adam Culp
 
Developing PHP Applications Faster
Developing PHP Applications FasterDeveloping PHP Applications Faster
Developing PHP Applications Faster
Adam Culp
 
Containing Quality
Containing QualityContaining Quality
Containing Quality
Adam Culp
 
Debugging elephpants
Debugging elephpantsDebugging elephpants
Debugging elephpants
Adam Culp
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshop
Adam Culp
 
Expressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffExpressive Microservice Framework Blastoff
Expressive Microservice Framework Blastoff
Adam Culp
 
Foundations of Zend Framework
Foundations of Zend FrameworkFoundations of Zend Framework
Foundations of Zend Framework
Adam Culp
 
Accidental professional
Accidental professionalAccidental professional
Accidental professional
Adam Culp
 
Build great products
Build great productsBuild great products
Build great products
Adam Culp
 
Does Your Code Measure Up?
Does Your Code Measure Up?Does Your Code Measure Up?
Does Your Code Measure Up?
Adam Culp
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
Adam Culp
 
Virtualizing Development
Virtualizing DevelopmentVirtualizing Development
Virtualizing Development
Adam Culp
 
Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2
Adam Culp
 
Clean application development tutorial
Clean application development tutorialClean application development tutorial
Clean application development tutorial
Adam Culp
 
Refactoring 101
Refactoring 101Refactoring 101
Refactoring 101
Adam Culp
 
Essential git for developers
Essential git for developersEssential git for developers
Essential git for developers
Adam Culp
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized Development
Adam Culp
 
Clean application development (talk)
Clean application development (talk)Clean application development (talk)
Clean application development (talk)
Adam Culp
 
Using an API
Using an APIUsing an API
Using an API
Adam Culp
 

More from Adam Culp (20)

Release your refactoring superpower
Release your refactoring superpowerRelease your refactoring superpower
Release your refactoring superpower
 
Managing Technical Debt
Managing Technical DebtManaging Technical Debt
Managing Technical Debt
 
Developing PHP Applications Faster
Developing PHP Applications FasterDeveloping PHP Applications Faster
Developing PHP Applications Faster
 
Containing Quality
Containing QualityContaining Quality
Containing Quality
 
Debugging elephpants
Debugging elephpantsDebugging elephpants
Debugging elephpants
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshop
 
Expressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffExpressive Microservice Framework Blastoff
Expressive Microservice Framework Blastoff
 
Foundations of Zend Framework
Foundations of Zend FrameworkFoundations of Zend Framework
Foundations of Zend Framework
 
Accidental professional
Accidental professionalAccidental professional
Accidental professional
 
Build great products
Build great productsBuild great products
Build great products
 
Does Your Code Measure Up?
Does Your Code Measure Up?Does Your Code Measure Up?
Does Your Code Measure Up?
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
 
Virtualizing Development
Virtualizing DevelopmentVirtualizing Development
Virtualizing Development
 
Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2
 
Clean application development tutorial
Clean application development tutorialClean application development tutorial
Clean application development tutorial
 
Refactoring 101
Refactoring 101Refactoring 101
Refactoring 101
 
Essential git for developers
Essential git for developersEssential git for developers
Essential git for developers
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized Development
 
Clean application development (talk)
Clean application development (talk)Clean application development (talk)
Clean application development (talk)
 
Using an API
Using an APIUsing an API
Using an API
 

Recently uploaded

SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

Putting legacy to REST with middleware

  • 1. Putting Legacy to REST with Middleware By: Adam Culp Twitter: @adamculp
  • 2. 2 Putting Legacy to REST with Middleware ● About me – DevRel and Tech Lead at Nexmo – OSS Contributor – PHP-Fig voting member (IBM i Toolkit) – Organizer SoFloPHP (South Florida) – Organizer SunshinePHP (Miami) – Long distance (ultra) runner – Judo Black Belt Instructor
  • 3. 3 Putting Legacy to REST with Middleware ● About me – DevRel and Tech Lead at Nexmo – OSS Contributor – PHP-Fig voting member (IBM i Toolkit) – Organizer SoFloPHP (South Florida) – Organizer SunshinePHP (Miami) – Long distance (ultra) runner – Judo Black Belt Instructor I am the PHP Ninja!!!
  • 4. 4 Putting Legacy to REST with Middleware ● Fan of iteration – Pretty much everything requires iteration to do well: ● Long distance running ● Judo ● Development ● Evading project managers ● Refactoring!
  • 5. 5 Refactoring Legacy Code ● What is “Legacy Code”? – Is there a coding standard for your project?
  • 6. 6 Refactoring Legacy Code ● What is “Legacy Code”? – Is there a coding standard for your project? – Is code using OOP?
  • 7. 7 Refactoring Legacy Code ● What is “Legacy Code”? – Is there a coding standard for your project? – Is code using OOP? – Is Composer used in your project?
  • 8. 8 Refactoring Legacy Code ● What is “Legacy Code”? – Is there a coding standard for your project? – Is code using OOP? – Is Composer used in your project? – Is the project using a framework?
  • 9. 9 Refactoring Legacy Code ● What is “Legacy Code”? – Is there a coding standard for your project? – Is code using OOP? – Is Composer used in your project? – Is the project using a framework? – Are you unit testing?
  • 10. 10 Refactoring Legacy Code ● What is “Legacy Code”? – Is there a coding standard for your project? – Is code using OOP? – Is Composer used in your project? – Is the project using a framework? – Are you unit testing? – Does your project avoid NIH?
  • 11. 11 Refactoring Legacy Code ● What is “Legacy Code”? – Is there a coding standard for your project? – Is code using OOP? – Is Composer used in your project? – Is the project using a framework? – Are you unit testing? – Does your project avoid NIH? If you can answer “No” to any of these, you may be creating “Legacy Code”!!!
  • 12. 12 Refactoring Legacy Code ● What is “legacy” really? – According to https://en.wikipedia.org/wiki/Legacy_code ● “...no longer supported or manufactured...” ● “...code inserted into modern software for the purpose of maintaining an older or previously supported feature...” ● “...supporting older file formats...” ● “...code may no longer work without changes...” ● “...code that no longer runs on a later version of a system, or requires a compatibility layer to do so...”
  • 13. 13 Putting Legacy to REST with Middleware ● Why Rewrite? – Change technology (PHP to Javascript, Python, etc.) – Code is REALLY bad – If less expensive to rewrite versus refactor – Little to no chance to lose business logic – Desire a “different” application
  • 14. 14 Putting Legacy to REST with Middleware ● API First! – API is first class citizen
  • 15. 15 Putting Legacy to REST with Middleware ● API First! – API is first class citizen – API comes first, then implementation
  • 16. 16 Putting Legacy to REST with Middleware ● API First! – API is first class citizen – API comes first, then implementation – Development teams can work in parallel
  • 17. 17 Putting Legacy to REST with Middleware ● API First! – API is first class citizen – API comes first, then implementation – Development teams can work in parallel – Reduces cost of developing apps ● Through re-use of business logic
  • 18. 18 Putting Legacy to REST with Middleware ● API First! – API is first class citizen – API comes first, then implementation – Development teams can work in parallel – Reduces cost of developing apps ● Through re-use of business logic – Faster time to market
  • 19. 19 Putting Legacy to REST with Middleware ● API First! – API is first class citizen – API comes first, then implementation – Development teams can work in parallel – Reduces cost of developing apps ● Through re-use of business logic – Faster time to market – OpenAPI
  • 20. 20 Putting Legacy to REST with Middleware ● API First! – API is first class citizen – API comes first, then implementation – Development teams can work in parallel – Reduces cost of developing apps ● Through re-use of business logic – Faster time to market – OpenAPI – Reduces risk of failure
  • 21. 21 Putting Legacy to REST with Middleware ● Modernization Methods
  • 22. 22 Putting Legacy to REST with Middleware ● Modernization Methods – #1 Total Rewrite ● Create entirely new app ● Build until complete ● Big BANG!
  • 23. 23 Putting Legacy to REST with Middleware ● Modernization Methods – #1 Total Rewrite ● Create entirely new app ● Build until complete ● Big BANG!
  • 24. 24 Putting Legacy to REST with Middleware ● Modernization Methods – #1 Total Rewrite ● Create entirely new app ● Build until complete ● Big BANG! ● Pitfalls – Constant “scope creep” – Maintain 2 apps – Expensive!
  • 25. 25 Putting Legacy to REST with Middleware ● Modernization Methods – #1 Total Rewrite ● Create entirely new app ● Build until complete ● Big BANG! ● Pitfalls – Constant “scope creep” – Maintain 2 apps – Expensive! ● Benefits – Clean slate – Energy/Excitement – Less business disruption
  • 26. 26 Putting Legacy to REST with Middleware ● Modernization Methods (cont’d) – #2 REST API Backend ● Build an API ● Use the API to drive logic and data
  • 27. 27 Putting Legacy to REST with Middleware ● Modernization Methods (cont’d) – #2 REST API Backend ● Build an API ● Use the API to drive logic and data ● Pitfalls – Requires cleanup of objects first – Longer time to get productive – Very difficult for spaghetti apps
  • 28. 28 Putting Legacy to REST with Middleware ● Modernization Methods (cont’d) – #2 REST API Backend ● Build an API ● Use the API to drive logic and data ● Pitfalls – Requires cleanup of objects first – Longer time to get productive – Very difficult for spaghetti apps ● Benefits – Cleans up data/business logic – Shorter time to completion
  • 29. 29 Putting Legacy to REST with Middleware ● Modernization Methods #2 (How-To) – Create standalone REST API ● Add one module at a time
  • 30. 30 Putting Legacy to REST with Middleware ● Modernization Methods #2 (How-To) – Create standalone REST API ● Add one module at a time – Refactor the Legacy application to use API as Service/Model
  • 31. 31 Putting Legacy to REST with Middleware ● Modernization Methods #2 (How-To) – Create standalone REST API ● Add one module at a time – Refactor the Legacy application to use API as Service/Model – Eventually API First, w/ frontend application
  • 32. 32 Putting Legacy to REST with Middleware ● Modernization Methods (cont’d) – #3 Legacy Middleware ● New application (as with rewrite) ● In stages
  • 33. 33 Putting Legacy to REST with Middleware ● Modernization Methods (cont’d) – #3 Legacy Middleware ● New application (as with rewrite) ● In stages ● Pitfalls – Takes upfront planning – Takes longer – Overall, still creating 2 new apps – Not API first until the end
  • 34. 34 Putting Legacy to REST with Middleware ● Modernization Methods (cont’d) – #3 Legacy Middleware ● New application (as with rewrite) ● In stages ● Pitfalls – Takes more planning – Takes longer – Overall, still creating 2 new apps – Not API first until the end ● Benefits – Can update/implement new frontend faster (duplicated) – Spaghetti app easier to manage – Less business impact – Marketing “new” features regularly
  • 35. 35 Putting Legacy to REST with Middleware ● Modernization Methods #3 (How-To) – New sub-directory for new app
  • 36. 36 Putting Legacy to REST with Middleware ● Modernization Methods #3 (How-To) – New sub-directory for new app – Create LegacyMiddleware, add it before FinalMiddleware
  • 37. 37 Putting Legacy to REST with Middleware ● Modernization Methods #3 (How-To) – New sub-directory for new app – Create LegacyMiddleware, add it before FinalMiddleware – Fix issues with routing and includes
  • 38. 38 Putting Legacy to REST with Middleware ● Modernization Methods #3 (How-To) – New sub-directory for new app – Create LegacyMiddleware, add it before FinalMiddleware – Fix issues with routing and includes – Update doc_root to be new location ● Site working as it used to
  • 39. 39 Putting Legacy to REST with Middleware ● Modernization Methods #3 (How-To) – New sub-directory for new app – Create LegacyMiddleware, add it before FinalMiddleware – Fix issues with routing and includes – Update doc_root to be new location ● Site working as it used to – Start creating new modules in new app
  • 40. 40 Putting Legacy to REST with Middleware ● Modernization Methods #3 (How-To) – New sub-directory for new app – Create LegacyMiddleware, add it before FinalMiddleware – Fix issues with routing and includes – Update doc_root to be new location ● Site working as it used to – Start creating new modules in new app – LegacyMiddleware called less and less
  • 41. 41 Putting Legacy to REST with Middleware ● Modernization Methods #3 (How-To) – New sub-directory for new app – Create LegacyMiddleware, add it before FinalMiddleware – Fix issues with routing and includes – Update doc_root to be new location ● Site working as it used to – Start creating new modules in new app – LegacyMiddleware called less and less – Remove legacy app once all endpoints satisfied
  • 42. 42 Putting Legacy to REST with Middleware ● What is “Middleware”? – NEW? way to build multi-layers as tiered approach to execution – “Software glue” - wikipedia ● Implement communication and input/output ● Popular in ‘80s to link newer applications to legacy systems
  • 43. 43 Putting Legacy to REST with Middleware ● Frameworks! – Expressive (Laminas Project, formerly Zend Framework) – Slim PHP – Most others: ● Laravel ● Symfony ● Etc.
  • 44. 44 Putting Legacy to REST with Middleware ● Testing – Always test prior to refactoring – Then refactor – Then test again – Refactor tests as needed – Repeat
  • 45. 45 Putting Legacy to REST with Middleware ● Tools – Source Control ● Allows easier rollback ● Allows collaboration ● Git makes branching easier
  • 46. 46 Putting Legacy to REST with Middleware ● Tools (cont’d) – CI/CD ● Makes updates across team seamless
  • 47. 47 Putting Legacy to REST with Middleware ● Conclusion – Middleware makes modernization easier – Do it in stages – Test all the things...often – Teamwork – Love iteration!
  • 48. 48 Putting Legacy to REST with Middleware ● Go! – Your turn!
  • 49. ● Thank you! – Code: https://github.com/adamculp/ Adam Culp https://beachcasts.com https://geekyboy.com https://rungeekradio.com Twitter @adamculp Questions?