Hottest ASP.NET 2.0 Features
Hey Dino, what are the hottest features in ASP.NET 2.0 that we should consider when we plan upgrades to existing applications?
All speakers would begin with "Thank you. This is definitely a great question and I'm happy to have a chance to discuss it publicly!" Usually, this sort of stock phrase serves the purpose of taking some time to think and decide where to start from.
ASP.NET 2.0 counts two types of enhancements: those which require changes to the HTTP pipeline and the page handler and those which are just well-written wrappers around existing functionalities. In my recent Cutting Edge columns, I demonstrate just this. Specifically, personalization, themes, image generation, cache dependency, script callbacks. Paul Wilson and others demonstrated Master Pages.
Here's my list of the hottest features that might lead you to consider an upgrade:
- Master Pages
- Data source controls
- Session and Cache enhancements
- Provider model
- Rich controls
One of the most frequently asked questions (for me, at least) is "what's the best way to quickly and effectively prototype hundreds of similar-looking pages?" Master pages is the answer. And is a great answer indeed. While master pages can be emulated in 1.x, or maybe implemented through a sort of visual inheritance pattern, in 2.0 you get a system-level solution optimized and integrated with the rest of the framework. And completely hassle-free.
Data source controls provide a system-level bridge between data-bound controls and data providers. In the field, an extra intermediate layer backing data-bound controls proved necessary. Serious apps already have this custom layer, better yet if connected to a BLL. Again, you now have a system-level solution. And can maintain your BLL intact or just must change the signatures of the methods slightly.
Session and Cache enhancements provide new features that were hard (not impossible) to accomplish with earlier versions. I'm talking about custom and database cache dependencies; and custom stores for session state. The provider model makes possible now to build robust Web apps with a single database. What if in 1.x you have to work with an Oracle database and need database storage of session state? No way: you must install SQL Server too.
Rich controls: treeview, menu, wizard, multi-view, plus the family of data-bound view controls. They save you A LOT of boilerplate coding. Hard to believe? Try security controls (Login, password, user) and let me know.
PS: Stay tuned to the ASP.NET DevCenter. More on this coming up.