CHAPTER 1
1
Introduction
These are exciting times to be a .NET developer, and Visual Studio 2010 (VS2010) and the .NET 4.0
framework have brought a bewildering number of changes. But fear not! In this book I will be getting you
up to speed on these enhancements, and also taking a brief look at some of the important out-of-band
releases, such as ASP.NET MVC, Silverlight, and WCF Data Services. There is some cool stuff in this
release, and most of it is not that tricky (with the exception of variance and parallelization) to get to grips
with.
Versions
Visual Studio 2010 is available in five main versions:
• Express
• Professional ($799)
• Professional with MSDN ($1199 new or $799 renewal)
• Premium with MSDN ($5,469 new or $2,299 renewal)
• Ultimate with MSDN ($11,924 new or $3,841 renewal)
Note that these editions also come with free Azure time (Chapter 16).
It is likely that the Professional edition will fulfill most developers' needs, but to see what you are
missing, I have summarized some of the additional functionality found in the Premium and Ultimate
editions in Table 1-1. For a full comparison of features please consult: www.microsoft.com/visualstudio/
en-us/products/2010/default.mspx.
Table 1-1. Simplified Comparison of Advanced Version Features
It em
Pr e miu m
Ul ti m a te
Code coverage X X
Coded UI test X X
There are also some great language enhancements that can make code cleaner, such as optional and
named parameters, dynamic functionality, and changes to variance that will be covered in Chapter 3. Some
of these changes will also assist developers working with COM, who frankly need all the help they can get,
poor guys and gals (a moment of respect, please).
Maturation of Existing Technologies
Many .NET-based technologies, such as ASP.NET, have been around for some time now and haven’t
changed hugely in this release. Microsoft has, however, fixed a number of long-term omissions in
ASP.NET and introduced some useful tweaks, which I will cover in Chapter 10.
Toward the end of 2008, Microsoft announced that future versions of Visual Studio would include
the popular JavaScript library, jQuery. Although not strictly a .NET change, jQuery is a very useful
framework that you will defiantly want to make use of in your web applications. I cover it in Chapter 12.
In Chapter 11 we’ll look at the enhancements to Microsoft’s own Ajax libraries, which make it very easy
to bind to data with client script.
CHAPTER 1 INTRODUCTION
3
Windows Workflow Foundation (WF) and Windows Communication Foundation (WCF) are much
more closely integrated in this release. WF undergoes a radical overhaul with a much-improved
designer, introduction of new activities, and easier customization (Chapter 6). WCF becomes simpler to
use and also introduces new service discovery functionality that I will examine in Chapter 7.
WPF has some great additions, with an improved designer, multi-touch, and Windows 7 task bar
support that I will look into in Chapter 15. I will also be taking a quick look at Silverlight 3 in Chapter 15.
Even through Silverlight is not a .NET 4.0 technology, I believe it is an important release. If you have
never used Silverlight before, then take a look at Chapter 14, which contains a brief introduction to
Silverlight.
Entity Framework received much criticism when it was first released, and the team has attempted to
address these criticisms in .NET 4.0. Find out if they have in Chapter 8.
Extensibility
VS2010 is your flexible and extensible friend. You may have already heard that much of the IDE is now
written using WPF and can be customized with the Managed Extensibility Framework (MEF). I will look
What am I excited about? There’s a truckload of productivity enhancements in VS2010, like snippets for
Visual Web Developer. At last, snippets for ASP.NET, HTML, and JavaScript! Reference highlighting and
generating types from usage are two other productivity enhancements I’m looking forward to, as well as
the Intellisense enhancements (I no longer need to remember the exact member name and the
improved JavaScript support is awesome).
I dabble in Office development from time to time and have a tendency toward C#, so I’m really
pleased to see the language embrace the likes of optional and named parameters as well as the new
dynamic type, which will make COM interop that much easier. Office development in C# is going to be a
dream from now on!
From a web perspective, I love the new features in Web Forms. Many of them are small, but they are
crucially important enhancements to the platform, as well as the new kid on the block: ASP.NET MVC.
Choice is always good, and ASP.NET now offers two great choices. Add into the mix the Microsoft Ajax
enhancements such as client-side templates/databinding and jQuery integration, and you have a killer
web application platform. And of course there’s the Web Deployment Tool and web.config transforms
that allow you to automatically ready and package your applications for deployment.”
Eric Nelson (Microsoft Evangelist)
For me .NET 4.0 represents a turning point in how we will develop database applications in the future.
With .NET 4.0 we get a great Object Relational Mapping (ORM) technology in the ADO.NET Entity
Framework 4.0, which will significantly simplify the effort involved to work with RDBMS from .NET
applications. I have been really impressed with how the product team listened to feedback from the
community on the initial release of the Entity Framework and went on to deliver significant new
functionality in version 4.
Craig Murphy (MVP and developer community organizer)
Every so often the computing sector goes through a paradigm shift. Programmers have gone through
many such shifts, many of which are the result of a change in design techniques or in some cases
changes in the way we think. The leap from procedural programming to object-oriented programming is
an example of a paradigm shift. More recently, with functional programming becoming part of the
mainstream Visual Studio product, programmers are offered another shift.
Dave Sussman (MVP and author)
www.ipona.com
One of the things I love most about .NET and Visual Studio is the teams themselves and their openness
to the community. Sure, they keep certain things hidden and have private betas, but much of what they
do is public and open to comment, which makes the product improve in ways that we, the developers,
need it to.
Much of the talk is about MVC, a great platform that has brought in new users, but I’m excited by
the changes to Web Forms, MVC’s mature elder brother. Web Forms are still supported and still being
actively developed, and although the changes aren’t as radical as MVC, they are far reaching. Many
ASP.NET controls in .NET 4.0 now emit clean HTML (the Menu being a great example), and along with
the control of client IDs, we have a far better platform for building Ajax based sites. Couple that with
features such as the client templates and support for jQuery, and the platform is re-energized; I'm loving
the thought of building Web Form sites without having to jump though so many hoops to produce
standards compliant HTML that can be easily styled with CSS.
In Visual Studio itself the most exciting new feature is the potential that WPF brings. Using WPF for
the code surface not only allows a UI refresh to make it look better, but opens up wonderful possibilities
for tools to enhance the code editing experience. I think what we have now is just the tip of the iceberg in
terms of what’s possible for editing support.
CHAPTER 1 INTRODUCTION
6
Matt Lacey (Devevening.co.uk organizer)
blog.mrlacey.co.uk
www.devevening.co.uk
I meet lots of developers, and most of them don’t have lots of time to learn new things or even an
inclination to do so. For that reason I’m always excited to see features that need minimal training or
explanation. Named and optional parameters are two such features. They’re easy to explain and
understand. Plus, they can allow for a dramatic reduction in the amount of code needed for some tasks.
Needing less code to perform a task should lead to fewer bugs and more time to test and implement new
features. Everyone wins!
your passion for development. Get out there to conferences, user groups, and blogs. (And buy
Apress books about new releases of .NET! – author)
CHAPTER 1 INTRODUCTION
7
• C#, ASP.NET, SQL Server remain core skills companies seek.
• There is some interest in “Agile” skills and SCRUM but less in TDD.
• Increasingly, WCF and WPF skills are expected on a developer's resume.
• Many public sector projects are still using .NET 1.1.
• There is an emphasis on web over desktop programming.
• Silverlight and MVC are not yet in demand (note many developers I spoke to disagreed and felt
Silverlight is the current hot area – author).
• MVC has been used as hook to attract developers.
• Technologies such as BizTalk have decreased drastically in popularity.
My Own Subjective Opinion
WPF certainly seems to be a growth area. The highest .NET contract rates appear to be for Silverlight
currently. My own subjective experience of the job market has shown ASP.NET remains popular, and
jQuery is becoming a must-have skill. It will be interesting to see if ASP.NET MVC becomes mainstream,
although I suspect many companies have too much investment in ASP.NET now, and that ASP.NET
MVC will be too big a change in thinking for many developers.
The new parallelization functionality is interesting, but I suspect will not be utilized or needed in the
majority of line of business applications. Developers skilled in threading and parallelization should
always be able to command high salaries, so it will defiantly be worth looking into.
Summary
Enough of a high level overview, let’s get started with the new IDE functionality–bring on Chapter 2!
static void Main(string[] args)
{
dynamic alexBook;
alexBook.Run();