As you may already now, the Composite Application Guidance for WPF was released a few days ago. In this project I had the pleasure of working with the patterns & practices team, mainly as a technical writer. (I wrote a few lines of code too, but nothing compared to the huge job done by devs!)

Hands On Lab for free

One of the things I want to highlight is that, apart from having 300 printed pages (!), the documentation includes a Hands on Lab. What I like about Hands on Labs is that they provide a guided and integrated learning process through practical exercises surrounded by background technical content.

The Lab is quite hidden in the table of contents; you can find it under the node Composite Application Guidance for WPF Hands On Lab in the table of contents.ToC

Covered Topics

This lab covers the basic concepts of the Composite Application Guidance for WPF as you build a simple Hello World application. The following is a list of questions we tried to address:

  • What an application based on the Composite Application Library is
  • What are the Composite Application Library assemblies, what they contain
  • What is the Shell project and the Shell window
  • What is the Bootstrapper, and what is the UnityBootstrapper class and how it is used
  • What is a container and how it relates to the dependency injection pattern
  • What is a service
  • What is a region
  • What type of regions are supported out-of-the-box by the Composite Application Library
  • What is a module
  • What is the module initializer class
  • What folders a module typically contains
  • What are the different ways of loading modules
  • What is the StaticModuleEnumerator class and how it is used
  • What is a view
  • What is the Region manager and how to use it to add views and named views

Topics not Covered

To keep the Lab simple (and to ship on time!), we consciously kept some topics out of the Lab. However, you can find information about those topics across the documentation. The following list presents some of the topics not covered in the Lab and links to related resources:

Feedback Welcome

We didn’t include Hands On Labs in previous deliverables like the Smart Client Software Factory and the Web Client Software Factory, so we are experimenting a new approach here (we did released Hands on Lab as separate downloads some time after the official releases, though). I personally think that including a Hands On Lab within the initial package will help users with the learning process and adoption, but I’m excited about reading your comments.

Do you like the lab? Is it useful? Would you recommend it to your colleagues and/or customers? It is great to receive feedback like this, but negative feedback is welcome too!

In case you missed it, Mariano Converti has been blogging about the Composite UI Application Block and Smart Client Software Factory in spanish. It's good to hear that because there are very few people blogging in spanish about CAB and a lot of hispanic CAB users, so this is very valuable to the community.

Here is the list of posts that he has published so far (more to come for sure!):

We released a draft version of the hands on labs for Smart Client Software Factory almost a month ago, and we got over 1000 downloads. We will release the final version soon which will include, apart from the current labs, the following ones:

  • Adding offline capabilities to your solution through the Disconnected Service Agent Application Block
  • Using WPF views

This is a great opportunity for you to influence on the final version of the labs. Please let us know what you think about the draft release, by either leaving your comments in our blogs, contacting us directly or posting in our community site. The following questions might help you:

  • Suppose you are starting a project that uses SC-SF. Would you recommend your team members to read the labs?
  • Were the procedures clear enough?
  • Did you find the background information and content useful?
  • What topics need further explanation?

Thanks in advance; your feedback will help us improve the labs.

I'm happy to announce that we have published a draft version of the Hands On Labs for Smart Client Software Factory May 2007!

Download

The goal of these Hands on Labs is to provide developers with a step-by-step guidance to help them understand the core components of the factory and learn how to take advantage of them to develop smart client applications.

This set of labs is not just a minor update to the version published for the June 2006 version of the factory: we revised all the content, included additional background information, and demonstrated new features of the factory.

This release includes the following labs:

Lab Description
Lab 1: Creating the Initial Solution
  • Describes how to create a smart client solution using the factory, what their components are, and how to perform customizations to the Shell
  • Introduces the concept of Workspaces and UI Extension Sites
Lab 2: Creating a Business Module
  • Discusses about what business and foundational modules are and how they differ
  • Explains how to create a business module using the factory
  • Demonstrates how to expose a module in the Shell by using UI Extension Sites, Commands, and a custom base class for module controllers
  • Describes how modules are loaded and initialized by the Composite UI Application Block
Lab 3: Creating a View
  • Describes the concept of SmartParts and the Model-View-Presenter pattern
  • Explains how to create a view with presenter using the factory and how to fully implement a rich view that exposes information to workspaces using SmartPartInfo objects
Lab 4: Creating a Service
  • Introduces the concept of Composite UI Application Block (CAB) services and describes how to create, register, and consume services using the dependency injection pattern and test driven development (TDD)
  • Demonstrates how to create a service to wrap a Windows Communication Foundation (WCF) Web service and how to use the entity translator service to translate business/service entities
Lab 5: Creating a Foundational Module
  • Discusses what the components of a foundational module are and how you can use the factory to create one
  • Describes how you can customize the profile catalog to define module dependencies
  • Demonstrates how to create, register and consume a global Composite UI Application Block service

For the final release we plan to include these labs too (subject to change):

Lab Description
Lab 6: Adding Offline Capabilities This lab will demonstrate how to use the Disconnected Service Agent and Connection Monitor application blocks to invoke Web services from occasionally connected applications.
Lab 7: Using Windows Presentation Foundation (WPF) This lab will demonstrate how to enable your solution to use WPF SmartParts and how to create a WPF view.

Please feel free to provide feedback in our community site. We are still in development process so you have the chance to influence on the final release.

