Site

Referrer Stats Added

I’ve wanted to do this for a while …

After tracking where people are finding links to this site for for several months, I’ve included a page with a live update with these figures.

What’s this useful for? Absolutely nothing. Except, I now have the makings of a homegrown stats package, written in Java, so I can reuse it for other things.

One idea is to also track the browsers people are using. Maybe operating systems too. So anyone who’s actually coming to this site by clicking a link from somewhere else … you can feel privileged to add to my stats ;)

Now on Struts

Well I’ve spent the last couple of days learning Struts, and I found the best way to solidify my understanding: re-write this site using it!

So we’re up and running again, with an even better MVC framework.

What are my thoughts so far on Struts?

Pros

  • It’s much more pleasing to have page-flows that are all connected somehow, to be tied up into an action. I also like the idea that I can re-use actions. For example, I have a login action. So far I only have that in one place, but if I needed to I could simply drop it in as a forward from another admin action, say. It’s nice to be able to see all my page-flows in an xml configuration file, rather than littered throughout lines of code.
  • The tag libraries are very useful. I’ve noticed that Struts automatically re-writes URLs with the jsessionid when it needs to. That’s one big chore taken care of. Also my JSPs look even tidier now, with logic:iterate tags - I can access collections without having to cast, get Iterators etc. Previously, I was putting an Iterator into the pageContext. And that meant casting/while loops etc. I’d like to use JSTL, I really would, but this server is not up to JSP 2.0 and even with the jar files I don’t think I’d get away with it.
  • ApplicationResources.properties - now all my error messages and labels are in a configuration file, rather than tied up in code.
  • More generally, I really like the fact that you get more of a birds-eye view of your application. I can step back a bit from lines of code and think in terms of Actions, Use-Cases really.

Cons

Learning from Livejournal.com

Having just read a presentation by one of the key developers at livejournal.com, about how they scaled up their technology as their userbase rocketed, I’m thinking about this site.

Obviously not in a sense of it having anywhere NEAR as much traffic, but there’s certainly things I can do to improve performance.

Particularly - and this is bad - there is no server-side caching, at least on the dynamic pages. Well, I knocked it up in a weekend so it’s not fully there yet!