NYCPHP Meetup

NYPHP.org

[joomla] Incorrect Cached URLs

Mitch Pirtle mitch.pirtle at gmail.com
Wed Apr 15 20:50:55 EDT 2009


On Wed, Apr 15, 2009 at 7:07 AM, Norman ONeil <norman at enorm2.com> wrote:
> fancypants?

Ok, I'm going to get beat up for saying it, but I do feel strongly about this.

<rant>

Last year in the Netherlands I dedicated a series of slides on a topic
that has me gritting my teeth: Developer Vanity.

Look, just because you know how to abstract something out into a
helper and then dynamically call methods based on the actions of the
method names called in the parent, doesn't mean you need to do it. And
you certainly don't need to make the rest of us, who predominately
have tight deadlines, have to live in the same fancypants world.

I once used Oracle to store java source in the rows, and then ran a
query that randomly selected a few rows, concatenated the java source,
compiled and executed it all in the database space. Was an
interesting, if not kinky experience. Now, what was the practical
outcome? There WASN'T one. Zilch. It was an academic exercise with
absolutely zero practical value. And most importantly I had the
restraint to know that it was a pointless capability with a severely
limited application, and never tried to bring it out of the realm of
exercise into the world of execution.

I just wished other developers could demonstrate the same restraint.
There is a LOT of code out there that quite simply does not need to
be. Adds bloat, complexity, and generally diminishes the value of
everyone's hard work.

</rant>

With that said, I was wrong about $live_site. I was under extreme
pressure to deliver a major site when they removed that feature
(before the 1.5 framework was final), looks like it made it back into
the framework in just a slightly different place...

You CAN still enforce hostnames by using the JURI class on the front end:

http://api.joomla.org/Joomla-Framework/Environment/JURI.html#base

When looking at the source code, it's right there on line 209 of the
base() method. Pulls the value of $live_site from JConfig. Woo-hoo!

-- Mitch



More information about the Joomla mailing list