Scattered Like Birds

Search

Styles

   
   
   

Blogmarks

Movies

Recent Articles

Blogroll

Movie Quote

No more movie quotes!

My Other Blogs

About

CSS Site Signature: #www-samrowe-com

This blog is "powered by" Parasite, which is a PHP/PEAR::DB blog written by yours truly.

On good days, Parasite supports Ian Hickson & Stuar Langridge's Pingback1.0. It hasn't been a good day in a VERY long time and likely never will be again!

The stuff that Parasite doesn't do for me is done in vim.

Being standards compliant is the only attempt this site makes at being IE friendly.

You can email me using the initials of this blog at this domain.

Conversation A.D. 33

One: Have you heard the news?
Two: No, what's happened?
One: The good Lord has come down in human form and had himself killed!
Two: To what end?
One: With this act, the Devil is hoodwinked and all humanity saved!
Two: Gosh, that's simply lovely.

PHPeeve
Tuesday May 2 7:41am 2006
by Sam

So the big project that I've been working on uses Sajax which is a library that makes the whole AJAX->PHP thing easier. The thing is, it doesn't make it that much easier and it doesn't do a few things that I'd like it to do. Its development seems to have stagnated as well.

So I'm on the casual lookout for a replacement before the big re-factor that we're about to take on. I came across SAJA because I track the Freshmeat RSS feed. I started reading the documentation and found this:

Once the class is initialized, you must specify the path to saja. (relative URL to the directory which contains the 4 files, with leading and trailing slash) $saja->set_path('/saja/');

I don't mean to pick on the SAJA library specifically, it just happened to be the catalyst for this rant. It could have been any of the thousands of stupid PHP applications that require this sort of nonsense.

Your PHP library/app should never need to know where it lives in the filesystem or relative to the web root or what your domain name is! Never ever ever never.

If I can write this (complete with breadcrumbs, rss/atom feeds, and livesearch) and the code doesn't need to know any of that stuff, your code doesn't need to either.

Please fix your code!

Home