PHP implosion

I’ve toyed with many different programming languages, development environments, application approaches and the like, and thus far I can be categorized as a REST and Perl hack. Perl is very dear to me. I used Perl for the first major project in my career and in a slew of other applications, including owsview.

In the last couple of years, I’ve been moving to Java (servlets, JSP, etc.) for webapps, which has been successful for the most part, but haven’t budged from a scripting point of view from Perl when I needed something really lightweight and quick and dirty.
Until now. Enter PHP.

I took on a (non-geospatial; well almost, I used geocoder.ca to geocode addresses, and output the newsfeed as GeoRSS 🙂 ) web project this year for a friend, which I initially developed as a bunch of webpages and Perl CGIs. Worked fine. As time went on, I wanted to abstract things much more, and get heavy into templating, and did I mention I needed to have this done yesterday? So I looked for Perl templating systems.

I ran into Template Toolkit, which looked like a viable solution at the time, but I found it a bit confusing as to which approach to take (tt has both offline and real-time template processing).

I then checked out Mason, which I have used sparingly in the past, and got a bit farther along. I have a slow machine, so the mod_perl include in my Apache config looked to be bogging down the server.

Finally, I looked at PHP, which I was familiar enough with from when we initially developed cwc2 (thereafter chameleon) in 2002. I already had a PHP install (to run this blog), and it seemed I needed a couple of more options built in, so a recompile/install did the trick.

From there, things went ridiculously fast. All the Perl code was migrated to PHP in a matter of a day (if I didn’t use Perl strict, most of it could have went untouched). And the templating. In a day, I had templates of templates. Very turnkey. And driven by one config file.

If you’re looking for a ‘but’, I’m afraid I don’t have one. We now have an abstracted product which can be deployed with minimal configuration. All thanks to some PHP.

I’m sure I haven’t even scratched the surface of what can be done, but for a simple, easy to maintain webapp, PHP has done the job. It would be interesting to hear what others use when they really want to bang out a webapp. At any rate, three cheers for PHP!

2 Comments so far »

  1. Matt Priour said,

    Wrote on July 21, 2006 @ 16:12:52

    Mozilla Firefox 1.5.0.4 Windows XP

    I used PHP to develop my first 2 database driven web apps this past spring. We used it to enter all of our Breeding Bird Census results and output a nice well formated report for clients. Interally we used PHP/MySQL to create an agenda manager for our meetings.
    Having never used PHP or MySQL before and not programming with C based language in 11 years, I was pretty impressed that I was able to create the agenda manager in ~7 hours and the BBC Mgmt System in ~30 hours.
    I used PHP Designer & my only complaint is that I wish there was some checking in that IDE for idiot mistakes like forgeting to precede a variable with a $ or end a line with a ; Maybe there is a better IDE, what did you use?
    My only complaint so far is that it’s sometimes too flexible and its support for OOP is significantly less than other similar structured languages.
    Matt

    Posted from United States United States
    Mozilla Firefox 1.5.0.4 Windows XP
  2. tomkralidis said,

    Wrote on July 23, 2006 @ 16:20:38

    Mozilla Firefox 1.5.0.4 Windows XP

    Matt: I used vi :), I’m still crusty that way, but maybe I’d get alot more done with an IDE. Thanks for the info on PHP Designer, I’ll check it out.

    Posted from Canada Canada
    Mozilla Firefox 1.5.0.4 Windows XP

Comment RSS · TrackBack URI

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Comment:

Modified: 16 August 2006 11:59:32 EST