Tony Patton gives an overview of the notable features that are available with ASP.NET 4.5.
Microsoft continues to add new features and fix others in ASP.NET, while I continue to support an ASP.NET 1.1 application along with many others using the various flavors of ASP.NET. The latest version to hit the streets (ASP.NET 4.5) coincides with the release of .NET Framework 4.5. It was released late last year, but I am just now diving in to it as I begin development on an application for a new client. Here's a quick tour of ASP.NET 4.5; I'll focus on specific features in future posts.
The 4.5 version number deserves discussing for the pure fact that it is a little confusing. Microsoft has been releasing technologies (via CodePlex) even before .NET Framework 4.5 was released; for this reason, the version numbers for the various technologies within the framework are out of sync.
Microsoft incremented the base framework and ASP.NET a half point (4 to 4.5), while core languages received a full increase with C# 5.0 and Visual Basic 11. Past upgrades have allowed you to utilize multiple versions side-by-side, but this is tricky, as the .NET Framework 4.5 installation replaces libraries used in 4.0 applications.
In short, be careful with the upgrade. I am in such a situation, so I will discuss this in more detail in the future.
Where do we begin?
There are too many features in ASP.NET 4.5 to cover in one post, so I'll stick with some of the notable features added or enhanced in this version.
- Web Sockets: Full support for the Web Sockets HTML5 standard is available with ASP.NET 4.5 running on IIS 8.0 via the SignalR library. This allows you to easily add real-time Web functionality to applications.
- Authentication: There is now a universal provider (DefaultMembershipProvider) for simplification. In addition, the OAuth protocol is embraced.
- Async programming: While this feature is not ASP.NET-specific, it is worth noting that C# 5 and Visual Basic 11 provide async support without using multiple threads (via async and await keywords).
- Web publishing: This feature has been enhanced, whereas you can compare local and remotes files, publish only selected files, and so forth.
- Web API: This API provides the REST approach to building applications — a key difference from the WCF alternative. In addition, the Web API now includes extensive OData support, which is another instance of Microsoft embracing open source standards.
- Friendly URLs: The popularity of tinyurl demonstrates the widespread problem of keeping up with long, arcane URLs. This feature is now available with ASP.NET applications via the FriendlyURLs feature.
- Mobile: The explosion of smartphones, eReaders and other mobile devices has changed the landscape for Web application development. HTML5 support is supposed to simplify mobile application development. In addition, MVC 4 includes mobile templates, and there are a variety of mobile device emulators that can be used in Visual Studio 2012.
- IIS: This allows you to use new features available in Internet Information Server (IIS) 8.0. Some of these features include prefetching and application initialization like application ping on startup. Also, an express edition of IIS is now available.
Once upon a time I thought Web Forms may be on their way out, but ASP.NET 4.5 proves me wrong with many updates to the stalwart of ASP.NET interface design. These enhancements are one of the reasons I was intrigued by the newest release of ASP.NET.
While MVC developers are fully aware of model binding, it is now available to the Web Forms world. Model binding binds a value in the client application to a model on the server — this allows validation on the server. In addition to model binding, ASP.NET 4.5 offers strongly typed. A new ModelType property has been added to the data controls that allows you to specify the type of object that is bound to the control. The IQueryable object allows you to manipulate the query to provide paging, sorting, and much more. Web Forms also adds HTML5 support.
Too much for one person
I will pick certain ASP.NET 4.5 features as we build a new application, but I will use older methods for some features. The days of one developer keeping up with all facets of the .NET Framework and ASP.NET are over — the technology and products is overwhelming. This is why you have some developers who stick with Web Forms (my hand is raised), others who jump on the MVC train, and still others use both or alternatives.
The complexity of the .NET technologies overwhelmed me in the past, but I now realize it is a great situation because it provides flexibility and options when building an application; this fosters the creativity that so many developers love and crave.Keep your engineering skills up to date by signing up for TechRepublic's free Software Engineer newsletter, delivered each Tuesday.