It's that time again! Microsoft has a new version of the .NET framework and Visual Studio. In this article, the most promising features and tools of Visual Studio 2011 are described.
In September, the good folks at Microsoft released an evaluation version of Visual Studio 2011, called Visual Studio 11 Developer Preview, together with .NET Framework 4.5. It appears that this release of Microsoft's flagship development environment is moving toward a somewhat revised and smarter model. The recently released VS platform indicates Microsoft has plans to provide Windows applications that are more touch-centric, intuitive, and device-aware.
Deployment of applications is being given a more contemporary model in which applications can be downloaded, installed, executed, and uninstalled without unalterable changes to the operating system. Further, we should not be surprised to be shopping for mainstream applications for various devices at the Windows App Store before long.
Not all is rosy, however. One minor criticism can be leveled against the bloated Visual Studio development environment: it's the IDE that can't say "no." Performance is sluggish within the development environment itself. This isn't exactly new with VS 2011, but it's certainly more acute. But that's a small matter; just buy more-powerful development computers, right?
Engineered Development Cycle and VS Languages
Microsoft has furthered its cradle-to-grave approach to application development, where the entire software lifecycle is modeled to assist with…
- Application architecture
- User interface design
- Code development
- Code insight and development
- Testing and validation
- Packaging and deployment
Visual Studio has included a source code management system through the Team Foundation Server, and this release has been enhanced to provide improved support for version control and compatibility with previous .NET releases.
- Visual Basic (VB)
(Note: C#, VB, and C++ are all engineered for Windows 8's XAML paradigm.)
New Features in Visual Studio 2011
Although Microsoft is not making hard-and-fast promises for the final release of Visual Studio 2011, the more interesting new features in the Developer's Preview currently include the following:
Support for Metro Style Applications
Visual Studio has made it easier to develop applications that are touch-controlled, can support a split or filled view, and are device-aware—that is, apps that resemble how other popular devices operate, like Android or iPhone. (Note that Metro Style apps require underlying support provided by Windows 8.) More on Metro Style apps later.
Microsoft has added new tools to Visual Studio to help game developers become more innovative and productive. VS 11 includes tools for editing, visual design, and visual debugging of 2D and 3D games and Metro Style applications. Visual Studio Graphics includes tools for performing these tasks:
- Viewing and basic editing of 3D models in Visual Studio 11
- Viewing and editing of images and textures with support for alpha channels and transparency
- Visually designing shader programs and effect files
- Debugging and diagnostics of DirectX based output
- Integrating with MS Expression Blend, developing browser-based applications to provide a more accurate rendering during user interface design
See MSDN page "Enhancements for Game Development" for screen shots and examples.
Source Code Analysis for Refactoring
You can use the Code-Clone Analysis tool in VS 11 to intelligently examine your source code, looking for duplicated logic and refactoring this code into one or more methods. MSDN explains: "The tool does this very intelligently; it does not just search for identical blocks of code; rather it searches for semantically similar constructs using heuristics developed by Microsoft Research."
Code Review Workflow with Team Explorer
This tool facilitates ad hoc code review and task assignments for multiple-developer projects through integration with MS Team Foundation Server.
Exploratory Testing and Enhanced Unit Testing
This tool allows agile unit testing and logging to be added to a project without requiring formal test cases or test suites.
New for C# and Visual Basic
MS offers some new stuff for C# and VB programmers too.
New C# and VB Keywords
Code for async processing is now generated by the compiler with new keywords "async" and "await."
New VB Features (Previously Implemented in C#)
VB now supports iterators, call hierarchy display in IDE (shows method calls and overrides,) and a global namespace.
New for .NET Framework 4.5
Several new or enhanced features are incorporated into the .NET 4.5 framework.
Culture and Localization Support
New features include built-in mechanisms for language support and for proper date, time, currency, and number formatting.
This new feature allows use of a customized reflection context to override default reflection behavior using an instance of the CustomReflectionContext class.
Enhancements to Managed Extensibility Framework (MEF)
MEF is used in large applications to assist with component coupling and code reuse. Improvements within the MEF library allow generic typing and new name-based conventions as a programming model.
Asynchronous File I/O for C# and VB
This task-based model allows for performing file operations asynchronously.
New for ASP .NET
ASP .NET was also a recipient of some upgrades.
Better Support for HTML5 and CSS3
Although limited support for HTML5 was made available for VS2010 under Service Pack 1, VS 2011 more fully implements basic functional fixes for HTML5 editing and support for CSS3 intellisense.
This enhanced model enables converting to and from .NET framework types.
Improved Web Application Performance and Support
Model View Controller (MVC) is a structured architecture for building versatile and scalable ASP.NET applications using well-established design patterns. MVC 4 extends the features, mostly to accommodate mobile computing devices.
New for Windows Presentation Foundation (WPF)
WPF also benefitted from some upgrades.
The quick-access toolbar includes a menu and tabs.
New features offer support for live shaping (a means of sorting and updating a displayed collection of data without an additional server call) and better control repositioning.
WPF now offers binding to static properties and custom objects, a disconnect detection feature, and the ability to force a physical write to a data source based on elapsed time.
Improved support for weak event design pattern implementation is new in WPF.
New for Windows Communication Foundation (WCF)
Improvements in Communications
New WCF features include simplified configuration of communication objects, better compatibility, and new support for asynchronous data streaming.
Metro Style Applications
Of particular interest and an enabler of future directions for Microsoft development strategies is VS 2011's support for Metro Style applications. Metro apps are about the experience. They provide a full-screen view where even the operating system ducks out of the way, plus a smaller "snapped" view for multi-tasking and switching between active applications.
Metro app developers are assisted in making their programs more intuitive and responsive to users' needs. Apps should be attractive and engaging, with "tiles" that draw the user in and encourage them to revisit the app in the future.
Metro apps are also designed to be touch-responsive and able to react to different device form factors. Some Metro apps will be able to share content with other devices and to access social networking resources. The enterprising Microsoft developer would do well to explore this new approach to Windows programming.
Some Visual Studio 2011 Web Sites
Please see the following for more information:
- What's New for ASP.NET 4.5 and Web Development in Visual Studio 11 Developer Preview
- Visual Studio 11 Developer Preview with .Net 4.5
- Windows 8 Developer Preview SDK, Visual Studio 11, Expression Blend 5 and Other Developer Tools