How to move from windows applications programming (WinForms using C#.NET) to web applications programming (ASP.NET)?


I have been working on winforms using C# in my company for quite a long time, and I have a fair experience implementing those. However, I need to change my job and work somewhere else. The market in here is mostly in need for web applications developer which I never worked with before. How difficult is it to move to using ASP.NET ? and what's the best way to start my self-learning given that I don't like to bear a book and read from it?

Thanks



Some of the stumbling blocks you'll run into that aren't covered under WinForms development are:

  • The ASP.NET Page Life Cycle
  • IIS Configuration
  • Security
  • Performance
  • Search Engine Optimization
  • The HTTP protocol
  • HTML/XML/CSS/Javascript
  • Databases (most web sites anyways)
  • Web Services
  • Browser differences (this one really blows)

See What should a developer know before building a public web site? for a good start on what you'll be getting into.


A lot of people seem to be moving to web applications these days; the good news is that it isn't as hard as you might think. ASP.NET takes advantage of a lot of the same design patterns for the UI framework as WinForms, so it should be pretty straightforward.

Also, moving to ASP.NET, you can still leverage all your knowledge about C#, since it's one of the supported languages for the technology. You'll be up and running in no time.

There are a couple ways you can build user interfaces with ASP.NET, but the most common is ASP.NET WebForms. You can also use frameworks that provide some abstraction like ASP.NET MVC (similar to Ruby on Rails) if you want to separate your business logic and your interface a bit more.

I'd suggest taking a look at http://www.asp.net, which has a ton of great resources for getting off the ground as well as videos, samples, and walkthroughs. Best of luck; I'm sure you'll be fine!


The hardest thing about that transition is that many of the examples you will see have most if not all of the code in the aspx.cs code-behind page.

If you have been following good design and coding methods in the WinForms world you know that the more you can separate the presentation from the classes and objects you design the easier your design is to test. It's the same in the web world.

It will take a bit to get used to the page and control lifecycle, and a few objects are more different than you might first think - but it should be a fairly smooth transition.