
front and back-end web development, Leeds, UK
Richard's Blog - Design, coding and life in Japan
Refactor not Rebuild your Web App!
Submitted by Richard on Thu, 10/29/2009 - 10:29Having 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:
- Write tests for your present application
- Break up the jobs that need refactoring into sections
- Clean up code section by section running tests along the way
- 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:
Recent Blog Posts
- Testing controllers in Lithium 2nd Feb 12, 18:19
- Practical Internationalization in Lithium 31st Dec 11, 02:06
- Using OAuth in Lithium 30th Dec 11, 23:47
- How to add your own Tokens from CCK fields in Druapl 7 17th Jun 11, 04:49
- Weaving Lithium #li3 into a legacy PHP application incrementally 5th Oct 10, 11:54
Post new comment