4

I'm beginning modelling an existing application for controlling a cash collection terminal. I'm very new to the Prism / Composite Application Library and would like some advice on how I could begin modelling this application using the Prism library.

Basically the application manages a cash terminal that accepts frequent cash drops, counts notes in the deposits, communicates via a 3G/Edge connection with our central server to replicate deposit and other data, and performs cashups. Central to all this is management of the cash canister. The application is not UI intensive, but we are moving away from WinForms to WPF, and I am supposed to use this framework for all future development.

ProfK
  • 49,207
  • 121
  • 399
  • 775

1 Answers1

14

At its most fundamental core, Prism is an application composition framework. It allows you to modularize your application. The thing to start thinking about it what parts of your application need to be modular.

A module is a unit of functionality that is useful on its own, but doesn't make the application useless if it is replaced or removed. For example, in an application I've written for work we have two different types of contacts for which we handle cases. We have a module for each contact type that contributes functionality specific to that contact type. The application is still usable without one or the other and in this way we can work on or test each component individually as well as together.

Hopefully this gives you a guide to how to model your application. Prism seems complicated, but it helps to understand that what you really get with Prism is this ability to slice up your application. From a high level, this is what you'd probably be more interested in modeling.

Anderson Imes
  • 25,500
  • 4
  • 67
  • 82
  • +1 for good overview. The only point I'd state is that modules can be necessary for an application to function but still be considered "modules" - sometimes, an application may need some functionality but can get it from either Module A or Module B, but at least one of them must be present for it to function. Prism works great in those kinds of scenarios. – Matt Jordan Jan 19 '11 at 16:59
  • @Matt Jordan: that's why I gave the caveat "or replaced" :) – Anderson Imes Jan 19 '11 at 19:28
  • @Matt Jordan: also... nice Mandelbrot set :) – Anderson Imes Jan 19 '11 at 19:29
  • Have you evaluated MEF for Silverlight 4.0 as a possible replacement for Prism specifically for the composition scenarios ? It supports most of the functionality OOB, and has the added advantage of being able to leverage a technology as opposed to a framework. – Abhinav Gujjar Feb 01 '11 at 15:09
  • 2
    @zync I have evaluated it. It's definitely something that can be used to obsolete RegionManager. It doesn't replace EventAggregator, however. Not in any way a deal breaker, but it's something to consider. The latest version of Prism (4.0) has a Bootstrapper that uses MEF rather than Unity... definitely the way I'd go on new projects. I'd say it's useful in WPF and Silverlight in the same way. – Anderson Imes Feb 01 '11 at 16:07