In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I’m going to look at how to go about creating and working with components.

Getting Started

  1. Watch my talk from the PHP UK conference, where I explain the long-term costs of relying just on frameworks, and why a mixture of frameworks and components is the more pragmatic way to go.
  2. Read the slides that accompany the talk. Share them with your colleagues. Discuss them in your local PHP user group.

The Tools We Use

To make it much easier to work with components (and especially to work with lots of components), I’ve put together some useful tools. You’ll need to download them and install them into your dev environment:

  1. Phix Project website
  2. Introducing phix (updated September, 2011)
  3. Installing phix onto Apple Mac OS X
  4. Installing phix on Ubuntu
  5. Installing phix on Fedora
  6. Installing phix on Debian
  7. Installing phix on CentOS / RHEL

Here’s what has changed from release to release:

I’ll add links to any further blog posts about the tools as and when they come up!

Working With PHP Components

You’ve watched the video, and read why a component-based architecture is the way to go. You’ve installed the tools. But now what? In these blog articles, I show you step by step how to build the components for an app, and discuss many of the subtleties that you’ll come across with this approach.

  1. Planning An App That Uses Components
  2. Decomposing An App Into Components
  3. Creating A Skeleton Component
  4. Setting Up Your Component’s Metadata, Pt 1
  5. Setting Up Your Component’s package.xml File
  6. Adding Unit Tests For Your Component
  7. Where To Put Your Component’s Unit Tests
  8. How To Run Your Component’s Unit Tests
  9. Dealing With PEAR Dependency Quirks
  10. Working With Non-Namespaced Components
  11. Testing Remote Web Services The Quick And Nasty Way
  12. Unit Test Coverage For Components
  13. Making A PEAR-Compatible Package
  14. Setting Up Your Own PEAR Channel
  15. 3 Tips For Publishing Your Own PEAR Channel
  16. Publishing Your PEAR Channel On GitHub

Anatomy Of A Component

Want to know what is inside each component, or where something is meant to go? Here’s the skinny:

  1. Explaining File Roles In PHP Components
  2. Shipping Reusable PHP Code
  3. Shipping A Command-Line Program
  4. Shipping Data Files With Your Components
  5. Shipping Documentation With Your Component
  6. Shipping Unit Tests With Your Component
  7. Shipping Web Pages With Your Component

More to come :)

Comments are closed.

This Month

August 2014
S M T W T F S
« Jan    
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Recent Comments