Migrating Windows Forms to ASP.NET

  • Thread starter Thread starter samantha
  • Start date Start date
S

samantha

is there an easy way to convert a Windows Forms app to an ASP.NET one? I
understand there are UI and control differences which may arise but, in general,
is this an easy conversion?

Thanks.
samantha.
 
samantha said:
is there an easy way to convert a Windows Forms app to an ASP.NET one? I
understand there are UI and control differences which may arise but, in general,
is this an easy conversion?

No, I would say it's not a conversion at all, but a rewrite. Rich client
applications and web applications are two very different things. Failure to
recognize this will result in pain and suffering.
 
There are no wizards that will convert from a WinForm to WebForm, these two
worlds are fundamentally different. In WinForms everything runs locally,
with WebForms everything runs remotely, except client side
scripts(JavaScript).

If the transition is easy or not depends on the complexity of the program.
You will have to scrap all your existing UI code and replace them with Web
UI code. Another consideration with Web applications is the matter of state,
HTTP is a stateless protocol, there exist mechanisms to overcome this like
ViewState, SessionState and ApplicationState. The use of Session and
Application state should be used with caution, they create objects on the
server, and if you have many users, you may run out of server memory. The
session state also has a lifetime, so it may just vanish if the user has
gone for a coffee break.

If you have advanced UI, this might be hard to recreate in a web
environment. You probably have to use JavaScript and CSS in addition to
ASP.NET.

Setting up server side event handlers that respond to user interaction is
fairly simple to implement, but if you have to post back to the server for
everything you do, the application will not be very responsive.

If your application is content with just manipulating a database, web works
fine. However, if you want to manipulate local files, you will encounter
many of the security restrictions imposed by ASP.NET.

Good luck in your conversion.

Chris
 
Back
Top