tags:

views:

33

answers:

2

Hi,
I am new to WPF application and are developing a new WPF application which does 4 different things (4 different modules).

I was googling around and found regarding WPF composite application.

I was reading through the msdn articles but and a few a different place but all the apps are very large and so understanding them is a bit difficult.

Has anyone got a very simple WPF composite application or any link where i can find it out?

A: 

Your question is very broad, but I'll try to give you a few tips.

This is just my $0.02USD since I've reacently approached a similar challenge.

First thing, don't approach this as a WPF composite application, think of it as a composite application that you wish to reflect onto a WPF window. There's a big difference. Each module of your composite should be a self contained, and fully functional unit -- later you can tie some of the functionality to WPF controls. If you try to design this from the ground up to work with and only with a certain WPF interface, you're entering a world of pain with difficult refactoring and untestability.

Research the Model-View-ViemModel (MVVM) approach to WPF application design. For each of your modules create a ViewModel -- which is an adapter class that exposes the functionality of your module ("Model" in MVVM) to a WPF control ("View" in MVVM).

I would suggest you do something like the following:

  1. Design independent classes for each of your 4 modules.

  2. Create 4 Visual Studio "Test Projects" that test each method of your modules.

  3. Create 4 ViewModels that instantiate a single reference to your modules and exposes their functionality, even if these ViewModels seems redundant at first.

  4. Create 4 WPF UserControls that instantiate your ViewModels.

  5. Research WPF data binding and have your UserControls access your modules through and only through their respective ViewModels.

Each of these steps are very broad and will take lots of work, but there are plenty around here that will help you each step of the way once you get into the specifics :D

Good luck!

bufferz
A: 

http://stackoverflow.com/questions/1097582/wpf-silverlight-prism-resources-for-beginners

I started developing a small app using WPF and PRISM. The msdn article helped me and the have look at the above stackoverflow question..

Miral