DCSIMG
Composite Application Guidance for WPF (Prism) Tour - Part 1 - Essential WPF

Composite Application Guidance for WPF (Prism) Tour - Part 1

image

If I would be asked, “What are the best two things happened to Smart Client and Desktop Applications developers in the last two years” I certainly would say “Microsoft's WPF and Prism infrastructures”.

WPF is the aircraft’s Engines, and Prism is the HAL and this makes us proud to be an aircraft pilots. But it’s not enough to just sitting in the cockpit, wearing a pilot suit. We should know how to control both.

With this post I want to start a series of posts regards Composite Application Guidance for WPF code name Prism. I will start with a brief overview about what is CAG and why or when do we need it. After that will come the technical part.

The process of building a UI for desktop or enterprise applications is a design and a development challenge, which is involved with several considerations such as flexibility, modulation, autonomous, static and dynamic load and testability. There are several UI design models such as MVC, MVP and Presentation Model, each provides its own modularity and separation. Thanks to these patterns we separate our system to layers such as Data, Logic and View, where each layer is separated to other small parts such as Components, Events, Commands and other parts packed in Modules. Having such architecture in the UI, the level of decoupling and modularity is increases, and changes are less painful and acceptable.

This leads us to a comprehensive complex solution, which may be simplified by creating an appropriate architecture-based infrastructure, for loading, creating, initializing, organizing presenting and communicating between modules and components.

CAB is an example of such an infrastructure, unfortunately CAB is designed with Windows Forms in mind, and you have to make several big changes for adapting it to WPF. There are official and unofficial solutions for doing that, but none of them leveraging WPF principles and design concepts such as Dependency Properties, Routed Events, Commanding, Data Binding and Data Templates.

Composite Application Guidance for WPF, project name Prism, is exactly what we, WPF developers and UI designers have been waiting for. CAG is a package of guidance, class library and design principles for WPF. It presents a modular infrastructure for building composite and dynamic UI.

Now the question is, “What kind of UI’s CAG fits”?

Ideally saying, CAG usually fits in business applications such as CRM and LOB, where each part of the UI is not deterministic and dynamically located and loaded at runtime.

Well, if you would ask me I would say that CAG fits almost all, whether it is a medical, surveillance, command and control applications or in several other cases test applications.

Maybe the question you should ask is “Is it worth paying the overhead of writing a composite application, the complexity, learning curves or small performance payment at load time”?

I would say that if your application is already large and complex enough, then sure, why not. It will be opened for changes and will give a great option for extensibility in the future. Also it provides education for the team members, teaching them design patterns and other goodies.

By adding CAG to your arsenal, you have great services such as Commanding, Loosely Coupled Events, Dependency Injection, Bootstrapping, Region and View management and other great features which I leave to the next, technical parts.

Composite Application Guidance for WPF (Prism) Tour - Part 2

Published Tuesday, July 15, 2008 10:39 PM by Tomer Shamam
תגים:, , , ,

Comments

# re: Composite Application Guidance for WPF (Prism) Tour - Part 1

Wednesday, July 16, 2008 12:25 PM by Avi Shilon

Sounds very interesting.

Looking forward for the next installments

in the series.

# re: Composite Application Guidance for WPF (Prism) Tour - Part 1

Wednesday, July 16, 2008 3:50 PM by Tomer Shamam

Thanks. I'll do my best :)

# re: Composite Application Guidance for WPF (Prism) Tour - Part 1

Friday, July 25, 2008 7:22 AM by Hiren

CAB/SCSF or Prism, Which one is better framework to use with WPF application? and why? we can use CAB/SCSF with WPF extension then why should someone go for PRism?

# re: Composite Application Guidance for WPF (Prism) Tour - Part 1

Wednesday, July 30, 2008 11:25 AM by Tomer Shamam
Prism is less complicated, easy to learn comparing to CAB, it's a new infrastructure built especially for WPF, leveraging WPF best practices. It is UI-Model-Free. You can choose whatever model you like to MVP/MVC/Presentation Model.Prism is best for building a clean WPF application from scratch, or migrating an existing WPF application. For upgrading a WinForms CAB application to WPF, consider using WPFCAB.You can find more information at http://msdn.microsoft.com/en-us/library/cc707879.aspx and

www.codeplex.com/CompositeWPF

 

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above:
Powered by Community Server (Commercial Edition), by Telligent Systems