[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

Convert .NET Application to a Web Form

I am trying to convert a .net Application to a webform.  Is there an easy way to do that?
0
tobey1
Asked:
tobey1
  • 2
1 Solution
 
AlexmipegoCommented:
You need to give more details. I assume you have a Windows Forms Application that you wish to covert to ASP.NET, if thats it, you can share the main logic but you can't convert a Windows Form to a Web Form.
0
 
tobey1Author Commented:
That is correct.  I have a windows form that I want o turn to a web form.  If that is the case, man, that means a lot of design work.  I noticed that there are things that I did with the Windows Form that I cannot duplicate with a web form, thus the need to convert the entire project.
0
 
AlexmipegoCommented:
Have you ever heard about 3-tier? Well, this is how it works:

1rst tier - DB Access Layer (DAL)
2nd tier - Logic
3rd tier - Presentation

This means that in the DB access layer you place the code to interact with the db, that is, no SQL, connection strings, etc... in the other layers. The Logic, or Business Logic Layer, if the logic of you application. And finally, the Presentation Layer is your UI.

There are some advantages and disadvantages implementing this. First the disadvantages. Hard to learn, you need to read and research a lot to do it well (but you can get there with experience, and don't bother to try doing it all good in the first tries), and sometimes it envolves a litle more code. The advantages are many and all welcome, just a few:

1. Abstraction - if you need to migrate to another db, for instance SqlServer, MySql; Oracle, you don't need to touch in the Logic or Presentation Layer
2. You can have multiple "versions" for each tier, that is, you can have one dll with MySql support, antoher with Sqlserver, etc... and in this case, yet very common, you can have several instances of the presentation layer. Since the logic is all separeted you can easily have a Console, Windows Forms, ASP.Net, Pda, etc... versions.
3. The tiers can be phisicly separeted. Using WebServices or something else, you can place the DAL next to SqlServer, the Logic in another Server, ASP.Net on another and the Windows Forms version on the clients, yet both ASP.NEt and Windows Forms versions could be using the same WebServices.

So, I hope that since you have to refactor some of your work, you take some time analysing and doind things right :)
0
 
MsShadowCommented:
Alexmipego is correct. That is indeed the best way to refactor your application. If you did not design it 3tier in the first place now is the time to do it. You can probably go for a quick and dirty copy to a webform and have most of the functionalities in it, but as soon as change requests come in you'll be a lot faster (and cheaper) when using the 3-tier/n-tier setup.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now