Archive

Archive for August, 2007

PHP Frameworks

August 28th, 2007 No comments

I’m kind of coming to a conclusion that does not make logical sense to me as a developer.

When I first started using PHP, I wrote everything as embedded code, which had little or no structure. It worked, fairly well, but had very little structure and could be a nightmare to maintain.

A couple of years ago, I challenged myself and rewrote this website using classes and object-oriented techniques. Half way through writing it, I realised that it’s not always the best way to do things.

Having spent some more time working with class based structures (including a half-arsed attempt at rewriting this site), I still not convinced.

What worries me, is the speed at which development progresses – it’s all much slower with classes. What worries me more is the amount of resources that this technique consumes – you can end up creating objects, and child objects just to get a single count of child records in the database – if you want proof of this, check the archive page on this site, half the time it runs out of memory. This then leads on to the next problem – query efficiency. In a lost of cases, it’s fairly simple to write a query to which loads the record information needed for a page, but with a general class hierarchy you need several queries to load several record levels.

At work, we are just releasing a site using the CakePHP framework. This uses the MVC approach to coding, which seems like such a good idea on paper. But I can’t get over how much time I spend jumping between files to look at different aspects of the code, and how much of a peversity it is breaking out of HTML into a PHP code block and calling a class function, when I could easily have written the HTML in the file in the first place.

These thoughts all lead me back to one startling evaluative conclusion – may be it’s better and more efficient to go for the embedded approach after all.

Categories: Uncategorised Tags:

Rowing and Wind

August 28th, 2007 No comments

I’ve always held the belief that exercising kind of makes your bodily functions more, erm, “fluid”. No, wrong word – I mean, erm, “easy”.

Having not rowed for about 4 weeks, I jumped on an Ergo for 15 minutes tonight and promptly got off, and gassed myself.

Point proved.

Categories: Uncategorised Tags:

Growing Up Is Difficult

August 2nd, 2007 No comments

So being 6 weeks through the process of buying a flat, which is a scarey process I can tell you now, I’m starting to wonder about things I never thought I’d ever have to think about. Like “What curtains should I buy?”, “How did is the space for the fridge freezer?” and “I need to work out what colour should I paint the lounge so I know what cushions to buy”.

All very scarey things, really. Not just the “buying a house” thing – since when I did ever care about curtains or cushions?

Wonderfully true to form though – my thoughts initially turned to other more homely things like “I wonder what the Freeview signal is like” and “Is it going to be a pain in the arse retuning my MythTV box”, as well as “What speed broadband should I get?, hmm, I don’t even know if I want cable modem or ADSL either”, “What cool stuff can I rig through out the flat?” and “I wonder if the leaseholders would mind if I drill a hole in the wall to pass an ethernet cable through”.

Categories: Uncategorised Tags: