Productive Weekend

It’s been a productive weekend. I’ve been a bit ill over the last week, so have spent a lot of time in bed or just in my room (at a constant temperature), and it’s given me a brilliant chance to get on with BritBlog! Starting out on coding isn’t so easy for me at times (especially when you know you’ve got to struggle with lots of old and messy code) but I get into it then it gets much easier. This rewrite has been one of those projects that’s been especially hard to get into, so I’m quite pleased that it’s finally rolling.

I won’t bore you with the details, but I’ve been stripping out loads of redundant code and re-writing chunks for improved performance. I’ve also written a great wrapper class for Memcache that gives me some pretty cool features (like ETags and 304 headers). I’m going to open source this class when I get some more time and I’m happy with what it does. Anyway, there’s still quite a lot to do with BritBlog, but I really am hoping to get an interim release out soon. Don’t hold your breath, but it shouldn’t be too far away now…

It will be good to test the water with this, and if all goes well we can start on all the new features that we promised ages ago. It helps that I’ve finally got a sensible development environment with an identical set up to the production server too. I know that seems like something I should have had ages ago, but I’ve not been so organised on the BritBlog front. We’ve also got everything in version control too, which is brilliant. I’m almost ashamed to say this, but I’ve never bothered with version control for BritBlog before. Now it’s in subversion it seems to make the whole work process actually enjoyable!

Oh, and did I mention that Memcache kicks ass? OK, maybe that’s a bit too strong, but it really is nifty!

Flat hunting tomorrow, so better get to sleep now.

Tags: , , , ,

Sociable:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • digg
  • Furl
  • NewsVine
  • Reddit
  • YahooMyWeb

2 Responses to “Productive Weekend

  • Gary
    January 29th, 2007 22:12

    Hi Mark,

    You’re always mentioning the benefits of these caching systems, and they always sound great, but when I look into them in more depth they always seem quite difficult to integrate.

    This time though, after glancing at the memcache page above, the integration looks pretty easy, mostly because php now has memcache functions built-in.

    This time I will definitely give a trial run on my dev system at work.

    Thanks for the pointer :)

  • Mark
    January 29th, 2007 22:22

    Hey Gary, yeah, I’m like a stuck record at times!

    To be honest I got fed up with the PEAR Cache_Lite stuff. Although it basically works, it still has the downside of writing to disc, as well as no neat method to clean up old cache files. Potentially a problem…

    But memcache is great - it’s so slick! The docs are pretty easy to understand, but you basically turn on output buffering (ob_start()), generate your page as normal, then at the bottom get your HTML from the output buffer (ob_get_contents();), stick it in your cache then print it to the client. Of course it’s only suitable for certain content, but that’s the same with all caching.

    I’ve got an experimental wrapper to this which I’ll email over to you - you may have some nice modifications for it 8-)

Leave a Reply