After developing ASP.NET apps exclusively for several years I’m about to start developing Winforms apps. What are the gotchas that I should be looking out for with this changes? For instance the way object lifetime is managed in the winforms paradigm. I’m sure there must be plenty of gotchas / differences between the two that I need to be mindful of.
Thanks.
There are many gotchas going from Winforms to ASP.NET. However going the other way you might just experience a breath of fresh air since it’s all running in process and you have a fully stateful environment, meaning things won’t disappear and be rebuilt.
At times you will be confused because you’re still thinking in ASP.NET and the Winforms way is too easy. Prepare to bang your head against the desk and repeat “stupid, stupid, stupid… it’s so obvious” and stuff like that.
However
Layout and design will feel a little more stringent compared to the natural flow of HTML and its application of CSS style separately.
For a more beautiful and richer UI you might want to consider WPF to succeed your Winform endeavours. This Microsoft section provides info on both technologies.
There will be a transition of course as you learn the classes specific to Winforms, however they feel similar to the ASP.Net versions, just simpler to implement.