3

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?

  • 3
    Related: [Starting a coherent architecture in a legacy application](http://programmers.stackexchange.com/questions/118035/starting-a-coherent-architecture-in-a-legacy-application), [Best Practices for Handing over Legacy Code](http://programmers.stackexchange.com/questions/118419/best-practices-for-handing-over-legacy-code), [How to approach refactoring an existing web application?](http://programmers.stackexchange.com/questions/27335/how-to-approach-refactoring-an-existing-web-application). – yannis Feb 08 '12 at 13:00
  • [Reverse Engineering PHP application without reading the (ugly) Code](http://programmers.stackexchange.com/questions/124015/reverse-engineering-php-application-without-reading-the-ugly-code) – yannis Feb 08 '12 at 13:53
  • 1
    Adobe has not abandoned Flash. Adobe has simply said they are not going to migrate Flash to the mobile market. This leaves Intel based Tablets and PCs which is 70% of the market. Both of these issues "the enormous amount of bugs and requests for changes and also complaints about slowness." can be solved by better testing and quality control. – Ramhound Feb 08 '12 at 17:35

2 Answers2

5

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.

Murph
  • 7,813
  • 1
  • 28
  • 41
1

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.

ist_lion
  • 3,422
  • 1
  • 22
  • 23