CAB posts for the spanish community
October 11th, 2007
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!):
- Introducción a Composite UI Application Block (CAB) I (Intro to CAB)
- Introducción a Composite UI Application Block (CAB) II (Intro to CAB applications initialization)
- Introducción a Composite UI Application Block (CAB) III - (Intro to Modules)
- Introducción a Composite UI Application Block (CAB) IV - (Intro to MVP pattern)
- Introducción a Composite UI Application Block (CAB) V - UI Extension Sites (Intro to UI Extension sites)
Feedback on SC-SF Hands On Labs
September 6th, 2007
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!
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 |
|
| Lab 2: Creating a Business Module |
|
| Lab 3: Creating a View |
|
| Lab 4: Creating a Service |
|
| Lab 5: Creating a Foundational Module |
|
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.
WCSF/SCSF Hands On Labs Under Construction…
July 7th, 2007
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.
Smart Client Software Factory v2 shipped!
May 19th, 2007
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:
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.
As soon as you go online, the restaurants list will be loaded and the connectivity status indicator will be updated:
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:
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:
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:
What can I do next?
Download the factory and start playing with it!
Guidance Package changes in Smart Client Software Factory
March 23rd, 2007
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:
Moving to Smart Client Software Factory
February 27th, 2007
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
Web Service Software Factory - December 2006 version released
January 10th, 2007
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.
Strategic Architect Forum @ redmond - Picture with Bill Gates :)
December 5th, 2006
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:
From left to right: Matias Woloski (Southworks), Bill Gates, Eric Rudder (Senior VP of Microsoft Technical Strategy, in the back) and me.
Eric Rudder and Bill Gates on the Q&A session they gave on Friday.
Me at the "Software Factories in the Real World" session where Wojtek Kozaczynski presented the Smart Client Software Factory.
Johnny Halife (Southworks) @ SAF
[InheritState] attribute working in SC-SF based applications
October 11th, 2006
Back in February, I wrote a couple of articles showing how to automatically inject the State of a WorkItem to a child WorkItem, by applying a custom [InheritState] attribute to the child WorkItem (see CAB: Injecting State into Child Work Items and CAB: Injecting State into Child Work Items through Custom Attribute).
Fortunately, I have received very good feedback about it and heard from a lot of people who used it successfully. But I also received some comments saying that the [InheritState] attribute doesn’t work when developing a SC-SF based application. The fact is that in SC-SF based applications typically you have a ControlledWorkItem that is controlled by a WorkItemController-derived class. To implement a new type of WorkItem, you don’t extend the WorkItem class anymore – you derive from WorkItemController. These classes, ControlledWorkItem and WorkItemController, where introduced in SC-SF to separate the containment functionality from the business logic to fulfill a use case (respectively).
The reason why the [InheritState] attribute doesn’t work with this approach is that it was designed to work with classes that extend the WorkItem class, not the WorkItemController class. So, finally, after a long time (sorry guys, I’ve been really busy these months…), I updated the ObjectBuilder strategy that injects the State to make it work with classes that derive from the WorkItemController class instead of the WorkItem class.
The only problem I found when updating the strategy, is that I can’t access the value of the ID parameter you pass when calling the WorkItems.AddNew(string ID) method. I need to access that parameter to keep the functionality of the [InheritState] attribute which allows you to specify that you want to set the ID of the child WorkItem to the ID you pass to the WorkItems.AddNew(string id) method. If you like this functionality and still need to use it, read at the end of the post – I’ve found a workaround for that.
This is how you should use the [InheritState] attribute now:
- Inheriting all state objects:
// In the WorkItemController of the child WorkItem
[InheritState]
public class ChildWorkItemController : WorkItemController
{
// …
} - Inheriting only some state objects:
// In the WorkItemController of the child WorkItem
[InheritState("Customer", "Account")]
public class ChildWorkItemController : WorkItemController
{
// …
} - Inheriting only some state objects and setting the workitem ID to the id parameter of the WorkItems.AddNew(string ID) method (read at the end of the post to make this work):
// In the WorkItemController of the child WorkItem
[InheritState(true, "Customer", "Account")]
public class ChildWorkItemController : WorkItemController
{
// …
}// In the parent WorkItemController
ControlledWorkItem<ChildWorkItemController> child = WorkItem.WorkItems.AddNew<ControlledWorkItem<ChildWorkItemController>>(“CustomerView#1″);
Instructions:
- Download the file CompositeUIExtensions.State.zip.
- Extract the solution to a [folder] and build it. If you experience problems, check that the references to CAB assemblies are correct.
- In your solution, add a reference to the assembly CompositeUIExtensions.State.dll (located in [folder]\bin\Debug\) in the projects where you will use the attribute.
- Open the WorkItemController classes you want them to have the state inherited for the controlled WorkItem. Include the following using statement:
using CompositeUIExtensions.State;
- Then, add the attribute [InheritState] to the class. The parameters supported are:
- (optional) SetWorkItemID: Indicates whether the ID of the work item should be set to the id parameter of the WorkItems.AddNew(string id) method. The default value is false.
- (optional) Keys: Keys of the state objects to be copied. If ommited, all state objects will be copied.
- In your shell application (typically ShellApplication) override the AddBuilderStrategies method and insert the following code:
protected override void AddBuilderStrategies(Microsoft.Practices.ObjectBuilder.Builder builder)
{
base.AddBuilderStrategies(builder);
builder.Strategies.AddNew(Microsoft.Practices.ObjectBuilder.BuilderStage.Initialization);
} - From now on, when you create a child work item with the WorkItems.AddNew(string id) method you will have the state objects inherited automatically from the parent. Enjoy!
Note: If you want to have the ID of the child WorkItem set to the ID you pass to the WorkItems.AddNew(string ID) method, you have to update the ControlledWorkItem class located in the Infrastructure.Interface project. To do this, open the class source code and locate the following line inside the OnBuiltUp method:
_controller = Items.AddNew();
Replace it with the following:
_controller = Items.AddNew(id);
Please note that this will make the ID of the WorkItem be the same as the ID that uniquely identifies your WorkItemController in the Items collection. Anyway, this should not cause you any trouble.
Important: The code available for download is provided “as is” with no warranties of any kind.
