Possible Duplicates:
How to approach refactoring an existing web application?
Starting a coherent architecture in a legacy application

We have a fidelity system running on the company I work for.

It is written in C# and Flex and my boss want to change it to HTML5 and PHP to serve more customers and he is worried about the fact that Adobe left Flash, the enormous amount of bugs and requests for changes and also complaints about slowness.

The system is really big and the database is a total mess.

I'm the one responsible for that project and I have no idea on how to begin rewriting the entire code and database. Where do I begin?

Is there any methodology to do that kind of work?


2 Answers 2


First off, give serious consideration to the PHP bit - if you've got C# code and presumably therefor skills why throw it away? There are any number of ways to deliver good, modern, flexible, standards compliant websites using C#

Secondly, what you really need to do is establish control over what you've got - to whatever degree its desirable to rewrite the application (I can see replacing front end flash with HTML5 and Javascript) if you'd don't have the right tools and practices you're just going to end up with the same mess again.

So a read of this book might help: Brownfield Application Development in .NET - its not heavyweight and is full of good guidance.

You should be able to deal with many of the issues by systematically refactoring the code, but the database is a bit more of a challenge. You can do various clever things - e.g. if you change table structures you can include views that contain the old structure - but in the end its going to involve pain.

If your really are going to rewrite the app from the ground up then do just that. Ignore what's gone before in terms of code, establish your user stories (you can use the current application to "inform" your stories and the order in which you plough through the backlog), work out your idealised schema and march forward from there...

Can't comment on which approach will get you the desired end result first - but a refactoring approach as per the book will get you visible results (particularly in terms of delivery to your users) a lot sooner.


You've got C# & Flex. I assume you're using C# for the backend and Flex for your UI.

Have you considered just transitioning to ASP.Net? Then you'd be able to save a ton of your code...can go to more of a MVC type thing with ASP.Net and avoid the headache of all that re-design and porting.