Published by ejadib on August 22, 2008
under CAB, CWPF, Composite Application Block, Composite Application Guidance for WPF, Composite Application Library, Composite WPF, Patterns & Practices, Prism, SCSF, WPF, WPF Composite Client, Windows Presentation Foundation
As Diego Poza announced in his post, we have just published a new guidance to help CAB developers familiarize themselves with the Composite Application Guidance by comparing the main components of both libraries.
Let’s take a look at the guidance content index:
Because the Composite UI Application Block and the Composite Application Guidance are targeted to build composite applications, they have similar core concepts. These core concepts have different implementations. The following figure compares the implementation of the core concepts.
Want more?
Download the Composite Application Guidance for Composite UI Application Block Developers from Codeplex.
Feedback
We really want your feedback on this guidance, so feel free to give us your feedback on the discussion board.
Enjoy!
Published by ejadib on April 26, 2008
under .NET Framework 3.5, GAT, GAX, Orcas, Patterns & Practices, SCSF, Smart Client Software Factory, Visual Studio 2008
After publishing an alpha version, a beta version and a RC 1 version I’m glad to announce that the final version of Smart Client Software Factory for Visual Studio 2008 has been published on MSDN.
What is new in this release?
How to enable a May 2007 solution
If you have a May 2007 solution and you want to enable it to use this new guidance please read this page.
Known Issues
In this page you will find the list of known issues that exists in Smart Client Software Factory - April 2008.
Downloads
Smart Client Software Factory - April 2008
Smart Client Software Factory Source Code - April 2008
Smart Client Software Factory Documentation - April 2008 (CHM format)
Documentation
Documentation on MSDN (HTML format)
Feedback
Feel free to give us your feedback on the discussion board. If you see issues, please post them to the Issue Tracker.
More Information of this release
For more information about this new release please read Blaine’s post and Michael’s post.
Enjoy this new guidance.
Published by ejadib on April 12, 2008
under Architecture, C#, CWPF, Composite WPF, OOP, Object Oriented Programming, Patterns & Practices, Prism, SCSF, Southies, TDD, Test Driven Development, VMware, Virtualization, WPF, WPF Composite Client, Web Client Software Factory, Windows Presentation Foundation, openSUSE
Smart Client Software Factory / Web Client Software Factory / Prism / p&p Documentation Tools
C#
TDD
IT / VMware / openSUSE
Object Oriented Programming
Architecture
New Southies
Published by ejadib on April 11, 2008
under GAT, GAX, Orcas, Patterns & Practices, SCSF, Smart Client Software Factory, Visual Studio 2008
Some time ago, I wrote a post about How to update the installer to run Smart Client Software Factory in Visual Studio 2008 Beta 2.
Now I’m proud to announce that we shipped an Alpha version of Smart Client Software Factory for Visual Studio 2008. As Blaine announced before, in order to run this new release you will require an upgrade of GAX/GAT to the February 2008 release.
For more information about this new release you can read the following posts:
Note: This is not the final release and still has known bugs. Use at your own risk
Download SCSF April 2008 Alpha Release and give us your feedback on the discussion board.
Published by ejadib on March 6, 2008
under Patterns & Practices, SCSF, SCSF Contrib, Smart Client Software Factory, Smart Client Software Factory Contrib
We have just published a new SCSF sample application on the Smart Client Contrib project. We have published also a demo script that provides step-by-step instructions to create a SCSF application. The goal of this demo script is to help presenters give a presentation that illustrates the main aspects of SCSF such as WorkItems, Commands, EventBroker, Services, Workspaces and the Dependency Injection pattern.
The application consists of two Business Modules:
- Notifications module: this module populates the Main Menu Strip of the Shell with two items and adds them as invokers of the DumpWorkItem and ShowNews commands respectively. It also adds two views to the Shell.
- Stocks module: this module shows BuyStock and Reports SmartParts in the the Shell.
The Shell is made up of two Workspaces: an OutlookBarWorkspace (the one in the right) and a DockPanelWorkspace (the one in the left). These workspaces are in the SCSF contrib project too.
Enjoy this new sample.
Download
Published by ejadib on June 21, 2007
under Acropolis, SCSF, Smart Client Software Factory
Published by ejadib on June 7, 2007
under Acropolis, SCSF, Smart Client Software Factory
In this post I will show you how to create a simple Hello World Sample using Acropolis.
Acropolis is a set of components and tools that make it easier for developers to build and manage modular, business focused, client .NET applications, For more info, see Johnny’s post.
In order to do this sample, you will need to install the following components:
Let’s go!.
- Create a new Acropolis WPF Application. Name it AcropolisHelloWorld.
- After creating the solution you will see the Acropolis Application Wizard. This wizard lets you choose the theme, the navigation style and the layout of the application. Navigate through the wizard, without changing the default values. Click on Finish to continue.
- Now that you have created the solution, we will add an Acropolis Part and View. Right click over the project | New Item | Acropolis Part and View (WPF). Name it HelloWorldPart.xaml
An "Acropolis" part is a coarse-grained piece of business logic that typically contains more functionality than a control, but less than an entire application. A part is different than a control because it contains only business logic and no user interface code. However, a part does have a user interface associated with it. The user interface portion of a part is called a part view or just view.
- We are going to add a command to the HelloWorldPart. Open it and double click over the ComponentCommand of the Acropolis Framework tab of the ToolBox.
The ComponentCommand is a connection point that enables parts or external entities to execute some piece of functionality inside a part.
- If you follow all the steps, you are going to see this:
- Rename the command to ShowMessageCommand. Add the CommandExecuted attribute with OnShowMessage as value.
- Open HelloWorldPart.cs (the HelloWorldPart.xaml code-behind) and copy the following code:
- Open Application.xaml. In the User Components (Acropolis) tab, you will see your part, double click to add it as a child part.

