Prism 2.0 first drop on Codeplex

We just finished our first drop for Composite Application Guidance for WPF and Silverlight (code named Prism 2.0) and posted it on Codeplex. As previously announced, we are continuing to enhance Prism to support Multi-targeted applications for Silverlight and WPF. Additionally we plan to create guidance for composite Silverlight applications. So go checkout the latest drop and give us your feedback.

The first drop focuses on multi-targeting. We provided a Multi-target QuickStart and a Project Linker Tool that allows you to link Silverlight and WPF projects. We are following our normal strategy of building the code first and then looking at what is needed for tooling. In this case we created the Multi-Targeting QuickStart and then created the project linker tool to support multi-targeting. We will continue to make changes to the tooling as we dogfood it ourselves and we get your feedback.

Multi-targeting QuickStart

The Multi-Targeting QuickStart demonstrates the structure of a project created to multi-target WPF and Silverlight environments.

The QuickStart is a real state application that shows different characteristics of properties and includes a pie chart that shows how much the property's characteristics match with the searching criteria. This Solution consists of shared code and UI-specific code for Silverlight and WPF.

 Project Linker Tool

The approach we are taking for multi-targeting is to provide guidance on structuring application and module code into multiple linked projects. Each project manages all of the references, resources and code specific to the WPF or Silverlight target environment.

The Project Linker is a tool that helps create and maintain links from a source project to a target project to share code that is common to Silverlight and WPF. Therefore shared code can be written once and built for the target environment.

Filters can be specified to avoid linking every file, this is useful if you are writing Silverlight or WPF specific code. For example you can filter out all files that have a defined prefix.

To link a source project to a target project, right click the source project and select "Add Project Link". In the window that pops up select the target project and click OK.

If you want more details on the first drop check out David Hill's blog.

Getting Started

To get started, you'll need to have the following bits installed:

  • Visual Studio 2008 SP1 (here).
  • .NET Framework 3.5 SP1 (here)
  • Silverlight Beta 2 and tools (here)
  • Silverlight Unit Testing Framework (here)
  • Visual Studio 2008 SDK (here) - This dependency is temporary and will go away soon (unless you want to recompile or debug the Project Linker).

The Prism 2.0 zip contains a multi-targeting quick start, as well as the source for the project linker, the acceptance testing library, and a Visual Studio template. Once you've unzipped everything, copy the unit testing framework libraries into the ~\LIB\Silverlight\UnitTestFramework folder and you should be all set. You can also install the Visual Studio templates, though this isn't required.

Next Iteration

The next iteration we will focus on modularity for Silverlight. We plan to start with static module loading for Silverlight and then move to background module loading. One of the big requests we heard is reduce the size of the initial download so the application startup time is minimized. Over the next couple of iterations we plan to provide the ability to download a core XAP file. After the initial download (core XAP file), you will be able download additional XAP files in background mode which can be used to download the remaining modules for the application.

After module loading we plan to focus on UI Composition. So stay tuned as we have lots of interesting things to deliver.