February 27th, 2009
A few days after, Microsoft released a new version of Silverlight (version 2.0.40115.00 or just GDR1), and it broke a build script that we were using for some of the unit tests in the CAL. This didn’t prevent the users from using the CAL, but was causing build failures with cryptical error messages. You can read the full details here.
We also got feedback from users (i.e here, here and from Brian Noyes), that when migrating an existing Prism 1.0 app to Prism 2.0 (WPF), they were experimenting inconsistencies with the activation and deactivation of views when using a TabControl as a region. You can read the full details here.
We decided to fix both issues and refresh the download bits, so you can now download them from MSDN.
What files were updated in the source code?
If you are including the CAL in you application’s source control, you might want to know exactly what files were updated.
The following are the only files updated with this refresh:
Do you have the latest version already?
If you are not sure whether you already have the latest version of the self-extractable EXE for the source code (because the version number was not updated) you can check the timestamp of the Digital Signature. The refreshed bits should read ‘Tuesday, February 24, 2009′ (don’t mind the time, as it varies with the time zone of the PC).
Happy composite application building!
February 16th, 2009
Great news guys: the Composite Application Guidance for WPF and Silverlight – February 2009 has been finally released.
You’ll be glad to know that the final version of this new release is out. If you’ve been playing with the bi-weekly drops, or holding off to be able to use this already embraced guidance from WPF, but in your Silverlight projects, you can now start grinning.
This guidance is intended for software architects and software developers building enterprise Windows Presentation Foundation (WPF) or Silverlight applications. Such applications typically feature multiple screens, rich, flexible user interaction and data visualization, and role-determined behavior. Additionally, these applications typically use layered architectures that may be physically deployed across tiers, strong separation of concerns, and loosely coupled components. They are “built to last” and “built for change.” This means that the application’s expected lifetime is measured in years and that it will evolve in response to new, unforeseen requirements. Applications that do not demand these features and characteristics may not benefit from the Composite Application Library.
The Composite Application Guidance is not difficult to learn, but developers must be ready and willing to embrace patterns and practices that may be new to them.
Composite Application Guidance Assets
- Composite Application Library source code. Developers can use the Composite Application Library to develop multi-targeted applications in WPF and Silverlight that are composed of independent and collaborating modules.
- Unity Extensions for Composite Application Library source code. This provides components to use the Unity Application Block with the Composite Application Library.
- Stock Trader Reference Implementation (Stock Trader RI). This is a composite application that is based on a real-world scenario. This intentionally incomplete application illustrates the composite application baseline architecture. This is a good reference to see how many of the challenges when building composite applications are addressed by this guidance.
- QuickStarts. This includes the source code for several small, focused applications that illustrate a specific challenge.
- Documentation. This includes the architectural overview, Stock Trader RI overview, design and technical concepts for composite applications, applied patterns, How-to topics, QuickStarts overviews, and deployment topics. Much of this guidance is applicable even if you are not using the Composite Application Library, but you just want to know best practices for creating composite applications.
What’s new from Prism 1.0
- Silverlight Support. The complete Composite Application Library, RI, QuickStarts, documentation (everything!) has been brought into life in Silverlight. The source code is targeting both WPF and Silverlight, by using linked source code files (there is of course guidance on how to develop applications that reuse code for these 2 platforms if you are planning to target both of these with the same code).
- WPF developers won’t see much difference in the Composite Application Library itself, but there are some reasons to update:
- View Discovery UI Composition. Modules can register views (or presentation models) against a named region. When that region is displayed at run time, any views that have been registered for that location will be automatically created and displayed within it. The Prism 1.0 way of adding views to a region is now officially called View Injection, because it does not work as a configuration mechanism, but as a explicit demand to add the view into a specific region instance.
- RegionContext is useful when you want to share context between a parent view and child views that are hosted in a region. Think of this like flowing DataContext down, but through regions.
- ICommand attached behavior base. Base class to help create behaviors for control events that will fire an ICommand. This was mostly done to support executing commands in Silverlight when clicking a button, but could be applied equally well to WPF for other kind of events (such as pressing the Enter Key on a search box as it’s being demonstrated in the RI). The basic idea around behaviors for ICommand is similar to what I blogged about in this post a while ago.
- Region extensibility. Regions are easier to extend with their functionality moving into attached region behaviors.
- Module Catalog. This concept is easier to understand and use than the Module Enumerator and Module Loader present in 1.0. Nevertheless, migrating to the catalog from enumerators is pretty straightforward and it’s explained in the docs.
- Project Linker. Basic tooling that helps you keep 2 projects synchronized by creating Visual Studio file links from one project to another. This is useful for sharing source code that targets both WPF and Silverlight platforms (as there is no binary compatibility).
What is different between the Silverlight and the WPF version of the Composite Application Library in this release?
- The codebase is mostly the same, except for some minor differences. The biggest of these is that Directory Lookup of modules and Configuration based module catalog is available in WPF only, whilst Silverlight supports retrieving modules asynchronously in separate XAP files, to reduce the main application size (and startup time).
- MSDN Landing page: www.microsoft.com/compositewpf
- Community site: www.codeplex.com/prism
- Download: Composite Application Guidance for WPF and Silverlight
- Also check out this introductory video to Prism from Blaine Wastell (Prism team’s Program Manager).