So, I did a little experimentation, and I was able to seamlessly integrate Serendipity into my existing website via Smarty, some CSS, and changing just a couple of links!
The result is the website you're currently reading!
This means I can now offer trackbacks, comments, RSS feeds, and all the other stuff a modern blog should offer… and with minimum fuss and with a lot of standards and security. I wish everything I did was this easy.
I've been wanting to improve — no, rewrite — my blogging software for a month
or more now. The more work I've done at work, the more efficiently I've felt I
could handle it. I've learned a lot of ins and outs with
superclasses, and figured out how to tie things together much better. However,
I've also noticed, in reading and analyzing blogs, that there are a lot of
standards that I just don't know enough about or simply don't have the time to
implement ("the more work I've done…" has been something like 70 hour weeks
recently). Things like trackbacks, and RSS/Atom feeds, and comment
moderation/blacklisting, etc. I certainly have the skills, but do I have the
time? Not really. I still have a goal of writing some lightweight blogging
Cgiapp. However, for now, that's on hold so I can focus on
family, myself, and the next round of
Cgiapp improvements. In the meantime,
i've been seeing a lot of stuff about Serendipity, and I
thought I'd give it a try. Here are the results! It was super fast to setup,
and I hope to import all my old entries from my own system to it, once I can
see how entries are stored in the DB. So, you can now keep track of me via
RSS… Read away! Update: I'm liking S9y even more: it uses
Smarty for templating, which means I'm able to modify
it to look like it was always seamlessly in my site!
I couldn't resist… the car model demands it…
For those not familiar with where I live, my family and I live in West Bolton, VT — about 20 miles from Burlington, and at the base of Bolton Mountain. Our daily commute is 4 miles on a dirt road, another 3 to 4 miles on some twisty two-laners at 35mph to the interstate, and around 10 miles on the interstate into Burlington. Then there's all the miles in town getting Maeve to day-care, Jen or myself dropped off, and whomever has the car to work. And we only have one car.
So, you can imagine the crisis when, almost a month ago, our Toyota RAV4 died on the way in to work.
We started it up that day, and it had this funny knocking sound. I remembered a similar sound in my old pickup back in Montana… the one that died. I determined to get it into a shop that day to get it diagnosed. The noise came and went while we were on the backroads, and because it wasn't constant, I figured it couldn't be too serious.
And then we tried to get to highway speeds…. a few miles on the interstate, and it was evident we were in trouble. The Rav was having trouble maintaining 60mph on the way up French Hill — when it normally was able to accelerate past 70mph. And the knocking sound was getting worse and louder.
We resolved to pull off at the first exit, at Tafts Corners in Williston. I pulled into the first gas station there, and as we tried to find a place to park the vehicle, a mechanic was flagging at us to stop the car. He came over to where we parked and said, "Sounds like you've blown your engine."
These, of course, were the absolute last words I wanted to hear.
To make a long story short, apparently a bearing was thrown when we started the engine that day, and because we decided to drive it, we basically destroyed the engine. The cost to replace it: around $6,000.
Now, we're not exactly what you'd call "financially secure". We've had a lot of transitions in the past five years, and except for the past year and a few months, haven't typically both been working at the same time. We've been in a perpetual cycle of having enough to pay the bills… but having to pay consistently late. And we haven't been able to do much, if anything, about our educational debt. In short, our credit sucks. Which means that $6,000 is a big deal.
Did I mention that, at the time of the incident, we still had 17 months left on our car payments?
And, on top of it, I've been in the middle of a huge project for work that's required a fair bit of overtime — and very little wiggle room for personal time?
The timing could not have been worse, either professionally or financially.
We've been very fortunate, however. Jen's parents very graciously offerred to pay off our existing car loan — which helped tremendously. It bought us both the time to figure things out, as well as eliminated one factor that may have barred our ability to borrow towards repairs or a new car. Additionally, a friend of Jen's turns out to be absolutely ruthless when it comes to dealing with car salespeople, and went to bat for us in working out a deal. If it hadn't been for her efforts — and those of the salesperson, who also went to bat for us — we would not have gotten more than a thousand or so for the vehicle; we ended up getting over $3,000 for it, as is. Finally, the finance guy at the dealership advocated for us tremendously so we could get a loan on a new vehicle, with the Rav as our trade in.
So, to conclude: We're now proud owners of a 2005 Toyota Matrix! (And now the mystery of the title is revealed… to all you Matrix fans out there…)
I'll try to get a photo of the car up soon… about the time we update the year-old photos on our site… :-)
Well, it's official: My IT Manager convinced those in the upper echelons (well, considering it's a non-profit with only around 20 employees, that meant the president and the CFO) that (1) he and I need to attend a PHP conference, (2) due to the amount of work we've been putting in to bring money into the organization, cost shouldn't be too much of a deciding factor, and (3) php|Tropics isn't too expensive, especially considering the sessions involved cover some of the very issues we've been struggling with the past few months (PHP/MySQL/Apache and clusters, PHP5 OOP, PHP Security, test-driven development, Smarty, and more).
So, we're going to Cancun in May!
This is incredibly exciting! I've never been to Mexico, nor even a resort, so I'll finally get to find out what my wife and friends have been talking about all these years. Plus, the conference is top-notch — many of the presenters are well-known in the PHP community, and have blogs I've been following for the past year. (I only wish that Chris Shiflett's PHP Security series wasn't running head-to-head with the PHP5 OOP Extensions and PHP 5 Patterns sessions; I suspect Rob and I will have to do a divide-and-conquer that day.)
Drop me a line if you'll be attending — I'm looking forward to meeting other PHP junkies!
I've been extremely busy at work, and will continue to be through the end of March. I realized this past week that I'd set a goal of having a SourceForge website up and running for Cgiapp by the end of January — and it's now mid-February. Originally, I was going to backport some of my libraries from PHP5 to PHP4 so I could do so… and I think that was beginning to daunt me a little.
Fortunately, I ran across a quick-and-dirty content management solution yesterday called Gunther. It does templating in Smarty, and uses a wiki-esque syntax for markup — though page editing is limited to admin users only (something I was looking for). I decided to try it out, and within an hour or so had a working site ready to upload.
Cgiapp's new site can be found at cgiapp.sourceforge.net.
Shortly after I wrote this original post, I figured out what the strength of Gunther was — and why I no longer needed it. Gunther was basically taking content entered from a form and then inserting that content (after some processing for wiki-like syntax) into a Smarty template. Which meant that I could do the same thing with Cgiapp and Text_Wiki. Within an hour, I wrote an application module in Cgiapp that did just that, and am proud to say that the Cgiapp website is 100% Cgiapp.
1.5.3 fixes an issue introduced by 1.5.2 that creates a performance hit whenever the run mode is being determined by function name or CGI parameter. More details on the Cgiapp download page.
At work, we've been developing a new platform for our website, based entirely on Cgiapp. This week we released the first stage of it: garden.org and assoc.garden.org. These should stand as good testament to Cgiapp's robustness!
With all that development, and also with some communication from other Cgiapp users, I've made some changes to Cgiapp, and release version 1.5.2 this evening.
1.5.2 is mainly security and bugfixes. Error handling was somewhat broken in
1.5.1 — it wouldn't restore the original error handler gracefully. This is now
corrected. Additionally, I've made
run() use the array returned by
consisting of the
$_POST arrays — in determining the run mode.
Finally, I've modified the behaviour of how
run() determines the current run
mode: if the mode parameter is a method or function name, it cannot be a
Cgiapp method or a PHP internal function. This allows more flexibility on
the part of the programmer in determining the mode param — words like 'run' and
'do' can now be used without causing massive problems (using 'run' would cause a
race condition in the past).
As usual, Cgiapp is available in the downloads area. Grab your tarball today!
I picked up on this article on Friday, glanced through it and moved on, but noticed this evening it had been slashdotted — at which point I realized the author is the current CGI::Application maintainer, so I looked again.
At my first glance through it, it appeared the author was looking for a nice, easy-to-use pre-processor script for generating a site out of templates and content files. To that end, he, in the end, recommended ttree, part of the Template Toolkit distribution.
However, the real gist of the article — something that should probably have been summarized at the end — is that the author was looking for a free and OSS replacement for DreamWeaver's Templates functionality. This functionality allows a developer to create a template with placeholders for content, lock it, and then create pages that have the bits and pieces of content. Finally, the developer compiles the site — creating final HTML pages out of the content merged with the templates.
Now, I can see something like this being useful. I've used webmake for a couple of projects, and, obviously, utilize PHP in many places as a templating language. However, several comments on Slashdot also gave some pause. The tone of these comments was to the effect of, "real developers shouldn't use DW; they should understand HTML and code it directly." Part of me felt this was elitist — the web is such an egalitarian medium that there should be few barriers to entry. However, the webmaster in me — the professional who gets paid each pay period and makes a living off the web — also agreed with this substantially.
I've worked — both professionally and as a freelancer — with individuals who use and rely on DW. The problem I see with the tool and others of its breed is precisely their empowerment of people. Let me explain.
I really do feel anybody should be able to have a presence on the 'net. However, HTML is a fragile language: trivial errors can cause tremendous changes in how a page is rendered — and even crash browsers on occasion. The problem I see is that DW and other GUI webpage applications create, from my viewpoint, garbage HTML. I cannot tell you how many pages generated by these applications that I've had to clean up and reformat. They spuriously add tags, often around empty content, that are simply unnecessary.
The problem is compounded when individuals have neither time nor inclination to learn HTML, but continue using the tool to create pages. They get a false sense of accomplishment — that can be quickly followed by a very real sense of incompetence when the page inexplicably breaks due to an edit they've made — especially when the content is part of a larger framework that includes other files. Of course, as a web professional, I get paid to fix such mistakes. But I feel that this does everybody a disservice — the individual/company has basically paid twice for the presentation of content — once to the person generating it, a second time to me to fix the errors.
This is a big part of the reason why I've been leaning more and more heavily on database-driven web applications. Content then goes into the database, and contains minimal — if any — markup. It is then injected into templates, which go through a formal review process, as well as through the W3C validators, to prevent display problems. This puts everybody in a position of strength: the editor generating content, the designer creating the look-and-feel, and the programmer developing the methods for mapping content with the templates.
There's still a part of me that struggles with what I perceive as an elitist position. However, there's another part of me that has struggled heavily with the multitasking demands made on all web professionals — we're expected to be editors, graphic designers, programmers, and more. In most cases, we're lucky if we're strong in one or two such areas, much less passionate about staying abreast of the changing face of our medium.
It's about 50 minutes shy of 2005 here, and Maeve has finally succumbed to sleep, I'm almost done with my stout, and we're in West Bolton without TV for the second year running (yay!).
I hope the new year brings peace and happiness to one and all! Happy coding!
I don't know why I never bothered to look this up, but I didn't. One thing I
typically do in my parent Cgiapp classes is to pass
to the template. I just found out — through the pear-general newsgroup — that
this is unnecessary: use
$smarty.server.KEY_NAME to access any
your template might need.