Advanced PHP Resources


#1

Advanced PHP Resources
Version 2.0.1 alpha (work in progress - HF - 11 Mar 2004)
The following list of resources and pointers is intended to help PHP developers improve development technique. The focus is on more "theoretical" aspects of PHP rather than "Here's how to do X" examples.

Contents

- Selected Sitepoint Discussions

- Object Oriented Programming and PHP

- PHP Development Tools

- PHP Class Libraries, Repositories and Extensions

- PHP Frameworks

- Recommended Reading

- Development Methodologies

- Selected PHP HOWTOs

- PHP5

- Communities and Blogs


#2

Selected Sitepoint Discussions
Sitepoint's Advanced PHP Forums provide a platform for discussing more advanced aspects of development with PHP as well exploring more theorectical aspects of software design. The purpose is to explore ways to make development with PHP, faster, more effecient, more reliable etc.


#3

Object Oriented Programming and PHP
PHP has evolved from a pure procedural language to one where the Object Oriented and Procedural paradigms co-exist happily. Many PHP developers learn a procedural style first and historically the majority of online material relating to PHP takes this focus. This a selection of PHP specific aimed at a PHP developer wishing to explore OOP.

Selected Reading on OOP in PHP

  • Object Oriented PHP: Paging Result Sets
    Kevin Yank provides a practical (and PHP-relevant) intro to Object Orientated in PHP. Great starting point for those that prefer learning by doing.

  • Object Oriented PHP
    A straightforward discussion of PHP 4's object model in context with general OOP theory, emphasizing all the key points and using examples PHP developers should relate to.

  • Introduction to PHP Objects [Part 1 and [url=http://www.onlamp.com/pub/a/php/2002/08/01/php_foundations.html]Part 2](http://www.onlamp.com/pub/a/php/2002/07/18/php_foundations.html)
    John Coggeshall provides a rigorous overview of PHP's OOP in PHP.

  • Object Oriented Programming in PHP: The way to large PHP projects
    Luis Argerich with an overview of OO in PHP which will suit developers already used to OOP with other languages. One of the first (if not the first) articles on OOP in PHP.

  • Using Objects to Create an Application <snip/> and <snip/>
    Introduction to OOP in PHP by putting together a simple applications. Learning by doing.

  • PHP(4) References explained

  • <snip/>
  • PHP(4) and Variable References
    Articles explaining how references work in PHP4 (no longer applies to PHP5, more or less)

  • <snip/>
    How to simulate static class variables in PHP

(more to come)

Design Patterns
<snip/>

Pattern Repositories

Patterns in PHP (selected online articles)

Core Patterns
From the original GOF collection

The Singleton

The Strategy Pattern

Adapter and Proxy Patterns

The Observer Pattern

The Factory Method

The Iterator Pattern

The Decorator Pattern

The Command Pattern
This article could do better

<snip/>

Enterprise Patterns
Patterns with direct relevance to web applications


#4

PHP Development Tools
Open Source / freeware tools to help with PHP development.

Debuggers and Profilers

Unit Test Frameworks

Documentation Generation Tools

  • phpDocumentor (recommended)
    Generates API documentation from inline source code comments (like Javadoc). Output can be "templated" and, in additional to generating HTML, PDF and CHM is also supported. Written in PHP

  • PHPXref (recommended)
    Builds "cross reference" documentation of source code allowing you to view all the files where a variable / method / function is declared as well as the locations where they are referenced. Written in Perl.

Build / Deployment Tools

  • PEAR Package Manager (recommended)
    Allows you to install PEAR packages (over the network) plus bundle your code for installation. Execute http://pear.php.net/go-pear with the PHP command line executable to get started. Written in PHP.

  • PEAR::PackageFileManager
    Automates generation of package.xml files used by the Package Manager. Written in PHP.

  • Phing
    PHP build tool equivalent to Apache ANT. Worth investigating for large projects. Written in PHP.

  • <snip/>
    PHP-based installation wizard for professional release management of modular PHP applications.

UML and Design Tools

  • Argo UML
    UML diagram drawing tool with support for PHP stub generation (commercial spin off is <snip/>) - written in Java

  • Umbrello UML
    UML diagram drawing tool with support for PHP stub generation. Requires Unix / KDE

  • Dia
    Diagram tool with UML support - generate PHP using <snip/>]

  • <snip/>
    Generate PHP code from XMI documents, an XML format for describing UML

Accelerators

  • Turck MMCache (highly recommended)
    OPCODE Cache, script encoder, profiler and dynamic content cache (read persistance) all in one. Provides Windows binaries as well.

  • PHP Accelerator (recommended)
    OPCODE Cache

(more to come)

Recommended IDEs / Editors (a select few!)

  • PHP Eclipse
    Plugins for the Eclipse IDE

  • PHP Edit
    Perhaps the best free PHP IDE for Windows

  • JEdit
    IDE with PHP support (plus loads more). Written in Java so platform independent

  • Jext
    The siamese twin of JEdit

  • JEdit
    IDE with PHP support (plus loads more). Written in Java so platform independent

  • gPHPEdit
    Best(?) PHP editor for Gnome / Linux

  • SciTE
    Straightforward cross platform editor for pretty much anything.

  • PHP Mode for Emacs
    PHP support for the Unix EMACS IDE

  • Sitepoint Discussions on IDEs (there's many more - hit search)

[Best open source/ inexpensive PHP IDE?, [url=http://www.sitepoint.com/forums/showthread.php?t=112616]Favorite PHP IDE?, [url=http://www.sitepoint.com/forums/showthread.php?threadid=105113]good text editor?! - for Windows, [url=http://www.sitepoint.com/forums/showthread.php?t=106054]Good PHP Text Editors](http://www.sitepoint.com/forums/showthread.php?t=153525) and many more...


#5

PHP Class Libraries, Repositories and Extensions
Where to find them

PHP Class Repositories

  • PEAR
    The PHP Extension and Application Repository. PHP's equivalent to Perl's CPAN

  • PHP Classes
    Large (the largest?) repository of classes and PHP web application components.

PHP Extensions

  • PECL
    The PHP Extension Community Library - eventually all extensions not part of the standard distribution will end up here I believe

  • <snip/>
    Large collection of PHP extensions compiled for Windows

  • SWIG
    Generate PHP extensions from existing libraries

  • SAPRFC
    PHP Client for SAP

  • Universe
    PHP / Corba

  • <snip/>
    PHP client for BEA Tuxedo

  • PHP + Namazu
    PHP extension for the Namazu full text search engine

  • Mapserver (has PHP extension)
    Generate maps for your site

  • pRuby
    (Experimental)

  • Python in PHP
    Embed Python into PHP scripts

  • <snip/>
    (Experimental)

  • myphp
    Embed PHP into MySQL queries (Experimental)

  • <snip/>
    Add on to Java extension - short details <snip/> (Experimental)

Selected Classes / Components
List of classes scattered around the net. You may find classes offering similar functionality at PEAR / phpclasses

  • Php.XPath
    XPath implementation in PHP, using the built in SAX functions

  • PHPMailer
    Class for sending emails, handling everything you need - attachements, HTML email etc. etc.

  • PHPSniff
    Browser detection

  • RDF API for PHP
    For parsing, manipulating, serializing, storing and querying RDF models.

  • Magpie RSS Parser
    For parsing RSS 0.9x to 1.0 (i.e. most feeds)

  • phpOpenTracker (recommended)
    For storing and analysing visitor stats.

  • The PHP Math Library Project (recommended)
    Focal point for building some serious math libraries for PHP.

  • FPDF
    PDF generator written in PHP

  • R&OS PDF
    PDF generator written in PHP

  • HAWHAW
    For building WML pages

  • <snip/>
    Jabber client

  • <snip/>
    Implements HTTP Digest authentication in PHP (Apache only)

  • <snip/>
    SOAP client / server with WSDL support

  • Incution XML-RPC
    XML-RPC client / server

  • PHP HTMLLib
    Library for building HTML (plus XML, WML and SVG) pages.

  • Tika:TK
    PHP + JavaScript for building web "GUIs"

  • <snip/>
    Probably PHP's most robust DB abstraction layer. There's some leakiness around the API but if you want it to "just work and work fast", this in the one.

  • Creole and Propel
    DB abstraction layer and ORM tool for PHP5. Blogged here.

  • Flat File DataBase for PHP

  • <snip/>
    Library for generating OpenOffice documents

(more to come)


#6

PHP Frameworks
In the most general sense, a framework is an environment for executing your code. You might say the PHP engine + web server itself is a framework. For web applications, providing a higher level framework, written in PHP, can prove beneficial in terms of making the code you write for that framework more structured, easier to maintain, faster to develop and so on.

  • MVC Frameworks Written In PHP
    Most (if not all) MVC style frameworks, written in PHP, are listed here. MVC (model view controller) is design pattern frequently applied to web based applications. It's not the only way to go though.

(more to come)


#7

Recommended Reading
Books, magazines and online resources. Note: individual online articles are not referenced here, just sites with repositories of relevant info.

Books
Bruce Eckel: Thinking in Java
Has a very solid lead-in to OOP which, although written for Java, can be mostly applied to PHP as well, making decent in depth discussion for beginners. Also nice is it's free to read online or you can pick it up from Amazon here

<snip/>
Unfinished book on design patterns. Originally planned to use Java but most examples work with Python, bringing a dynamic aspect to it that's relevant to PHP

GOF: Design Patterns
A must read. Has become a modern-day classic on software development - the missing link on OOP. Provides the core design patterns which can be applied in most any programming language.

Martin Fowler: Patterns of Enterprise Application Architecture
One of the "new wave" books on patterns, addressing issues directly relevant to web applications. Another must read

Martin Fowler: Refactoring: Improving the Design of Existing Code
A book that will improve a developer's code quality faster than any other. Everything from how large methods should be to how to safely put right a completely mis-designed application.

[BlueJ Editor and [url=http://www.bluej.org/objects-first/]Objects First](http://www.bluej.org/index.html)
Java: learning by doing - principles can be applied to any language with an object model.

<snip/>
Provides a discussion of sixteen design patterns which are relevant to web application development, while threading refactoring and unit testing into the narrative. Uses both PHP4 and PHP5 as reference examples. A more in detailed review.

Head First Design Patterns
A different way of learning patterns, using a visually-rich formatted book. The book uses Java examples.

Magazines

  • php|architect
    Excellent US-based PHP magazine bridging the gap between books and typical online articles - much depth while to the point. Distributed in electronic and print formats.

  • International PHP Magazine
    Run out of Germany, this gets input from many of PHP's core developers so has an inside track there but is still working to establish itself. Same company also produces the for-print German PHP Magazine (which has completely different content)

  • PHP Solutions Magazine
    [small]Seen this in German on the local newsstands. Seems to be addressing the PHP hacker-ethic (and uses very bright colors on the cover).

Online Resources


#8

Development Methodologies
Approaches to software development and software project management

(more to come)


#9

Selected PHP HOWTOs
Collection of online articles / examples for how to solve particular problems. Focus is on subjects which are either harder to grasp (e.g. XML related), required knowledge (e.g. Security) or PHP application design related.

(more to come)


#10

PHP5
PHP5 represents a shift in paradigm for PHP, bringing it closer to Java in terms of it's object model (at least from the point of view of a PHP developer). This is a collection of articles / resources discussing PHP5's new features.

New Syntax and Core Features

New Extensions and Functionality

Installation / Setup
- Installation/PHP5
Roundup of links to further information on PHP5 setup / installation


#11

Communities and Blogs
[small]Blogs related to PHP and software development. Kept seperate from Recommended Reading as it may turn into a long list and, with blogs, signal to noise tends to be low. A leaky abstraction?

PS - don't think it's really necessary to list Sitepoint here - hopefully you know where you are...[/small]

PHP Community

PHP News

  • PHP Planet
    Aggegates various PHP blogs as well as general commentary of things going down in PHP

  • PHP Developer
    Picks up pretty much everything significant happening in PHP with useful summary

[php | arch and [url=http://www.php-mag.net]php mag](http://www.phparch.com) also keep their fingers on the pulse.

Online PHP Article and Tutorial Libraries

  • Zends Developer Zone

  • PHP Builder
    The first (?) major resource for PHP programmers outside the official locations. Things have slid a little since then (change of ownership) but still tons of good stuff

  • O'Reilly Network: PHP DevCenter
    Large collection from beginner to pro. Usual high quality you'd expect from O'Reilly

  • Devshed: PHP
    Large collection of PHP related content.

  • IBM: Web Architecuture
    PHP gets a look in from time to time

  • WeberDev
    Massive collection of code snippets etc. Articles, forums, you name it.

  • Codewalkers
    Tutorials, code snippets, coding contests and loads more

  • ZEZ
    From the makers of eZ publish. Some interesting pieces on the less charted areas of PHP. Sadly no longer being updated..

PHP Discussion

  • <snip/>
    Web interface for browsing them. Signup here.

PHP Blogs
In no particular order

[PHP Kitchen, <snip/>, <snip/>, [url=http://blog.bitflux.ch/]Bitflux / Christian Stocker, <snip/>, [url=http://blog.php-tools.de/]Pat Blog (as in patuser etc.), [url=http://blog.coggeshall.org/]John Coggeshall, [url=http://circle.ch/blog/]circle.ch, [url=http://www.schlitt.info/applications/blog/]Tobias Schlitt, <snip/> <snip/>, <snip/>, <snip/>, [url=http://www.sebastian-bergmann.de/blog/]Sebastian Bergmann, <snip/>, <snip/>, [url=http://blog.joshuaeichorn.com/index.php]Joshua Eichorn, [url=http://www.derickrethans.nl/]Derick Rethans, <snip/>, <snip/>, [url=http://viebrock.ca/]Colin Viebrock](http://www.phpkitchen.com)

(more to come)

General Blogs

<snip/>, <snip/>

(more to come)


#12

A ton of sample chapters on this site including this meaty morsel: http://www.informit.com/articles/article.asp?p=30661.


#13

Thanks for this excellent list!!

One additional UML tool to add would be Enterprise Architect (
http://www.sparxsystems.com.au )

Very good tool. Has round-trip code engineering for PHP, plug-ins for eclipse, and tons more for only $225!

Steve Truesdale


#14

I have closed this thread so it doesn't get flooded with messages that doesn't really add anything valuable, and only makes It harder to find information. It has happend to similar threads before.

If you know of a resource that will be valuable to other members we will be more than happy if you want to tell us. Send a PM to one of the Programming Team http://www.sitepoint.com/forums/showgroups.php, and they will add it for you.

If you would like to thank HarryF for his initiative, send him a PM. smile


#15

Pretty cool MVC tutorial here guys for those who are still trying to grasp the concept.

Peace!

Crabby


#16