After we shipped the May 2007 release of the Smart Client Software Factory, I moved to the Web Client Software Factory team to work in the next version (in case you missed it, the second weekly drop is already available). Since then, I've been working on the Hands On Labs for both factories. I cannot give too much details about them yet, but I can give you some hints:

  • The WCSF Hands On Labs will be based on the ones that we presented in the workshop held in Redmond on March (which you can download from here). We've been working really hard to improve them taking into account the valuable feedback that we received from the attendees. The main complains I've heard are that the procedures were not detailed enough and that there was a lack of content in some parts (I remember an attendee saying “Please tell me what I just did!” :), thus we are spending a considerable amount of time on adding details and content to help users understand what they are doing, and why.
  • The SCSF Hands On Labs will be built upon the existing ones. They will be updated to work with the latest release of the factory, and we are planning to cover the new features such as the ability to host WPF smartparts and the offline capabilities provided by the Disconnected Service Agent / Connection Monitor / Endpoint Catalog application blocks.

Stay tuned, I'll be publishing more details as we go on with the labs.

Yes! We finally shipped it! It took us a little more time than what we expected but I’m very excited about the new features and capabilities we are providing to the community. This release provides (from Blaine’s announcement post):

  • Windows Presentation Foundation interoperability CAB extensions  and View with presenter recipe (don’t miss this post from Miguel Saez for more details)
  • Offline application blocks and recipes; the application blocks support asynchronous calls to WCF web services.
  • Richer ClickOnce Deployment capabilities
  • Enhanced guidance packages which includes code generation Visual Basic .NET 2005 (don’t miss this post from Juan Arguello for more details)
  • Improved installation with a new dependency checker

You can get it from the Microsoft Downloads Center.

One of the things we added at the very end of the project, is a QuickStart that demonstrates how to integrate the Disconnected Service Agent (DSA) and the Connection Monitor (CM) Application Blocks with a Composite UI Application Block application. Although we had to postpone a little bit the release date to include this QuickStart, we strongly believe that it will help you better understand how to consume these blocks from your smart client application.

The Offline Application Blocks demonstrated in the QuickStart

In just a few words (see the Help for detailed information), the Disconnected Service Agent Application Block allows you to invoke web services asynchronously from occasionally connected smart clients. This means that you can, for example, enqueue a request while the application is offline and have it automatically dispatched by the block when connectivity is detected. When the request is dispatched, a callback will be invoked for your application to process the response.

The Connection Monitor Application Block basically monitors connectivity status. As a developer, you can define what set of services you need to reach from your smart client application and the block will notify you whenever changes in the client’s computer affect the ability to reach those services.

Overview

The QuickStart basically shows a master-details view. The Shell form displays a list of restaurants in the left and their corresponding menu items in the right. To retrieve the data (restaurants and menu items lists), a WCF service is consumed:

DSA_CAB_QS_1

If you launch the QuickStart without having an Internet connection available, the application will enqueue the request that will retrieve the restaurants list, and will display an Offline status indicator.

DSA_CAB_QS_2

As soon as you go online, the restaurants list will be loaded and the connectivity status indicator will be updated:

CompositeUI Application Block with Disconnected Service Agent QuickStart

If you click a restaurant, you will see the menu items list loaded in the right. But if the Internet connection was dropped, you will see a message saying that you must be online to retrieve the menu items list:

DSA_CAB_QS_3

Now suppose you go online again, but the web service now is failing or has been shut down (you can close the WCF host to test this scenario). The application will handle the error and ask the user to try again later:

DSA_CAB_QS_4

Retrieving data from a remote service is an expensive task and might take a while. Therefore the QuickStart displays a progress bar when a call to a the web service is performed:

DSA_CAB_QS_5

What can I do next?

Download the factory and start playing with it! :)

If you want to know the internals of the guidance package that will be shipped in SC-SF v2, don’t miss this post from Juan Arguello:

Smart Client Guidance development

I’m proud to announce that I’ll be part of the team that is in charge of delivering the v2 of the Smart Client Software Factory, which will include new functionality, a lot of updates and a number of usability fixes. I’ve worked with most of the guys in the team in the first version of the factory and also in the development of the Web Client Software Factory, so I’m sure we’ll have a wonderful experience as we had in the past.

One of the members of the team is Blaine Wastell, project manager. He has just started his blog and has posted a lot of cool stuff. Keep an eye on it because he’ll be posting frequently to let you know about the state of our iterations and the project’s progress.

We have just had our first drop, which you can get it from Codeplex site.

See the plan for Smart Client Software Factory v2 in Blaine’s blog: Plan for Smart Client Software Factory April Update

The team that was next to our workspace when I was in Redmond, has published the December 2006 release. For those who don’t know what it is:

The Web Service Software Factory (also known as the Service Factory) is an integrated collection of tools, patterns, source code and prescriptive guidance. It is designed to help you quickly and consistently construct Web services that adhere to well known architecture and design patterns.

More information and download, see Web Service Software Factory.

I had the pleasure of assisting to the Strategic Architect Forum (aka SAF) that took place in Microsoft Campus at Redmond last week. Here are some pictures:

billg-mawolo-szklanny

From left to right: Matias Woloski (Southworks), Bill Gates, Eric Rudder (Senior VP of Microsoft Technical Strategy, in the back) and me.

eric and bill

Eric Rudder and Bill Gates on the Q&A session they gave on Friday.

387x180.aspx

Me at the "Software Factories in the Real World" session where Wojtek Kozaczynski presented the Smart Client Software Factory.

johhny at saf

Johnny Halife (Southworks) @ SAF