Modernizing Legacy Applications in PHP

Get your code under control in a series of small, specific steps
Code Files

Modernizing Legacy Applications in PHP

Paul M. Jones

Get your code under control in a series of small, specific steps
Mapt Subscription
FREE
$20.83/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt subscription?
  • Unlimited access to all Packt’s 6,000+ eBooks and Videos
  • 100+ new titles a month, learning paths, assessments & code files
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the subscription reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the subscription reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the subscription reader
$0.00
$25.20
$44.99
$29.99 p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Modernizing Legacy Applications in PHP Book Cover
Modernizing Legacy Applications in PHP
$ 35.99
$ 25.20
Domain-Driven Design in PHP Book Cover
Domain-Driven Design in PHP
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $40.98
Add to Cart

Book Details

ISBN 139781787124707
Paperback286 pages

Book Description

Have you noticed that your legacy PHP application is composed of page scripts placed directly in the document root of the web server? Or, do your page scripts, along with any other classes and functions, combine the concerns of model, view, and controller into the same scope? Is the majority of the logical flow incorporated as include files and global functions rather than class methods? Working with such a legacy application feels like dragging your feet through mud, doesn’t it?This book will show you how to modernize your application in terms of practice and technique, rather than in terms of using tools such as frameworks and libraries, by extracting and replacing its legacy artifacts. We will use a step-by-step approach, moving slowly and methodically, to improve your application from the ground up. We’ll show you how dependency injection can replace both the new and global dependencies. We’ll also show you how to change the presentation logic to view files and the action logic to a controller. Moreover, we’ll keep your application running the whole time. Each completed step in the process will keep your codebase fully operational with higher quality. When we are done, you will be able to breeze through your code like the wind. Your code will be autoloaded, dependency-injected, unit-tested, layer-separated, and front-controlled. Most of the very limited code we will add to your application is specific to this book. We will be improving ourselves as programmers, as well as improving the quality of our legacy application.

Table of Contents

Chapter 5: Replace global With Dependency Injection
Chapter 8: Extract SQL statements to Gateways
Chapter 10: Extract Presentation Logic to View Files
Chapter 11: Extract Action Logic to Controllers
Chapter 14: Decouple URL Paths from File Paths
Chapter 15: Remove Repeated Logic in Page Scripts
Chapter 16: Add a Dependency Injection Container

What You Will Learn

  • Replace global and new with dependency injection
  • Extract SQL statements to gateways
  • Convert action logic to controllers
  • Remove repeated logic in page scripts
  • Create maintainable PHP code from crufty legacy PHP

Authors

Table of Contents

Chapter 5: Replace global With Dependency Injection
Chapter 8: Extract SQL statements to Gateways
Chapter 10: Extract Presentation Logic to View Files
Chapter 11: Extract Action Logic to Controllers
Chapter 14: Decouple URL Paths from File Paths
Chapter 15: Remove Repeated Logic in Page Scripts
Chapter 16: Add a Dependency Injection Container

Book Details

ISBN 139781787124707
Paperback286 pages
Read More

Read More Reviews

Recommended for You

Domain-Driven Design in PHP Book Cover
Domain-Driven Design in PHP
$ 39.99
$ 28.00
PHP 7: Real World Application Development Book Cover
PHP 7: Real World Application Development
$ 69.99
$ 49.00
PHP Microservices Book Cover
PHP Microservices
$ 35.99
$ 25.20
Building RESTful Web Services with PHP 7 Book Cover
Building RESTful Web Services with PHP 7
$ 35.99
$ 25.20
Full-Stack Vue.js 2 and Laravel 5 Book Cover
Full-Stack Vue.js 2 and Laravel 5
$ 35.99
$ 25.20
Mastering Blockchain Book Cover
Mastering Blockchain
$ 39.99
$ 28.00