Modernizing Legacy PHP apps with APIs
$59.98
Regular Price
$49.95
Bundle Price

Modernizing Legacy PHP apps with APIs

A Practical Approach to API Design
Modernizing Legacy Applications In PHP
The following 2 books are included in this bundle...

About the Bundle

If you read the tech press, everyone knows they need an API but most aren't really sure what it is. They treat it as another checkbox like "Web 2.0" was a few years ago or a mobile app was most recently. In fact, there’s an entire “API-first” movement in development circles that most people don’t understand or even realize why. In this book, we'll start by discussing the what an API is, why you might need one, and follow up with the how to build one.

Of course, that's assuming your application is even ready for an API.

Unfortunately, your code base is a mess. It has been architected over several years by multiple different lead developers and it shows. There' are no consistent patterns or structure. The oldest core of the system is a collection of include files running several levels deep. More recently, someone bolted on some class-oriented libraries, and most recently someone decided to try a framework rewrite. All of it was done in different coding styles, with different naming conventions. The codebase is full of files that contain a mixed-up aggregation of PHP, HTML, SQL, JS, and CSS. And the "tests," such as they were, consisted of the QA team running over the site once or twice a week and filing bug reports.

But what if I told you it didn't have to be this way? What if I told you there was a specific series of small, incremental changes you could apply steadily over time to make your PHP code better, more modern, and ready for an API layer to make integrations easier. Wouldn't you like to have a plan like that written down for you, distilled into an easy-to-follow list of instructions?

  • Share this bundle

About the Books

A Practical Approach to API Design

A Practical Approach to API Design

From Principles to Practice
  • 1,499

    Readers

  • 80

    Pages

  • 28,224

    Words

  • 90%

    Complete

  • PDF

  • EPUB

  • MOBI

  • APP

If you read the tech press, everyone knows they need an API but most aren't really sure what it is. They treat it as another checkbox like "Web 2.0" was a few years ago or a mobile app was most recently. In fact, there’s an entire “API-first” movement in development circles that most people don’t understand or even realize why. In this book, we'll start by discussing the what an API is, why you might need one, and follow up with the how to build one.

This book is incomplete, lacking one last appendix. As a result, we hope this book becomes a conversation as we continue writing. When you find something interesting, let us know. If you think we’re wrong, say so. If you think we’re right, tell your friends. If you want us to teach your team more and deeper concepts, please let us know.

Towards that goal, we have one remaining chapter on our drawing board:

  • API Design Patterns
    • Idempotency
    • SOLID Design Principles
    • Naming - Resources & Parameters
    • Transactions
    • Authorization - Tokens vs Credentials
    • Link Relations
    • Composites
    • Versioning
    • Pagination
    • Error Handling
    • Caching - Strategies & ETags
    • Hard vs Soft Deletes
Modernizing Legacy Applications In PHP

Modernizing Legacy Applications In PHP

Get your code under control in a series of small, specific steps.
  • 1,216

    Readers

  • 230

    Pages

  • 58,569

    Words

  • PDF

  • EPUB

  • MOBI

  • APP

"You will breeze through your code like the wind. It will be autoloaded, dependency-injected, unit-tested, layer-separated, and front-controlled."

Is your legacy PHP application composed of page scripts placed directly in the document root of the web server? 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? If so, you already know that the wide use of global variables means that making a change in one place leads to unexpected consequences somewhere else. These and other factors make it overly difficult and expensive for you to add features and fix bugs. Working with this legacy application feels like dragging your feet through mud.

But it doesn't have to be that way! This book will show you how to modernize your application 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. Moreover, we will 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.

Please note that this book is about modernizing in terms of practice and technique, and not in terms of tools. We are not going to discuss the latest, hottest frameworks or libraries. With the exception of testing systems like PHPUnit, and one or two standalone third-party libraries, the book does not advocate adding third-party code to your existing legacy application. Most of the very limited code we do 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.

If you feel overwhelmed by a legacy application, "Modernizing Legacy Applications in PHP" is the book for you. If you prefer a paper copy, you can purchase one at Lulu.com.

If you're still on the fence, the video "It Was Like That When I Got Here" (embedded above on this page) outlines the first few chapters for free, and you can read some reviews of the book on the feedback page. You can also read the 4.5-star review from SitePoint.

Be sure to follow the book on Twitter @mlaphp, and tell all your friends!

jblotus
Chris Smith
jclermont
J. Michael Ward

4 reader testimonials

About the Authors

Keith Casey
Keith Casey

Keith Casey is a problem solver with over a decade of experience in software development in general and project management specifically. He has seen projects and teams that run like clockwork accomplishing amazing things and others that make the Titanic look like a pleasure cruise. He discovered pretty quickly that the only way to avoid the iceberg is to get the right information to the right people as quickly as possible.

Keith started his career at the Library of Congress in Washington, DC where he was working to answer the ultimate geek question "how much data is in the Library of Congress?" During that work, he drafted two of the XML standards still in use by the Library for Audio and Video metadata collection. On the technical side, he developed FoxNews' mobile sites (pre-iPhone) from concept to launch in 45 days; the voting system for live musical performance show; the news syndication system for Cygnus Business Media (65 sites across 8 verticals); and the Drupal-based syndication system for a professional sports league and its teams.

In 2011, he joined Twilio as a Developer Evangelist bringing communications APIs to the world. In those two years, he led most outreach efforts within the central US and the larger PHP community. Further, he's led many customer-focused efforts to help them use the API in new and creative ways to drive their own revenue and customer experiences. He is currently an working with a number of companies on API design principles, software quality assurance, and software project triage and recovery.

James Higginbotham
James Higginbotham

James Higginbotham has over 15 years of experience and has architected, built, and deployed software products for both Fortune 500 companies and early-stage startups. He combines his love of software with a focus on the product experience to create a balance between the complexity of scalability and ease of use.

His experience with both startups and the Fortune 500 provides deep insight into accelerating product development at any scale. James has delivered a wide variety of solutions for the healthcare, commercial insurance, non-profit, and airline industries. His solutions include software-as-a-service, supply chain management, and building multi-sided marketplace solutions. 

James has deployed to the public cloud and internal data centers. His goal is to design and build software that balances the complexity of scalability and distributed computing with the ease of a modular, testable codebase. He believes that APIs should be designed to solve problems based on the workflows of the industry while providing a great developer experience.

He is the founder of an Austin-based services company that focuses on API design, development, and cloud infrastructure. 

Paul M. Jones
Paul M. Jones

Paul M. Jones is an internationally recognized PHP expert who has worked as everything from junior developer to VP of Engineering in all kinds of organizations (corporate, military, non-profit, educational, medical, and others). Paul's latest open-source project is Aura for PHP. Among his other accomplishments, Paul is the lead developer of the Solar Framework, and the creator of the Savant template system. He has authored a series of authoritative benchmarks on dynamic framework performance, and was a founding contributor to the Zend Framework (the DB, DB_Table, and View components). Paul is a voting member of the PHP Framework Interoperability Group, where he shepherded the PSR-1 and PSR-2 recommendations, and was the primary author on the PSR-4 autoloader recommendation. He was also a member of the Zend PHP 5.3 Certification education advisory board. He blogs at paul-m-jones.com. In a previous career, Paul was an operations intelligence specialist for the US Air Force, and enjoys putting .308 holes in targets at 400 yards.

The Leanpub Unconditional, No Risk, 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub