This blog entry will be a working page for those who would like to download my slides and code for my talks a #zendcon.
Slides for ZendCon Talks
September 17th, 2008 by Ralph SchindlerNew Zend Framework Quickstart Available
September 16th, 2008 by Ralph SchindlerWith the release of Zend Framework version 1.6.1, comes a new Quickstart guide on the framework.zend.com website. This quickstart builds on all the great quickstart material provided by Aldemar Bernal, Bradley Holt, & Wil Sinclair on the wiki.
Over the past few weeks, myself and Matthew have gone back and forth on building a simple Guestbook application that would demonstrate what we think a 1.6 ZF application should look like if it were to be created from scratch.
As with most applications, most of the the structure this quickstart application we are suggesting is indeed subjective. We anticipate it will cause some discussions over architecture and best practices design, but then again, that is the point after all.
So, what does it highlight?
- Zend_Controller & Zend_View – These elements are brought in from the original quickstart from the wiki. This includes building action controllers, views and also highlights error controller usage.
- Zend_Config & Zend_Registry – Considering you will be building an application that will need to move from development to staging to production, we should have a config file that will support this process. Also, we will demonstrate the usage of an application registry.
- Zend_Layout – Headers? Footers? Navigation? – That is where Zend_Layout shines when it comes to removing the common page elements from your view scripts. View scripts should be concise and only include information and logic about the action controller calling said view script.
- And the biggie: Zend_Db_Table & The Model – In this simple guestbook example, we have built a simple Table Module based model for handling guestbook entries. For data access, this model will utilize Zend_Db_Table to access the guestbook entries table.
The quickstart is located at http://framework.zend.com/docs/quickstart/ and you can download the application (which is about 80% comments for your reading enjoyment), on the first page.
So, go download, read, build the application. Once you get a good handle on this quickstart, we will have a few addendums demonstrating new addons and features to this base quickstart application. Already planned is an addendum where I will walk through building this same model as a Domain Model using Zend’s Db_Table for data access.
Paying Homage to PHP4 – A Eulogy
August 8th, 2008 by Ralph SchindlerIn technology years, I am an old man. I came to PHP in late 1998 while in college. Before that, I mostly developed in perl based on samples from the Perl Cookbook. I mean, where else were you suppose to start, right? Within a month of using PHP, it became abundantly clear that developers could become immediately productive by prototyping and building systems in PHP far faster than any other language I had encountered to date. And yeah, this was PHP3 – the other odd numbered release. If I recall correctly, the most difficult part of PHP at that time was making sure it would compile and install correctly on Redhat 5 and 6.
Any of these version numbers bringing back nostalgia to you developers?
Kind Words
The irony right now, is that most developers who have since embraced PHP5 are now treating PHP4 just as they would the death of a person that they disliked in life. For years (myself included), we’ve scoffed at PHP4 code. And why not? It’s so easy to spot. It generally looks as though it should come with a side of marinara and garlic toast. Most applications written on the platform started out clean, but then over time decomposed into a mess of tangled and indigestible code fragments. Revisiting these projects to add new features, or fix bugs (for the unluckiest of contractors) soon always began with a series of 4 letter expletives. It was these experiences that had us looking towards the future, the PHP5’s, PHP6’s, PHP10’s.
So it has come, after years of cursing PHP4 by name, just as we would a villain in life, we assemble in this blogosphere to pay homage and eulogize PHP4 with the best of words, despite what he might have done in his old age. I’m sure the messy codebases of years past have not died with it, but at least there is a movement (much like a ball rolling down a hill, or an avalanche), to embrace PHP5’s OO model, unit testing, time tested software patterns and community accepted best practices.
PHP4: you slipped into a coma at the end of last year, and today (8-8-8) you died. I’ll recall some of the more interesting times I spent with you.
What did I do with PHP4?
The Ochsner Medical Center Wayfind and Directory Assistance Application
Around early 2003 I was contracted to build an application for a network of kiosks to display directory assistance and mapping at a relatively large hospital in New Orleans. Without going into all the massive details, this application took large jpg images with points mapping in a MySql database representing the hallways of the hospital on all 11 floors as well all all of the offices of all of the doctors. A flash application on the kiosk (which was touchscreen), would then ask the server for a specific doctor name. PHP would then (via all the great geometric math functions), would produce an XML file with all of the point to point animations that flash then had to do. PHP would also walk down all possible physical routes, going to all possible elevators trying to find the shortest route. It did this in real time. The database was updated often. It rocked.
Tulane Career Services Sign-in Computer
When I worked at the Tulane CSC, I was tasked with replacing our sign-in book with a computerized sign-in system. For this, we got a list of all the students from the Registrar, and bought a USB card scanner. Thankfully, there were some numbers in that little black strip that I could pull out of the Registrar database and mark the student as having visited the center in real time, without doing anything more than scanning their card. The card reader basically wrote to STDIN of the computer, so as long as the web text field had focus (enforced with JS), the system would work flawlessly– assuming the person with the card was in the system. If they weren’t they had to visit a web form, which sucks for them, but all in all, the system worked well.
Email Tracking System (Mostly for The Netcom Group & Starwood)
This was an interesting project. Given a list of conference attendees (sometimes 20 sometimes 5000): craft an email that had clickable and trackable links (that could get past spamassassin, hotmail filters, yahoo filters, aol filters, etc.), trackable open images that will redirect them to the conferences group rate hotel site for booking.
Each email was crafted based on that email list which was loaded into mysql by a php script. That php script then created and registered each individual link into the database so that reporting could be done later. PHP mail() was a workhorse. It got the job done, and we got loads of great information about email campaigns and tracking. Oh, and this what back when the likes of Doubleclick didn’t completely own the email campaign market.
The Flurry of Excel-a-like and custom CMS Applications
Of course there were clients who couldn’t find the off-the-shelf application to suit their needs. These clients generally wanted something that measured up to no more than a web based (CRUD) excel application with a few reporting features added in.
Projects like PEAR’s SpreadsheetExcelWriter greatly helped producing reports that would integrate nicely into a users desktop excel instance.
Like most PHP4 CMS applications, they were built by a developer or a group of developers, and generally, were built without the use of any application patterns. This basically meant that you had to get inside the head of the original developer to understand how the application worked. This made adopting any specific CMS just as expensive of a task as building a CMS from scratch that you could use over and over.
So this is what I did, as well as I’m sure 1000’s of other PHP developers over the past 10 years. This is why there are 100’s of PHP Application Frameworks.
Parting Words
PHP4, it been a long time since you’ve been installed on any of my servers, virtual machines, or desktops. And yes, I am glad you are gone, but also glad you gave birth to PHP5, and the PHP’s that will soon come after that.
PHP is dead. Long live PHP.
First Post
July 28th, 2008 by Ralph SchindlerFor my friends that go back more than 5 years, you might remember I kept a blog at one point. At some point, I stopped having things to write about – so that blog/site got stale and eventually got taken offline.
Now I have things to write about! There will be a few tracks here, mostly Zend Framework and PHP related, but there will also be some posts on dining and food – and the occasional social rants
Stay tuned!