Search code examples
phpasp.netautomated-refactoring

Is there an application that can convert PHP code to ASP.Net?


I'm tired. I have ~30 really messy PHP files in my project. Hearing people say that Asp.net is more structured , that it is better (I'm mostly relying on Jeff's advice @codinghorror here) and that it is possible to use asp.net without using bloated software from M$. I don't want to and will not convert the the work done upto now, by hand.

Note: I want a good tool -- I don't want to go from ~30 unstructured and messy files to even messier stuff stored in a quantillion directories with odd file names (Java)


Solution

  • The difficulty is that you can do some things automatically in ASP.NET that you have to do by hand in PHP. For example, if I change a input textbox and when I tab away I want it to be saved automatically, in ASP.NET I can use AutoPostback='true'. Then, in the code-behind you would handle this update.

    My point is that ASP.NET and PHP are very different, in that there are so many tools that ASP.NET that you can use, so your code will look very different when going from PHP to ASP.NET.

    I think using a tool would be a bad idea, as this rewrite would give you a chance to clean up the code and to decide which options to use that are available.

    UPDATE: In order to do more with interactive applications there is a free toolkit available that I would recommend: http://www.asp.net/ajax/AjaxControlToolkit/Samples/