SlideShare ist ein Scribd-Unternehmen logo
1 von 49
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?

Weitere ähnliche Inhalte

Was ist angesagt?

Hopper services
Hopper servicesHopper services
Hopper serviceshopperdev
 
Manila MuleSoft Meetup - May 2018
Manila MuleSoft Meetup - May 2018Manila MuleSoft Meetup - May 2018
Manila MuleSoft Meetup - May 2018Ryan Anthony Andal
 
Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019Manila MuleSoft Meetup #4 January 2019
Manila MuleSoft Meetup #4 January 2019Christopher Co
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangaloreD.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 MeetupPatryk Bandurski
 
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 presentationNicko 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 2020Royston Lobo
 
Manila MuleSoft Meetup - July 2019
Manila MuleSoft Meetup - July 2019Manila MuleSoft Meetup - July 2019
Manila MuleSoft Meetup - July 2019Ryan Anthony Andal
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecAdam Paxton
 
Building APIs with the OpenApi Spec
Building APIs with the OpenApi SpecBuilding APIs with the OpenApi Spec
Building APIs with the OpenApi SpecPedro 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
 
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 2018Deepu 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 futureRogue 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 @HyderabadVijay Reddy
 

Was ist angesagt? (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
 

Ähnlich wie 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 ProjectRakuten Group, Inc.
 
Maintaining and Releasing Open Source Software
Maintaining and Releasing Open Source SoftwareMaintaining and Releasing Open Source Software
Maintaining and Releasing Open Source SoftwareJoel Nothman
 
Cytoscape: Now and Future
Cytoscape: Now and FutureCytoscape: Now and Future
Cytoscape: Now and FutureKeiichiro 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 - LinagoraLINAGORA
 
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 TricksServerlessConf
 
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 ProjectOri 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 2015Dominique Boutin
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changesJaewoo 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 DevelopersSplunk
 
Splunk for Developers Breakout Session
Splunk for Developers Breakout SessionSplunk for Developers Breakout Session
Splunk for Developers Breakout SessionSplunk
 
Refactoring Legacy Code
Refactoring Legacy CodeRefactoring Legacy Code
Refactoring Legacy CodeAdam Culp
 
Splunk for Developers
Splunk for DevelopersSplunk for Developers
Splunk for DevelopersSplunk
 
Free Mongo on OpenShift
Free Mongo on OpenShiftFree Mongo on OpenShift
Free Mongo on OpenShiftSteven Pousty
 
Agile Overview Session
Agile Overview SessionAgile Overview Session
Agile Overview SessionBahaa Farouk
 
Splunk for Developers
Splunk for DevelopersSplunk for Developers
Splunk for DevelopersSplunk
 
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 2015Mirco Hering
 

Ähnlich wie 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
 

Mehr von Adam Culp

Release your refactoring superpower
Release your refactoring superpowerRelease your refactoring superpower
Release your refactoring superpowerAdam Culp
 
Managing Technical Debt
Managing Technical DebtManaging Technical Debt
Managing Technical DebtAdam Culp
 
Developing PHP Applications Faster
Developing PHP Applications FasterDeveloping PHP Applications Faster
Developing PHP Applications FasterAdam Culp
 
Containing Quality
Containing QualityContaining Quality
Containing QualityAdam Culp
 
Debugging elephpants
Debugging elephpantsDebugging elephpants
Debugging elephpantsAdam Culp
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshopAdam Culp
 
Expressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffExpressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffAdam Culp
 
Foundations of Zend Framework
Foundations of Zend FrameworkFoundations of Zend Framework
Foundations of Zend FrameworkAdam Culp
 
Accidental professional
Accidental professionalAccidental professional
Accidental professionalAdam Culp
 
Build great products
Build great productsBuild great products
Build great productsAdam 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 JenkinsAdam Culp
 
Virtualizing Development
Virtualizing DevelopmentVirtualizing Development
Virtualizing DevelopmentAdam Culp
 
Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Deprecated: Foundations of Zend Framework 2
Deprecated: Foundations of Zend Framework 2Adam Culp
 
Clean application development tutorial
Clean application development tutorialClean application development tutorial
Clean application development tutorialAdam Culp
 
Refactoring 101
Refactoring 101Refactoring 101
Refactoring 101Adam Culp
 
Essential git for developers
Essential git for developersEssential git for developers
Essential git for developersAdam Culp
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized DevelopmentAdam 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 APIAdam Culp
 

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

Kürzlich hochgeladen

Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Kürzlich hochgeladen (20)

Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

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?