Home > Blog > 2011 > 09 > Overengineering

Sick of Over-engineered Sites!

As a freelancer, I get to work for a lot of different companies and agencies. Which means I spend a lot of time looking at other people's code, whether they be inhouse teams, other freelancers, or folk who used to work there but have sinced moved on.

I find it quite interesting, and over the years I've seen code that's made me weep in awe, and code that's made me claw my eyes out in pure horror. But one of the things I really LOATHE is sites that are massively over-engineered for what they do.

I'll take a site I looked at recently. It's a small (sub 50 page) mobile site, which is almost all just plain text, written in MVC2. The solution for the site is split into 7 projects, uses nHibernate, has all the controllers and views split into separate projects (as well as the models, data access and a couple of generic function projects), and then the admin section of the site is a web forms project!

I'm all for separation of concerns and keeping code portable, but REALLY? 7 projects for a simple site? There's quite a bit of code in there as well, most of which is to do with the separation of the concerns and things like data access, mapping for nHibernate and the like. I'm sure it all made perfect sense to the original developer, but to someone going into it fresh, my initial reaction is one of "why the hell is this simple site done like this? Making changes are going to be pretty time consuming.".

I like to think I use the right tools for the job, and for something like this, I'd probably use either Umbraco, or Perch. I don't really see the point in putting in the amount of effort that must have been involved in setting this bad boy up and testing it, when something much simpler would be far better suited to the task.

It's like the developer wanted to make life difficult for themselves and those who came after.

While it might seem like a cool idea to go crazy with all the latest dev methodologies, and to separate everything out so that you can swap out almost any aspect of the site code, in actualy reality, for a project like this, you won't ever need to.

Another example is a site I worked on a couple of years ago, which was for a car sales company. The site had no transactional functionality, just a searchable list of used cars that you could email sales reps about, and a bunch of content managed pages. It was coded in the style of an ultra complex banking app. Trying to follow the code was a full time job, and what looked like simple function calls would turn out to be extraordinarily complex. I eventually figured out how all the important stuff worked, but noted that most of the people who had worked on the site since the original developer hadn't. In most cases, they'd just written their own code to do the same thing as the overly complex code, and used that instead. Which resulted in as many as 5 different ways of doing the same thing, all of which where used on the site in different places.

It made making changes an absolute nightmare. You'd think you'd changed something, only to discover that one page on the site called something completely different that did the same thing as the function you'd just changed. A list of changes that would have taken maybe two days on any sensible site ended up taking over a week on this system due to its crazy over-engineering!

Again, for this site, I'd have used a decent CMS system, and then written extensions to do the car search part. In fact that was something that WAS done to the site eventually (not by me, it was moved to Drupal/PHP) It's now remarkably trivial to make changes to the site, especially compared to the original monstrosity.......

The moral of the story? Use the right tools for the job, please! Remember that other people may have to work on the site, and that if you use methodolgoes and technologies that make it easy for them to do so, you'll be saving both time AND money in the long run. And please, pretty please, stop using enterpise level architecture for your small/medium sites.

:P

Enter Comment

1 comment for “Overengineering”

  1. Posted 19 September 2011 at 09:03:34

    The best code I ever see is the code that is a simple as it can be, but no more. There is the old Keep It Simple Stupid rule that should be lived by too. Trouble I think a lot of developers run into are the advance from books/blogs aimed at writing larger sites gets used for lesser sites simply because that is how it should be done. People always want to have the best they can and this goes for developers too, each site might be an excuse for playing with the latest and greatest. Peer pressure plays a part too, if you know a more senior developer or third part is going to be looking through your code you can over egg the pudding sometimes trying to show them that you know your stuff.

    Over-complex stuff drives me crazy, especially when I come into a project half way though so I feel your pain. However work that is not thought out at all can be just as bad. There is a nice middle ground in there somewhere, sometimes people forget it though.

    Pete