PHP, Zend Framework and Other Crazy Stuff
Archive for October, 2008
Example Zend Framework Blog Application Tutorial: Parts 1-8 Revisited
Oct 31st
By now many readers are aware of the all-consuming mega tutorial I’ve been writing illustrating one method of writing a blog application with the Zend Framework. What started initially as a possible book project switched over to a more open process of blog posts with a future PDF version as a standard reference project.
Back during the Summer I had to put the series on hold, but it’s time to get kicking again. So to spark the revival here’s a quickie tour to allow readers catch up on my intentions since Parts 1 to 8 were originally published.
If you’re looking for the series, here are the relevant links! Subsequent parts will follow soon.
Edit: Part 9 will be reposted within a few days. I located my text file backup of the original (preferable to relying on a third party snapshot sans corrections).
Part 1: Introductory Planning
Part 2: The MVC Application Architecture
Part 3: A Simple Hello World Tutorial
Part 4: Setting the Design Stage with Blueprint CSS Framework and Zend_Layout
Part 5: Creating Models with Zend_Db and adding an Administration Module
Part 6: Introduction to Zend_Form and Authentication with Zend_Auth
Part 7: Authorisation with Zend_Acl and Revised Styling
Part 8: Creating and Editing Blog Entries with a dash of HTMLPurifier
My plans for the revival require a short detour to the original articles. It was always my intention to run a multi-step process. First I would write the code as quickly as possible. Secondly I would create a blog post which bumps the maximum entry size for Serendipity. Third I would transfer the entry into a longer more detailed Docbook format for easy transfer to HTML and PDF. Fourthly I would make the new formats available on a donation funded website.
Plans being plans - sometimes they go awry or get delayed. That’s what happened over the Summer when my time was occupied, too occupied to even keep my blog online!
Over the next month I will polish the first 8 entries, and proceed with the final chapters. I have a rough plan of what future parts remain (more than 1, less than 100 ) but it’s not certain and luckily I don’t have a publisher who is happy to restrict me to 200 pages. Self-publishing for fun has its perks!
Obviously a lot happens in programming over the course of months (sometimes weeks) so for every part you can currently read, you can expect an updated version which reflects my own, and others’, growing body of habitual programming practices where the Zend Framework is concerned. One debatably major update will be to polish areas I simplified too much (like setting up database connections) since at the end of the day, simplification has led to subtle inefficiencies (like database connections loading even if a database is not required ).
An Apologetic Tale of the Unexpected
Oct 31st
When you’re a programmer you very quickly learn a few things. At the top of the list is knowing that if you do not properly backup data, it is inevitable that you will lose it. Guess who fell afoul of that rule? Yeah…me!
Some months ago I became crazily busy and at the same time commenced centralising a lot of diverse web properties to a single location. During the process I took backups, took second backups, took third backups. Then I scattered them across several hard drives for good measure to avoid any hiccups like HDD failures. After I’d reenabled all the original properties with great success and limited downtime I left many of my personal websites offline since, being crazily busy, I just didn’t have the time.
About a month later I attempted to get one of these back up and realised to my horror that something in my backup strategy had gone horribly wrong. Archives refused to deflate, some files appeared to have vanished into thin air, and I quickly realised I had committed the cardinal sin of the backup world. I’d only made one damn archive of my personal sites! I managed to recover a lot of date, but several database backups were irretrievable and I was left with older copies I had squirrelled away some time earlier. Unfortunately, the newer backups contained more recent adventures in writing which I personally considered to be quite valuable (then again, as a writer, everything I write tends to have an inflated value ).
The upshot was that I lost two months of blog posts and comments. I was not a happy programmer.
To make matters worse, I switched from crazy busy to insane busy (this is a step in the wrong direction). So I ended up in a situation where getting the blog back online was an ever shifting target continually assigned to that mysterious force called “maybe next week”. If you ever meet this force in your life, please feel free to shoot it the head and email me a snapshot. I have the frame here ready!
But let’s put this nonsense, for which I apologise profusely, behind us and get things rolling normally again. The blog is online - albeit with the most recent post behind this one being May - and I slowly piecing together the remaining posts I lost. The first 8 of the massive Zend Framework tutorial is also back online. Many were thankfully archived as text files, some are in subversion repos, and others are mere outlines which knowing me I can re-draw from memory better than ever. I will only focus on the main informative articles and omit those which dealt with news items and personal opinion.
To everyone who has emailed me (all 50+ of you!) the Zend Framework Tutorial series will be back with Parts 9-12 posted in coming weeks. I had plans to create a free resource using it, and the only part of that which has changed is time. To make up for the long long (long * 1000) time I’ll try accelerating the articles transfer to more permanent HTML and PDF formats. Those who realised the source code archives never went offline probably know a lot of articles were already transferred to Docbook already.
Did I mention I’m back? I’m hosting the blog on its ancestral home of Dreamhost until I get around to configuring my better equipped Slicehost server.