How time flies! Last year I presented Modelling in VSTS Rosario with demos in CTP12. Since then Microsoft have moved on: The product is now called Visual Studio Team System 2010 and we are at Beta2 already. For the past few weeks I have used my rare spare time to get to know the Beta2 release. I already liked Beta1 a lot and this is even better. Sure there is room for improvement, which you can express here, but I can advise both VS as well as TFS to anyone for production use. My session is called “New in VSTS2010” and there is much more content such as Surface development, ASP.NET security and ADO.NET Entity Framework. If you want to get the guided tour around VSTS2010 make sure to attend Codecamp in Rotterdam on November 21st. Hogeschool Rotterdam Locatie Academieplein G.J. de Jonghweg 4 - 6 3015 GG Rotterdam 
 Grigori just posted about Enterprise Library being downloaded 2.000.000 times. As you may know I am a big fan of EntLib as it is a great way to reuse plumbing code and focus on business functionality. EntLib 4.1 is the most recent version, ready to use with Visual Studio 2008 SP1. EntLib 5.0 is under construction. Read all about it here.
The beta 1 release of the next version of .NET Framework and Visual Studio to MSDN and to the public has received a lot of attention. Now you want to get started right? So let’s look at what is new for developers. Well a great starting point would be the training kit for Windows Communication Foundation and Workflow Foundation by DPE. http://code.msdn.microsoft.com/wcfwf4/Release/ProjectReleases.aspx?ReleaseId=2698   At the moment the kit contains six labs, including code snippets, to try the latest features amongst which: service discovery! Introduction to Workflow 4 In this lab you will get to know the basics of creating, hosting and running a workflow. This lab is also intended to be an introduction to the new workflow authoring constructs in the .NET Framework 4 and Visual Studio 2010, including the new Workflow Designer, expressions, variables and arguments. Additionally, you will explore the use of some basic built-in activities. Introduction to Workflow Services using .NET Framework 4 This hands-on lab is intended to introduce developers to writing workflow services using .NET Framework 4. You will examine the different messaging activities of Windows Workflow, and learn how to configure them to create a distributed application. This lab is built around a specific HR business scenario where candidates submit their applications and are hired or rejected based on an evaluation process. Workflow Designer Programming Model This hands-on lab introduces you to the designer programming model of Windows Workflow 4. You will learn how to rehost the workflow designer in a WPF desktop application and how to create composite custom designers for your workflow activities. Creating Flowchart Workflows This lab is intended to be an introduction to the Flowchart paradigm used in Workflow development. In this lab you will learn how to create Flowchart Workflows using the designer, and you will also learn the usage of several of the provided activities and how to create custom activities easily. Monitoring Workflow Services using .NET Framework 4 During the life cycle of an application, developers and system administrators often need to monitor running services in order to perform health checks or troubleshoot issues. The Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) runtimes already come with a built-in tracking infrastructure, making it easy to enable monitoring within your WCF and WF applications. In this hands-on lab you will learn how you can leverage some of the main WF and WCF monitoring features to track application execution and troubleshoot problems with services when necessary. WCF Service Discovery using .NET Framework 4 Windows Communication Foundation 4 includes a new feature that enables service discovery. Service discovery allows you to locate services on the same subnet using ad hoc discovery, or using a proxy to establish connections with servers regardless of where they are. In this lab you will create a simple chat application that will use both methods to learn about available services. As usual Microsoft are looking for feedback. If you would like to comment on the hands-on labs, send your thoughts to wfwcfhol@microsoft.com. And you can also find samples for WCF and WF which have been updated to run on Beta 1: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=5aca0622-d87d-4cc9-a22c-0d58205a56b4
This looks like something that will really boost Silverlight adoption in the enterprise. As you may know I like functional software: good looking websites are great but I want them to actually do something. Until now it was pretty hard to create business websites in Silverlight, which was primarily created to provide a great user experience. Enter .NET Rich Internet Application Services: designed for business applications, to show, query and validate data and manage cross-cutting concerns such as security. Now you may find this screenshot a bit boring. But I actually like it: this is stuff we can use at projects. The experimental phase has passed and we can now do more than render fancy controls and animations… To start using .NET RIA Services you need the following software: Obviously you will also have to get the RIA Services installer and there also is a 116-page overview document available at that location. After you install the RIA Services, new items appear in your start menu: A walkthrough, API documentation and a link to that same overview document. The API documentation shows new namespaces available in RIA Services: - System.ComponentModel.DataAnnotations
- System.Web.DomainServices
- System.Web.DomainServices.LinqToEntities
- System.Web.DomainServices.LinqToSql
- System.Web.DomainServices.Tools
- System.Web.Ria
- System.Web.Ria.ApplicationServices
- System.Web.Ria.Data
- System.Windows.Controls
- System.Windows.Data
- System.Windows.Ria.ApplicationServices
- System.Windows.Ria.Data
If you are really interested, check out these presentations at MIX: Building Amazing Business Centric Applications with Microsoft Silverlight 3 Code and a running app are available here. Building Data-Driven Applications with Microsoft Silverlight and Microsoft ASP.NET
Recently Microsoft Patterns & Practices released an updated version of the Application Architecture Guide. This guide is an invaluable source of information for anyone creating .NET applications. If you are looking for ways to structure your application, for challenges of specific application types or for non-functional requirements, you should read this document. Below is a fragment of the introduction: “The purpose of the Application Architecture Guide 2.0 is to improve your effectiveness when building applications on the Microsoft platform. The primary audience for this guide is solution architects and development leads. The guide provides design-level guidance for the architecture and design of applications built on the Microsoft .NET platform. It focuses on the most common types of applications and on partitioning application functionality into layers, components, and services, and also walks through their key design characteristics.” The document consists of 387 pages, which may seem big. If there is just one thing you should take away from the guide, I would say it is the following diagram. It is the reference architecture of a general application that has layers for presentation, services, business and data logic. It also connects to data sources and other services and has cross-cutting concerns like security and operations. Immediately after the guide appeared Clemens wrote a great post about AppArch guide 2.0 and Visual Studio 2010. Since I realized that most are now working in Visual Studio 2008, I thought I would create some visuals in the current technology. So to start I created a new solution and added an Application Diagram that would contain all elements. Normally when designing top-down you create a conceptual design, which you can also do by adding a System Diagram as the conceptual design and for each of the elements on your conceptual design add other System Diagrams. The below image is what you end up with: A diagram in Visual Studio that contains all your layers of the above reference architecture. In each of the system diagrams that represent the layers you can now add components from the reference architecture. For instance add service interfaces and message types to the services layer. For the presentation it could look like this. Normally you can not add Class Libraries to diagrams. To be able to use the red shape, you can use power tools for VSTS Architecture Edition, which were developed for Beta2 but they work fine in Visual Studio 2008 RTM and SP1. When you are done your application diagram will look similar to this. I think this approach is great to create levels of abstraction: The diagram containing the layers describes how you separate layers and the application diagram shows the actual projects. When you right-click on the application diagram you can select “implement all applications”, which will generate projects and references for all items in the diagram. Your solution is now almost done. The one thing missing compared to the reference architecture is the cross-cutting concerns, for which you can use Enterprise Library. Enterprise Library is a great framework that takes care of plumbing for caching, data access, etc. Just add EntLib, or your preferred framework, to your solution and you are ready to go. Remember, if you have any questions, check out the AppArch guide and the knowledge base.
Last week I presented at an internal event and at the SDN Event. Both presentations were on Live Mesh. I have been a fan since I saw a video on Channel 9. It showed synchronization that made me think of Groove, where Live Mesh has a programmable object model. Little did we know about Live Mesh being a part of the Windows Azure framework. So when I went to the Professional Developer Conference in October, I was very anxious to see Live Mesh sessions. Ori Amiga the PM of Live Mesh did some great sessions. He also created a few movies on Channel 9, one of which is awesome showing his car that is part of the mesh. In short Windows Azure is Microsoft's operating system for the cloud on which there is functionality for developing applications in .NET that store data in a database. .NET Services consist of Access Control, service bus and workflow. SQL Services have functionality for relational data and other BI functionality is coming. Third there are Live Services, providing familiar services that you've known from the upgraded Windows Live family such as Mail, Calendar, Contacts, Search, Earth, etc. Live Mesh is a great sample application that demonstrates the use of services and storage in the cloud and also provides great consumer functionality. You start by installing the client on your PC and that automatically adds the device to your mesh. There also is an installer for Windows Mobile, that adds limited Mesh functionality to your device. OK, so you have installed the client on your devices. Now you can explore your Mesh both online and through the client. They both show shared folders, your devices and news that informs about file and user changes. You can invite other users to share those files. The folders are not only synchronized over your devices, but also in the cloud. By default you get 5GB of storage. The good thing about your files in the cloud is that it is stored outside of your devices, and also that you can access your files in your online desktop. Enough text for now, just have a look and try it. If you want to create applications that take advantage of your Live Mesh, you can get access to the Live Mesh for developers.
Last month was the SAF2008 in San Francisco, CA. They have had some impressive speakers (Simon Guest, Jack Greenfield, ...) and topics (Delivering Architectural Guidance, Growing Architect Communities, ...).  What strikes me most is the focus on the cloud platform in a very business functional way. The presentation on Multi-Enterprise Business Applications is a great example of that, where you see a story you realize straight-away and just a few slides later you see where the internet service bus comes in. The good thing the MEBA sessions also notices is that ISB is just in its early stages. There are services to be added to create manageable and trustable processes in the cloud, which are described as "Higher Level Services" taking care of - Party Management
- Service Choreography
- Business Process
- Community Management
Great stuff that gets me thinking... The slides are available on the new Architect Center. http://architect-center.com/groups/saf/media/default.aspx Last year's content seems to be still available (including recordings) http://msdn.microsoft.com/en-us/architecture/bb267380.aspx
It must be hard to be a developer and not having heard about the Professional Developer Conference in Los Angeles. Yesterday and today were amazing and a lot of interesting stuff was announced and demonstrated: Windows Azure - the operating system in the cloud. I like the links Steve Clayton has gathered http://blogs.msdn.com/stevecla01/archive/2008/10/28/an-azure-grab-bag.aspx Live Mesh - a part of live services that can be used to store data and contacts in the cloud and to share them amongst your devices. https://developer.mesh-ctp.com/Welcome/default.aspx Office Web Applications - Your favorite application web-enabled http://blogs.msdn.com/mikewalker/archive/2008/10/28/office-web-applications.aspx And lots of more stuff like mounting .vhd files in Windows 7, creating great reports in VSTS2010, creating textual DSLs in Oslo, etc. If I would have to summarize it, it would be the photo below which I took during yesterday's keynote. This image underlines the Microsoft message of Software + Services again: You can choose whether you want your app (or parts of it) in the cloud or not. 
Now that you have installed Enterprise Library 4.0 and the source you are ready to play with EntLib to get to know the application blocks and corresponding configuration. Let's start by creating a console application: Start Visual Studio 2008, click File | New Project, select C# console application, enter a name and click OK. Your first step is to add references to the EntLib dlls. Right-click References, select Add Reference and select the following files: - Enterprise Library Data Access Application Block (Microsoft.Practices.EnterpriseLibrary.Data.dll)
- Enterprise Library Exception Handling Application Block (Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll)
- Enterprise Library Logging Application Block (Microsoft.Practices.EnterpriseLibrary.Logging.dll)
- Enterprise Library Shared Library (Microsoft.Practices.EnterpriseLibrary.Common.dll)
Add the following using statements to the top of your program.cs. using System.Data;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;
using Microsoft.Practices.EnterpriseLibrary.Logging;
First we are going to get data from a database. To do this, we need a database to get data from. In this scenario I am using the Northwind sample database. We like to perform data access using stored procedures and for that I created the following procedure: USE [Northwind]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SelectCustomers]
AS
SELECT Customers.CustomerID, Customers.CompanyName, Customers.City
FROM Customers
Next go back to your program.cs and in your main method enter: Database database = DatabaseFactory.CreateDatabase("Northwind");
DataSet ds = database.ExecuteDataSet("SelectCustomers");
What you just did is create a new database object through a database factory and a create database method that takes the configured connectionstring as parameter.
To actually see the data, you can add the following: int i = ds.Tables[0].Rows.Count;
foreach (DataRow dr in ds.Tables[0].Rows)
{
Console.WriteLine(dr[1].ToString() + " - " + dr[2].ToString());
}
Console.ReadLine();
All you have to do now is create a configure Enterprise Library so that it knows where to find the Northwind database and how to access it. Add an app.config file to your solution and open it either by double clicking it or by opening it in the EntLib Configuration Editor.
If you only see an Enterprise Library Configuration node, right-click it and select New Application. On the application right-click and select New | Data Access Application Block. Expand the Data Access Application Block node, right-click the Connection Strings node and select New Connection String. Rename the new connection string to Northwind, which you used in code, and enter the following ConnectionString: Database=Northwind;Server=(local)\SQLEXPRESS;Integrated Security=SSPI. This string assumes that your database is called Northwind, you are using a local version of SQL Express and you connect to it using integrated security. Accept the default ProviderName and save the configuration.
Now in Visual Studio you can press F5 to run the application and see the result.
To summarize you have created a console application that references Enterprise Library, uses configurable settings to connect to the database and performs data access in just 2 lines of code.
Next we will add code to handle exceptions and to log them.
In the last post I showed how to install Enterprise Library. Now let's see what the installation results are. The installation folder (Default = C:\Program Files\Microsoft Enterprise Library 4.0 - May 2008) contains the following folders: - Bin - contains the binaries you can use in your application. This folder also contains the configuration editor EntLibConfig.exe, which you can use to create and edit configuration files for Enterprise Library.
- Docs - contains the files for Visual Studio help.
- Src - contains the installer file for the Enterprise Library source files.
- Visual Studio Integration - contains binaries that make the configuration editor available in Visual Studio.
If you want to start building application using EntLib, you can add the approriate files from the bin folder to your application. Let's see what is in the EntLib source. Double-click the msi, click next to install the source for both the application blocks as well as the quickstarts. This results in: - bin - contains the same as the bin folder above
- Blocks - contains a solution that houses all 42 Enterprise Library projects, see image below. There is also a second solution that additionally contains unit test projects and the actual unit tests to verify correct working of Enterprise Library as you change it. This is a great value that allows you to feel comfortable editing this pile of code while being able to prove you have not broken anything.
- Lib - contains object builder and unity binaries that you can use in your application independent of EntLib.
- Quick Starts - contains sample code in both C# and VB.NET that you can use to see available functionality of EntLib and how to use it in your own applications.
- Scripts - contains batch files to amongst others compile EntLib from the source, register assemblies and to install Northwind database for the quick starts.
Following the talk I did at SDC recently I thought about blogging about Enterprise Library. A bit of history Microsoft created a team called "Patterns & Practices" to help adoption of .NET in the developer community. This team did great early work on how to create secure, performing, n-tier applications. This work was mostly done on paper, whitepapers and downloadable pdf files, but nothing in code. So the P&P team started building a set of components, called application blocks, to perform data access incorporating Microsoft best practices. Next to the data access there were application blocks for exception handling, logging, user interface navigation, etc. These blocks would handle common application plumbing, allowing developers to focus on business functionality. Avanade noticed the work Microsoft Patterns & Practices were doing in this field and heard feedback from the field that the blocks should be more uniformly and easier to use. Then Avanade created the first version of Avanade Connected Architectures (ACA), which was a very early version of Enterprise Library. Later Microsoft used ACA to create Enterprise Library themselves since they created the blocks in the first place. Back to present In May 2008 version 4 of Enterprise Library was released, containing many more features and advancements since the original application blocks were first bound together. EntLib adoption is very high in the community, especially when you see these numbers. Anyway, let's get started finding Enterprise Library on the web. Downloading When you want to get started using Enterprise Library, first you need to download the latest version or the one that matches your application version. In this post I am assuming that you are working with .NET Framework 3.5 and Visual Studio 2008. Click on the image below and you'll be redirected to the actual download page at microsoft.com. After registering you can download the msi. If you are running Windows Vista or Windows Server 2008 and have UAC enabled, you want to start the msi file through a command prompt that is running as administrator and enter: msiexec -i "Enterprise Library 4.0 - May 2008.msi". Click Next, accept the license agreement, click next and another next. After selecting the options (All) and install location (default) click next and then install. Enterprise Library will be installed on your machine. When the installation is finished it will prompt to ask if you want to install the source of Enterprise Library. You can uncheck the box and do that later (the source installer is located in [install location]\src). Congratulations! You have just installed 9 application blocks that will make your life as a developer easier and save you a lot of time developing and testing "boring" plumbing code. Downloads Enterprise Library 4.0 – May 2008 (for .NET Framework 3.5 and Visual Studio 2008) Discussion forum Discussions for patterns & practices – Enterprise Library Community patterns & practices community site Community Extensions Enterprise Library Contrib License Microsoft Public License (Ms-PL)
Wow, that were two impressive days. There are so many ways that partners are extending Visual Studio, it is really inspiring. My presentation was one of two about how to Extend TFS. The conference ended by a bunch of partners getting 4 minutes each to present their solution: T4 Editors, testing and performance tools, game factories, controls, etc. Are you interesting in VSX, check out this site and this book, that was handed out at the conference. 
Today is the first day of the the Visual Studio Extensibility Developer Conference, about which I wrote some time ago. There are some great sessions about Visual Studio, Shell, DSLs and VSTS, most of which are focused on product developers. This morning Rico Mariano, the Visual Studio Chief Architect, presented the kick off and talked about his pillars for the next Visual Studio versions. While Dev10 is underway, long term planning for Dev11 and Dev12 has already started. In general he said the teams will focus on Visual Studio being extensible (very relevant to this audience), scalable (Rico is a performance guy), modern, connected and frugal. The message was presented with some great anecdotes on the side from his years of experience on related teams since late 80s. Each next version of Visual Studio should also be good looking, focused on a certain group of end users and obviously support the latest hardware and software. Good stuff! Session decks are posted here
Last saturday the Dutch code camp was organized by three user groups. There was a good crowd and especially the number of MVPs was impressive. My talk was on Modeling In VSTS Rosario. I demonstrated the publicly available Rosario CTP12 VPC in which you can see the new Architecture Explorer and UML diagrams. We had good discussions about why things are implemented in a certain way and good feedback that will go back to the VSTS product teams through our regular Rosario TAP calls. I asked the organization for a code camp logo to show on blogs, etc. The below image is great, except that our code camp was in the MIC in Barneveld and luckily no real camping was involved... 
In three weeks the first-ever public VSX Developer Conference will kick off. At the moment I am preparing my talk on TFS extensibility, primarily focused on partners who are creating marketable additions for TFS. If you want to attend, you still can: The fee is only $100... .jpg) There is a lot of stuff to tell and to demonstrate and so little time. The release of Service Pack 1 and the corresponding SDK have brought plenty interesting stuff: VSExtensibilitySample: This new TFS sample provides an example of creating a Visual Studio add-in that interacts with the Version Control user interface of Team Explorer. The sample comes with a detailed Word doc that provides insight into the requirements of such an add-in. RichClientCustomControl: This new TFS sample provides an example of creating Work Item Tracking custom controls that work within Team Explorer. The sample comes with a detailed Word doc that provides insight into the requirements of custom controls as well as a separate document that describes how to write custom controls that can be used within the Team Server Web Access environment.
How often do you search your development machine for code you developed before? Very often, right? And how often do you look for code on the web? Also very often, I assume. Search in Vista (or Windows Server 2008) are very powerful and so are the known search engines on the web. So what if you wanted code that other people in your organisation created? That is where you can use Microsoft Search Server!  Search Server is based on Windows Sharepoint Services 3.0 and has very simple yet powerful additions to search various content sources such as websites and file shares. To get started with searching the source code in your Team Foundation Server: - Install Search Server
- Create a file share on a server
- Get the latest version of your TFS version control to the file share
- In Search Server Central Administration create a new content source and point it to the file share
- Add new file types, of files you want to search such as .cs, to the content index
- Start a full crawl on the content source
Now you are ready to go: Open the search page and enter something to search for such as "Page_Load". On the result page you will get links to the files in which your search string was found. Nice, right? So next there can be loads of additions: You can create an integrated search within Visual Studio, apply effective TFS permissions, make search results open in Visual Studio, etc.
Surely you have heard of Enterprise Library: The bundled Microsoft application blocks redelivered in a set of reusable components to help development teams focus on business functionality instead of low level technical plumbing such as data access, logging, etc. Consistency, extensibility, ease of use and integration have been goals from the start and it is being improved in every release. If you are not using it on your current solution you probably have a good reason not to. It is easy to start working with Enterprise Library since the download contains a lot: 1. Binaries, which you can use in your application, and the configuration editor, which enables you to configure settings for each application block in a graphical user interface. 2. Very useful documentation available through Visual Studio help containing background info on EntLib, how to get started, how to develop with EntLib, its design and detailed descriptions of each block. 3. Source that you can optionally install. If you do, you get source code of all (42) EntLib projects and quickstarts for each application block. Before, you could get Entlib 3.1 to work with Visual Studio 2008, but that took some effort. Installing it and then making it appear in VS was not straightforward. Now the waiting is over: Enterprise Library 4 can easily be used in Visual Studio 2008 and .NET Framework 3.5. http://msdn.microsoft.com/en-us/library/cc512464.aspx Also EntLib got better performance, WMI 2.0 support and a few minor fixes. But wait, that is not all.... The new kid in town is Unity Application Block! Unity is a lightweight dependency injection container, which facilitates loosely coupled object development and creation and extensible caching. http://msdn.microsoft.com/nl-nl/library/cc468366(en-us).aspx It can be used standalone too in Visual Studio 2005 and 2008. The Stoplight and EventBroker quickstarts give a good overview of the possibilities of Unity. Once you get to know the Dependency Injection and Inversion of Control are very powerful patterns, nicely described here Inversion of Control Containers and the Dependency Injection pattern. .png)
Today I was representing a colleague at the jury of the Dutch Imagine Cup semi finals, that consisted of people from Microsoft, Achmea, Delft University and Avanade. We had great fun. Last year I was coaching team Celsus of the University of Utrecht that ended up second in the national finals. Every time I see these students work on latest Microsoft technologies and the assignments I am amazed by the creativity. From all kinds of footprints, dashboards, XNA and board games, these guys had all kinds of great ideas. Obviously some polishing is still needed: only a few teams were actually balanced in terms of technology, business/marketing, realism, presentation, etc. Sustainability is a serious subject and it was good to see the nine teams had invested serious time.

Last year's national winners and international semi finalists from Delft University were sharing their experience too, that created a cross-language playing applications including international memory and a chat module with icons as a form of sign language.

Obviously we are very much looking forward to the national finals, which will be at 28 may. Hopefully the teams will have more surprises in store.
|