I'll be starting my first web development job in a few weeks. Most of the code I'll be working on will be ASP.NET 2.0/3.5 Web Forms. What bad habits does this platform lend itself to and how should I avoid succumbing to them?
closed as not constructive by ChrisF♦ Apr 23 '12 at 21:44
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.
Classic (non-MVC) ASP.NET tends to abstract some of the aspects of the web. For example, through its controls which copy the controls as used in Windows Forms, ASP.NET tends to forget that web is based on stateless requests, which is radically different from what happens in Windows Forms where a control remains the same during the lifetime of the form, and every event does not reset the whole form as it is a case with ASP.NET.
ASP.NET also tend to oversimplify some things over the quality of code. For example, SQL queries embedded directly in ASPX templates is, well, horribly wrong in most cases.
You can avoid to take the bad habits by:
Since you'll be working on an existing project, focus on learning as much as you can from the existing code. And don't forget about your co-developers! They can teach you a lot. Once you feel comfortable navigating the project, look for ways to improve the existing code base. Here are some suggestions.
You can write a well designed n-tier architecture or you can put all your logic in the code-behind rendering the application a maintenance nightmare.