1

Basically, I was given a program written in Visual Basic. My problem is, how can I possibly convert this to a web application? I have read that it's advisable to convert it to an ASP.NET web application. But how can I do this? I'm just really starting, and I really need some step-by-step instructions here. Thank you so much.

2
  • 1
    Is the VB program a desktop application? Apr 19, 2012 at 1:51
  • 1
    Yes. The VB program is a desktop application and my task is to make it a web application.
    – cmsl
    Apr 19, 2012 at 2:13

3 Answers 3

1

There is no "conversion" process. You will need to start from scratch and cannot reasonably expect to reuse any of the old code. The two worlds are just too different.

Start by documenting the main requirements from the existing application then use that to design and develop a new website.

1

The stateless nature of web applications usually requires a totally different design than stateful desktop apps. (There is generally no state stored between clicks on the webserver, so every click(postback) is a brand new beginning from the server's point of view.)

Start by breaking down the app into the progression of screens present in the original app. Basically, everytime your desktop app has enough information to compute a new big chunk of the final output, that's a place where you might send the input data to the server for processing in your web version. In between each step, there's a new screen (or page) for the collection of new input and the display of what can be computed from the previously collected data.

On the server side, your old computation/database algorithms might be reusable if they don't contain much code for updating the Desktop app's UI.

There are a variety of ways for modeling your screens/pages. In .NET you've at least got ASP.NET, ASP.NET MVC, and even Silverlight.

1
  • 1
    I plan to use ASP.NET. My main problem is, where can I start? I'm just a beginner. Sorry.
    – cmsl
    Apr 19, 2012 at 2:17
0

Steps

  • Pick your new environment if unknown.
  • Learn new environment well if you don't know it yet
  • Convert code to desired framework

Code Conversion

Chances are VB code is mostly procedural and has no classes. Copy and paste it into your new environment. You can do "all of it" or piece by piece. This may depend on the details, but I suggest all of it so that you can do mass variable renaming and function syntax cleanup right away. For example VB to PHP, you have to add $ in front of each variable. You also have to change function headers to conform to new environment.

If you port code piece by piece you have to do same things over and over for each piece of code. If you do it one time for entire codebase, polishing code may initially take more time, but you will be doing bulk operations one time rather than many times.

Write Tests

If you are going through the trouble of code conversion, you might as well do it right. Tests will

  • make sure you have converted functionality correctly

Focus on encapsulating functionality the core, the engine of the app

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.