views:

86

answers:

3

Thus far worked with C# winforms applications and had success with it.... My next project would be a web based one in asp.net...

As i am a newbie i want to know

  • Challenges involved when moving Window based to Web based Development?

  • What are the factors i have to watch out for?

A: 

To move into web programming, the easiest switch for you would be to start using web forms.

However you are not getting the full experience as Web forms hides a lot of how the internet works to make it seem like desktop programming.

A much more 'native' way of building web sites is to follow the MVC pattern. Which is not more difficult, but it is different.

ASP.NET MVC is probably your best bet as you already use C# and Visual Studio. But once in the MVC mindset you can easily switch to Django, Symfony or Ruby on Rails if needs be.

Jon Winstanley
+2  A: 

The big things that makes web development a different experience for a former windows dev will likely be these two:

  • State Management: With a web app, your code only lives on the server for a very small slice of time during the actual user's request. Then it terminates. In windows development you are used to having your objects live the entire time and your state just "is". For example, if you load data into an object, that object is just there. When the user clicks a button that filters the data all the code does is modify the existing object and it's done. On a web app though, the object only exists for a moment. So when the user goes to click that button you have to rebuild the object, then filter it, then send the results down to the client again. This stateless design of web applications is a real challenge and will show up everywhere in your code. There are ways to do state management of course, but it isn't always automatic. This alone makes programming web apps feel very different from windows apps.

  • The client is HTML/Javascript: Browsers do expose an object model that represents the page, and you can use javascript to interact with that object model; but it is one of the most complex and poorly organized object models ever invented by mankind. Just getting a handle on the various objects, what they do, and their many quirks can take a lot of time. Add to that the massive number of things you "can" do with this API that you aren't "supposed" to do (either from convention, or from the so-called standards) makes this even more fun. Then add on to that the fact that the standard UI features available to you are VERY limited compared to windows UIs and you end up with a lot of frustration...

As for things to watch out for... wow! That's a big list!

I guess the biggest thing is to really make sure you test your pages in multiple browsers. Too few developers just "assume" it will work in all of them. I also advise you NOT to do your initial development using IE. I've found that if you use Chrome or Firefox and make sure it works there first; then it is more likely to work in IE too... but the reverse is not true. IE still has a lot of backwards compatibility that allows it to render things that just don't work right elsewhere.

Stephen M. Redd
+1  A: 

Unless you have a team with you, welcome to the wonderful world of:

  • Hosting (IIS, etc)
  • Web Designing
  • CSS/HTML
  • Javascript
  • Page lifecycle (when to do what)
  • Timeouts
  • Security
  • Form Handling

Although the business logic/process is the same regardless of development platform, there are many more aspects to take into consideration when transitioning to web development. I actually started off doing web-based application programming, and I LOVE the opportunity to make a quick winforms app.

Web-based stuff takes much more design/usability into consideration. Again, since I haven't done tons of winforms, I'm not sure of specifics, but there is much more flashiness available online (which can be a blessing or a distraction), and it all requires knowledge.

Hope that helps.

The Mirage