WPF

What is Prism ?

Prism has many great pieces of functionality, but you don’t need to use all of them.  It’s like the people you friend on Facebook, or the food you eat from a buffet, you get to choose what pieces of Prism are appropriate for your application.  If you like the concept of user interface composition but nothing else, that’s fine – use that only.  If you don’t want to leverage any Prism functionality except the Event Aggregator, go for it.  You choose what’s right for each project.

From an architectural perspective, Prism provides the following options

  • Bootstrapper – this provides application initialization
  • Shell and Shell Presenter – these provide the general visual layout structure and behavior for an application
  • Regions – these provide placeholders for visual content and enable composite views
  • Modules – these plug-ins enforce vertical or horizontal slices (or both) in an application, and enforce adherence to your chosen Presentation Model pattern
  • Views – these provide the content to display on the screen
  • Synchronous Communication – via commands
  • Asynchronous Communication – via event aggregation or services
  • Services – these provide either module-specific or shared-use functionality
  • Multi-targeting – this provides ability to use the same code base to deploy as either a WPF or Silverlight application

Prism employs patterns

 Most enterprise applications initially require or evolve to a point where common patterns are employed to provide application maintainability, performance, decoupling, etc.  Prism applications also employ patterns, many of which are supported directly in the Prism libraries or reference implementations.  Some of the key patterns you should know/learn include:

  • Controller
  • Dependency Injection / Inversion of Control
  • Event Aggregator
  • Façade
  • Plug-in
  • Presentation Model – either Model-View-ViewModel (MVVM) or Model-View-Presenter (MVP)
  • Repository
  • Service Locator

Binding WPF Events to MVVM ViewModel Commands                                   http://www.danharman.net/2011/08/05/binding-wpf-events-to-mvvm-viewmodel-commands/

Commands in MVVM                                                                       http://www.codeproject.com/Articles/274982/Commands-in-MVVM

Event Aggregate in WPF – PRISM

http://blog.magnusmontin.net/2014/02/28/using-the-event-aggregator-pattern-to-communicate-between-view-models/

WPF: ContentControl vs ContentPresenter
https://www.youtube.com/watch?v=E8RYWOlO3nc
WPF: ContentControl vs ContentPresenter

Attached Properties in WPF
https://www.youtube.com/watch?v=_h0-DlLXxMM

WPF Dependency Properties vs INotifyPropertyChanged
http://codemonkeycorner.com/post/wpf-dependency-properties-vs-inotifypropertychanged

C# Events and Delegates Made Simple
https://www.youtube.com/watch?v=jQgwEsJISy0

 

 

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Thanks for your comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: