Brian and I went to PHP Appalachia this Wednesday and Thursday. Different from a traditional conference, the Cherokee, NC KOA served as the main venue for PHP Appalachia. The two of us stayed in a Kabin with a full bed and a set of bunks. All of us hiked, chatted, and met with the other attendees until we left mid-day on Thursday.
We sat around the fire on Wednesday night chatting about PHP when Ben Ramsey and I entered an interesting discussion about PHP’s future and how to introduce newbies to PHP.
I’ll define the sterotype which serves as the premise for this discussion. Most books that introduce PHP, even those which rely on previous programming knowledge begin with an example like this: [code lang=”php”]print “hello world”;[/code] This example will be soon followed within the next 1-3 chapters (sometimes after, sometimes before introducing loops, conditions, and other basic language constructs of PHP) by an example like this: [code lang=”php”]print $_GET[‘foo’];[/code] In any/all books it’s far later in the book where Object-Oriented programming is covered. In the coverage of creating forms, handling GET/POST/Cookies/Session there’s relatively little talk of security, escaping, or encodings.
The long and short is that people learn PHP in a way that first teaches them to design web applications in a poorly maintainable, insecure, and generally poor method. With the advent frameworks like the Zend Framework and other MVC-based libraries there’s no need to teach bad habits that result in a bad name for PHP.
[tags]php, books, rant[/tags]