Back in July, I posted about the documentation shipped with the first release of the Composite Application Guidance for WPF (aka Prism). Some months ago, the docs have been presented in book format:


(more details | PDF version)

Recently, I have been notified that the Japanese version is also available:

This is great news - way to go patterns & practices team!

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!

Prism Team

April 28th, 2008

Want to see how we work at Prism? Don’t miss this great post from Glenn. He describes the team, how we work, what being at the team room feels, and he also shows pictures of the (distributed) team and includes videos that show how we do iteration planning.

Prism Team 1_2 Prism Team 2_4
Prism Team 3_4

The Prism team.
1st picture: Redmond, WA, USA. 2nd picture: Buenos Aires, Argentina. 3rd picture: India

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! :)