I recently started reading Packt Publishing’s Visual Studio 2012 and .NET 4.5 Expert Development Cookbook. It is a book focused primarily on the new features of .NET 4.5 and Visual Studio 2012. Although some concepts already existed in previous versions (some Visual Studio IDE elements, for example), others are quit new (take Windows 8 programming APIs and the new asynchronous syntax). It follows the now classic recipes or cookbook approach, where for each category, a number of recipes are presented with a brief description of their purpose and some code to illustrate the solution. It is a very focused book, it doesn’t cover anything that shouldn’t be there.
The first chapter is about the IDE, how to use it effectively and how to extend it without using code. It walks us through creating templates and code snippets and in the process we get to know smart tags, refactoring options, UML diagrams and other nice functionality.
On second chapter, the focus is .NET application and memory management. We learn about the internal structure of a .NET assembly (actually, its various types), garbage collection and memory management and even how to disassemble it with ILMerge or Reflector. Talking about disassembling, some tips for protecting an assembly against it are also presented by means of Dotfuscator. Also includes an interesting tip on detecting memory leaks. This is the one chapter that mostly deals with pre-.NET 4.5 concepts.
Next comes asynchronous programming, something that most people (including myself) are looking with increased interest since the arrival of .NET 4.5. The chapter presents all programming models currently available for .NET developers and talks about some not well known thread synchronization objects and techniques of the .NET world, including guidelines on choosing the appropriate mechanisms. Finally it covers the new async and await pattern.
Following is a chapter on the new enhancements to ASP.NET, which go from HTML5 editor and syntax support to working with strongly-typed models in data-bound controls. In the middle, it also covers using asynchronous programming techniques in pages, modules and handlers and effectively using jQuery. There’s also a recipe on actually using some of HTML5’s new features, which is not strictly on ASP.NET, but is useful nevertheless.
WPF is next. The very popular MVVM patter is presented together with the new improvements like Ribbon support, a feature which seems to be becoming ubiquitous in Microsoft products.
The last chapter talks about the various options for communicating and sharing contained within Windows 8. Also a very interesting one, of which I knew nothing about. It covers the ways by which we can share data between Windows 8 applications, writing notification services in WCF and displaying notifications in tiles or toasts.
It was a very pleasant read, I am sure to return to it very often, for some of the topics are very wide.