Steve Workman's Blog

2 weeks in

Posted on by Steve Workman About 2 min reading time

I thought I'd write about what I've learned so far with the development of USEv4. I've been working at it for 2 weeks now and it's come quite a long way, so quickly, here's a list of what's been done.

  1. The re-design is complete, navigation is now completely in the header, context-sensitive options are on the right, information is on the left.
  2. jQuery functionality has been integrated. Sidebar panels can be closed with a fancy slide transition effect.
  3. The public side of things (calendar, match reports etc) are now in the smarty templating system.

The benefit of putting everything into the template system, is not only for code re-use, but for the future and for expandability, i.e. if you want to make your own templates and completely change the presentational layer, you can! The other benefit is that I'm going through what is now 2-year-old code, some of which was updated a year ago, some of which wasn't. At every line I'm making it more efficient, removing loops, updating the SQL, and putting everything into objects.

Objects are something of a life-saver. At uni, I've been taught that Object-Oriented programming is great because of code re-use. I've never been the best O-O programmer, but I do know how to do it, though it seems from my previous two years work that I've forgotten! For example, the current site has 3 places where a 'mini-profile' is displayed, containing the same information each time. In USEv3, this was controlled by 3 separate sets of statements. In USEv4, this is controlled by one object, meaning that to display a mini-profile now only requires 4 lines of code, instead of 70.

Putting the major website functionality into objects is taking time though, but I've got 90% of them done now, so development will speed up significantly.

Quickly, a word on jQuery. It's incredibly powerful but also very annoying because even the tinyest slip can throw an error, but firebug (javascript debugging in firefox) doesn't always pick it up! However, it is easy to do some very fancy effects with it, though I'm wondering how much overhead this is going to create for the website! Thank god for broadband prevalence!


Currently Listening to: Pink Floyd Currently Reading: Stuff about Greece Currently Watching: Not much Currently Eating: Curry Number of USEv4 SVN commits: 24