front and back-end web development, Leeds, UK


Richard's Blog - Design, coding and life in Japan

Richard

Refactor not Rebuild your Web App!

Having been involved in large website/web app development, when there are frustrations in the present system it is always tempting to say lets rebuild it.

But let's rethink this. Of course sometimes there is code there that you are embarrassed to show others, of course it could look prettier on the outside and in. It is easier to write code than to read it - especially other developers.

But bear this in mind:

  • You already have an application that works
  • You nearly always underestimate the amount of time it takes to rewrite
  • You forget about features that you have tucked away in the back
  • You have a huge amount to prove when it goes live
  • Migrating data can be a huge job
  • The main problem that you hadn't written tests is still often ignored

What I am suggesting:

  1. Write tests for your present application
  2. Break up the jobs that need refactoring into sections
  3. Clean up code section by section running tests along the way
  4. Add new functionality into the test then add to code section by section

Why is this good:

  • No new servers
  • Tested code
  • You managed to get rid of that embarrassing sluggish code
  • Nothing is forgotten
  • Takes less time
  • You make the most out of the hard work that was originally put in
  • No need to prove yourself
Tags:

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Recent Blog Posts