Tutorial Day: Maintainable Applications in PHP Using Components
Abstract
If you’re building software products, or a software-as-a-service platform of some kind, I’m sure you’re familiar with the need to keep moving your software forward, to keep improving it and staying ahead of your competition. The time it takes to for us, as developers, to write software, is one of the key differences between a successful market-leading business and an also-ran. The more time we can spend working on the new features, the better.
And that’s where PHP components come in.
PHP components are an effective strategy for writing new code that can be very reusable and maintainable. They exist in a layer below the major PHP frameworks, giving your apps the solid foundations needed for rapid and sustainable change through an architecture that you completely own and control. And when the time comes to switch or upgrade frameworks, a component architecture means that the majority of your code is independent of the framework, saving time that can go into making great software instead.
In this hands-on tutorial, together we will create a number of components and work through their natural lifecycle. You’ll learn how to structure your components, how to create PHPUnit tests for your components, how to review the quality of components written by others, and how to safely change components so that you can innovate rapidly back at base without breaking any code that relies on your components.
Questions & Answers
- Who’s the target audience for this tutorial?
- Primarily lead and senior developers who are creating web-based applications. Very useful to anyone aspiring to move into such a role shortly too.
- How experienced do I need to be?
- You need to be comfortable with PHP 5.0 or later object-oriented coding and with class design. Familiarity with PHP’s class autoloading and PHP 5.3 namespacing would be useful. It would help if you’ve written unit tests using PHPUnit before.
I’d also recommend watching my Beyond Frameworks video first, to set the scene for why you might adopt a component architecture.
- You need to be comfortable with PHP 5.0 or later object-oriented coding and with class design. Familiarity with PHP’s class autoloading and PHP 5.3 namespacing would be useful. It would help if you’ve written unit tests using PHPUnit before.
- Do I need to bring a laptop?
- Yes please – this session is all about giving you the hands-on skills to make your own components with confidence. Please bring your standard LAMP stack development environment with you; if you use VMWare or VirtualBox, there’ll be a prepared Ubuntu VM for you to use.
- Can you help me with my components?
- I’d love to. Bring along your code, and I’ll happily take a look at it and see how I can assist over a pint after the main session.
Stuart Herbert
Stuart Herbert is a highly experienced software engineer and operational manager who explores his professional and personal passions through teaching, talks, and writing. He is currently the Head of Engineering for Gradwell, one of the top 50 fastest growing technology companies in the UK and one of the top 500 fastest growing technology companies in Europe.
His passions are for good engineering, good management, Linux, web-based applications (and PHP in particular), photography, walking, and T’ai Chi Ch’uan. Stuart has contributed to several open-source projects since the early 1990’s, most notably Gentoo Linux and Generic NQS.
Stuart holds a degree in Software Engineering from the University of Sheffield, and is a qualified teacher of adults for lifelong learning. You can learn more about him by visiting his website.