Introduction
Welcome to the next era in .NET development..NET has moved from a set of developer-focused tools and a runtime environment to the core of the latest Microsoft operating system. In 2002, Microsoft released .NET and introduced developers to a new paradigm for building applications. For Visual Basic it was not only a new environment, but really a new language.
Visual Basic .NET (as it was initially called) went beyond an overhaul..NET changed core elements of the syntax affecting every aspect of development with Visual Basic. The entire runtime model shifted to a new common language runtime (CLR) environment and the language went from object-based to object-oriented. Although most people didn't recognize it, we were moving to a new language.
Now with the introduction of Windows RT, Microsoft has again shifted the paradigm. Not so much at the language level, but as it relates to how user interfaces are developed and work. The original runtime environment, although enhanced for .NET 4.5, risks being flagged as being on the path to that fatal legacy designator. Windows 8 introduces the concept of Windows Store applications, which are built on a version of the CLR that has different features, and that's important. Because while client applications may view the core CLR as legacy, server-based applications have probably never been in a position to leverage it more.
This book provides details about not only the latest version of Visual Basic and the new .NET Framework 4.5. More important, it carries this coverage to a new platform, Windows RT, and a new class of Windows Store applications. As a result the contents of this book have been turned upside down. This book doesn't just indicate that there are new Windows Store applications, but focuses in directly on how to build and deploy this new class of applications. The result is a very different book from the previous edition.
If you compare this edition to an older edition you'll immediately realize that this edition is visibly smaller. Just as you saw Visual Basic evolve nearly 10 years ago, .NET is going through an evolution of its own. The result was a need to refocus on what this book covers. This has resulted in a sea change with regard to where to focus coverage for Visual Basic.
The most noticeable omission from the book is in fact the original smart client development modelWindows Forms. When Microsoft introduced WPF it informally announced that the era of Windows Forms was ending. It has taken some time, and certainly support will continue for many more years, but the reality is that the evolution of Windows Forms is complete. The information around Windows Forms provided in past editions of this book is essentially complete. While one or two of the chapters do still reference Windows Forms in their samples, by and large the book has moved beyond the use of this technology.
The result was that Billy Hollis, who has a passion for user interface design, agreed to take on the rather significant task of re-imagining how to approach user interface design in a world that includes Windows RT. The new XAML-based interface design chapters are completely redone from the ground up and focused on teaching developers how to approach XAML development from the ground up. The last version of the book approached the user interface model from Windows Forms and transitioning to XAML. However, in this version the approach takes on XAML as the primary user interface development model. As such these chapters address Windows Store application development head-on, not as an afterthought.
However, Windows Forms wasn't alone in being moved into the past. We've eliminated several appendices, Microsoft Office (both VSTO and SharePoint) integration, and references to classic COM. Some, for example, development around Microsoft Office, is facing its own set of changes as Microsoft Office prepares to evolve. Others, such as classic COM and Windows Forms, are no longer technologies that developers should be targeting. We also found ourselves needing to change out how we addressed larger topics such as ASP.NET and Silverlight. The result is that this book is much more focused on building applications using Visual Basic that target Microsoft's core next generation of technologies.
The Future of Visual Basic
Early in the adoption cycle of .NET, Microsoft's new language, C#, got the lion's share of attention. However, as .NET adoption has increased, Visual Basic's continuing importance has also been apparent. Microsoft has publicly stated that it considers Visual Basic to be the language of choice for applications for which developer productivity is one of the highest priorities.
In the past, it was common for Microsoft and others to target different development styles; with Visual Studio 2010, Microsoft announced that VB and C# will follow a process of coevolution. As new language features are developed, they will be introduced to both Visual Basic and C# at the same time. This release is the first step in that process, although it's not complete at this time.
Coevolution does not mean that the languages will look the same, but rather that they will support the same capabilities. For example, Visual Basic has XML literals, but that doesn't mean C# will get exactly the same functionality, as C# has the capability to work with XML through the existing framework classes. The old process of first introducing a feature in Visual Basic and then in the next release having C# catch up, and vice versa, is over. As new capabilities and features are introduced, they are being introduced to both Visual Basic and C# at the same time.
This leads to a discussion of the Roslyn compiler implementation. It seems like almost five years ago that the first whispers of a new 64-bit Visual Basic compiler implemented with Visual Basic started. Considered the standard for a serious language, implementing a language compiler in the language it compiles has become something of a standard.
However, over time this project evolved. Microsoft, seeing commonalities across the C# and Visual Basic compilation projects, realized that once the core syntax had been consumed the remainder of the compilation process was common across languages. While each implementation language needed a custom solution to handle parsing and interpreting the raw code, once that code had been converted to Intermediate Language (IL) the remaining compiler steps were essentially the same.
Suddenly a new conceptthe compiler as a servicewas created. Code-named Roslyn, this is the future for both Visual Basic and C# compilation. Roslyn takes the traditional compiler as a black-box and provides an interface that for interacting with the creation of .NET assemblies. Introducing an API that exposes your components during the compilation process is a powerful tool. Roslyn has been in a technology preview model since well before the release of Visual Studio 2012 and .NET 4.5however, Microsoft isn't quite ready to declare it ready for prime time. As a result it's still an optional add-on with Visual Studio 2012.
However, even though Roslyn isn't part of Visual Studio 2012, Visual Studio 2012 includes a few paradigm shifts. For starters you'll find that you can now work on projects that targeted older versions of Visual Studio without breaking backward compatibility in those projects. Visual Studio 2012 was designed so that those people who move to the latest tools are limited when working with a team that hasn't fully migrated to that new version.
More important, Visual Studio 2012 comes with a promise of updates. It'll be interesting to see how this plays out over the coming months, but the Visual Studio team has indicated that they will be releasing regular updates to Visual Studio. Update 1 has already been announced as this book goes to print, and the team has indicated that they would like to continue with updates on a quarterly basis. This goes beyond what we've seen in the past, with Power Pack style updates that occurred out of the standard release cycle. Instead we see that Microsoft is committing to keeping Visual Studio on the cutting edge of evolving technology. As the environments we developers need to support change, we can expect that Visual Studio will be adapting and incrementally improving to help us.
Next page