- Build and run the solution. Click on the triangle to see the list of commands. Select ShowMessageCommand and enjoy!
In the second part, we are going to learn how to retrieve the Hello World message from a service.
Source code
- You can get the source code of the Hello World sample by downloading the AcropolisHelloWorld.zip file below.
- Important: The code is provided "as is" without warranty of any kind.
Attachment: AcropolisHelloWorld.zip
Published by ejadib on May 21, 2007
under Patterns & Practices, SCSF, Smart Client Software Factory
As you may know the version 2.0 of SCSF was shipped this weekend, so one of the main questions is how to get the existing SCSF June 2006 solutions running with this new version.
In order to do this, you have to follow this steps:
- Uninstall SCSF June 2006, because basically SCSF May 2007 is a replacement. SCSF May 2007 does not work side-by-side with SCSF June 2006. Don’t worry if you forget this step, because a nice warning window will advise you
- Uninstall GAT and GAX in order to install the February 2007 CTP.
Note: In order to unistall GAX, ensure you don’t have any package registered, otherwise the uninstallation will fail:
- (Optional) Read Tom Hollander’s post, to know how to get all the factories running with this new version of GAX/GAT.
- Install SCSF May 2007. Check dependencies before install it to make sure you have all the prerequisites installed.
- Copy the following assemblies from the Lib folder of the SCSF installation directory (%programfiles%\Microsoft Smart Client Factory\Lib\) to the Lib folder of your solution:
- Microsoft.Practices.CompositeUI.dll
- Microsoft.Practices.CompositeUI.WinForms.dll
- Microsoft.Practices.CompositeUI.WPF.dll
- Microsoft.Practices.EnterpriseLibary.Common.dll
- Microsoft.Practices.EnterpriseLibary.Data.dll
- Microsoft.Practices.EnterpriseLibary.Data.SqlCe.dll
- Microsoft.Practices.EnterpriseLibary.ExceptionHandling.dll
- Microsoft.Practices.EnterpriseLibary.ExceptionHandling.Logging.dll
- Microsoft.Practices.EnterpriseLibary.Logging.dll
- Microsoft.Practices.ObjectBuilder.dll
- Microsoft.Practices.SmartClient.ConnectionMonitor.dll
- Microsoft.Practices.SmartClient.DisconnectedAgent.dll
- Microsoft.Practices.SmartClient.EndpointCatalog.dll
- Microsoft.Practices.SmartClient.EnterpriseLibrary.dll
- Open the solution in Visual Studio. If you have the June 2006 guidance package enabled in the solution, a dialog box appears that asks if you want to remove it. Click Yes to remove it.
- On the Tools menu, click Guidance Package Manager. The Guidance Package Manager window will appear.
- Click Enable / Disable Packages.
- From the list of packages, select Smart Client Development May 2007, and then click OK. The Guidance Package Manager will enable the guidance package.
- Click Close to close the Guidance Package Manager.
Enjoy the new version, and if you have any doubt please visit the SCSF Forum to get all the answers.
Published by ejadib on March 14, 2007
under Patterns & Practices, SCSF, Smart Client Software Factory
In this post I will try to sketch an explanation about different ways of registering and retrieving services in SCSF / CAB.

How To: Registering Services
We have two ways of implementing the service registration.
-
Using the [Service] attribute
This attribute indicates that a class should be automatically registered as a service into the application's root WorkItem
Usage:
public interface IMyService
{
int GetSomeData();
}
[Service(
typeof(IMyService))]
public class MyService : IMyService
{
public int GetSomeData()
{
return 1;
}
}
With this code CAB creates an instance of this class and registers it as service during application startup. The constructor parameter tells CAB the interface key to use for the registration of the service (for location purposes).
Using WorkItem.Services.Add()
If you want to register a service programmatically, you have to call the Add or the AddNew method of the services collection of the WorkItem within you want to use the service.
Usage:
RootWorkItem.Services.Add(myServiceInstance);
RootWorkItem.Services.AddNew();
RootWorkItem.Services.AddNew();
How To: Retrieving Services
Now that we have registered our services, we will want to know how to retrieve them. Let's see the two ways of doing that.
-
Using the [ServiceDependency] attribute
This attribute indicates that property or parameter is a dependency on a service and should be injected when the object is added to a WorkItem.
Usage:
private IMyService myService;
[ServiceDependency]
public IMyService MyService
{
set { myService = value; }
}
With this code, we are telling CAB that we are having a dependency on the IMyService that has already been created and is available to use. For this purpose CAB uses Inversion of Control (IOC) / Dependency Injection (DI).
So when the object is added to the Workitem, the property will be automagically injected with the correct service instance.
- Using WorkItem.Services.Get()
This way is more “on-demand” than ServiceDependency.
Imagine that we have a second service AnotherService which implements IAnotherService interface and have the Service Attribute.
In our view, we are not going to have a property with the service, so we are not going to apply the ServiceDependency attribute.
Usage: (for example in a method)
public void MyMethod()
{
IAnotherService mySecondService = rootWorkItem.Services.Get();
// …
}
When you use the ServiceDependency attribute, CAB is calling Services.GET behind the scenes.
I hope people having doubts about services in SCSF/CAB find this post useful.