Modernize your Legacy Codebase

Kalen Johnson

with a fresh blanket of Laravel

What?

Modernizing legacy code is a slow and difficult process. Nobody wants to do it.

Using a framework like Laravel can help kickstart new features, refactors, and overall general developer happiness.

At least that's the idea

Why?

Familiar with Laravel

Start using helpers, models, other framework benefits right away

Regain some sanity

When?

Larger app, complete rewrite will take too long

Start refactoring sooner rather than later

Soft Requirements

PHP Files as pages - easier routing

Entrypoint file - to load Laravel

Recent version of PHP deployed

A lot of AJAX - endpoint replacement

Patience

How?

Routing in Apache

How?

Load Laravel in Legacy app

How?

Include Laravel in Legacy app

Getting Started

Benefits

Use Laravel models, helpers everywhere

Use proper migrations, write factories, seed

Refactor to Blade templates

API endpoints can be written as new code

Start writing tests

Pitfalls

Continue using old database

Refactors take a LONG time

Comprehending old code hurts

Thank You

 

Questions?

Made with Slides.com