Static or Instantiated

In the previous versions of my website I’ve a had a class called Page. The purpose of this class is simply to create a page object which can be customized by adding/removing JS and CSS files as well as including pages through clean URL rules.

This all works fine, but I’m wondering is it really necessary to create an object of the page class? I could do the whole thing with the same results by making an abstract class called Page and changing everything to static (methods and variables) and changing the $this-> variable to self::.

I know this works

, but I’m wondering if this really intelligent thing todo? After all, a instantiated object is most useful for multiple instances and for polymorphism and in this case there can only be ONE page object per page.

The benefit, obviously, would be less RAM usage from the absence of object instantiation.

What do you guys think? This is a true masterpiece isn’t it

In the previous versions of my website I’ve a had a class called Page. The purpose of this class is simply to create a page object which can be customized by adding/removing JS and CSS files as well as including pages through clean URL rules.

This all works fine, but I’m wondering is it really necessary to create an object of the page class? I could do the whole thing with the same results by making an abstract class called Page and changing everything to static (methods and variables) and changing the $this-> variable to self::.

I know this works, but I’m wondering if this really intelligent thing todo? After all, a instantiated object is most useful for multiple instances and for polymorphism and in this case there can only be ONE page object per page.


if (empty($wp)) {
require_once('./wp-config.php');
wp('feed=rdf');
}
require (ABSPATH . WPINC . '/feed-rdf.php');

The benefit, obviously, would be less RAM usage from the absence of object instantiation.

Andy Budd on Usability, Design, and the Death of CSS

Oh wow, cool. It’s probably quite difficult to say to what level it’s had an effect, because obviously there are a whole bunch of things that have happened.

But I do think it’s been fairly important. I started blogging in the UK about web standards quite early on, and at the time I only really knew of two other people who were blogging about the same stuff in the UK, and those turned out to be Jeremy Keith and Richard Rutter, with whom I later set up my business, Clearleft. And after a while I discovered a few other blogs, like Drew’s blog, and a few other people started doing similar things.

It was a fairly early stage, so my other peers were people like Doug Bowman, Dave Shea, Cameron Moll and those guys. So I guess I got lumped in with those people, and there’s definitely kudos that came with that. Rich, Jeremy and I were the people in the UK doing similar stuff.

But I also think a lot of it was luck — a case of being in the right place at the right time. I was really interested in web standards, and I really just started blogging as a way of helping sort through my own thought processes. When I discovered something, rather than keeping it to myself, I’d post it up on my blog, because I thought that if it helped me, there might be somebody else out there that it might help.

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!