Downloading PrismThe Connected Show

10 Things to Know About Silverlight Prism

July 1st, 2009

lightbulb_48

Prism is one of the hottest topics in Silverlight.  Here, I provide the top 10 things that I think every developer should know about Prism.

For a great write-up on Prism, I recommend:

Shawn Wildermuth’s MSDN article.

paper_content_48

1. Prism is a collection of libraries for implementing best-practices in Silverlight

Now, Prism actually contains more than just the libraries (it also has source code, examples, quickstarts and excellent documentation), but the key thing is that Prism is a tool for creating testable/maintainable applications.

Silverlight Prism VideoSilverlight Prism Video

2. Prism is a Buffet (term coined by Shawn Wildermuth)

Prism has several different tools, and you can use any or all of them at your discretion.  It’s not a heavy-weight framework.  You can use Prism selectively.

Sparkling Client PodcastIntro to Prism Interview

3. Finding and Installing Prism is Confusing

For whatever reason, it’s hard to find and download Prism.  Actually, it’s not difficult; it’s just hard to get properly oriented.  For one thing, Microsoft sites refer to Prism as the “Composite Application Guidance”.  For another, the source appears to be on CodePlex, but it’s actually on MSDN.  So there’s a bit of a run-around before you can get up and going with Prism.  However, it’s great code and jumping through the hoops is worth it.

Sparkling Client Podcast Downloading and Building Prism Guide

4. Prism Supports Modularity

Prism is chock full of support for breaking applications down into manageable pieces.  It supports Unity for Dependency Injection and Service Location.  It also has a Module Catalog which manages the loading of .dlls and .xap files into Silverlight applications.  If you’re interested in application testability and maintainability, modularity is for you.

Silverlight Prism Video Prism Modularity Video Sparkling Client Podcast Prism Modularity Interview

5. Prism Supports Master Pages – Regions

Regions allow the visual parts of an application to be separated out and developed independently.   It’s similar to how master pages are used in ASP.NET.  If you’ve ever wanted to hand out UI tasks to different development teams, this is the tool that will make life much easier.

Silverlight Prism Video Prism Regions Video Sparkling Client Podcast Prism Regions Interview

6. Prism Supports Loosely Coupled Communication – Eventing

Once you’ve broken an application into multiple pieces, there’s always the question of how do these pieces communicate?  Especially, how do they communicate when they aren’t supposed to know about each other?  Here, Prism Eventing steps into the gap and provides communication infrastructure.

Silverlight Prism Video Prism Eventing Video Sparkling Client Podcast Prism Eventing Interview

7. Prism Supports Commanding – Help for MVVM

MVVM/Presentation Patterns are powerful patterns for building testable and scalable Silverlight applications.  Unfortunately, they require Commanding (the ability for the XAML/Interface to directly communicate with ViewModels/Presenters), and raw Silverlight 2 doesn’t have this functionality.  Prism Commanding comes to the rescue and uses attached properties to enable this scenario.

Silverlight Prism Video Prism Commanding Video Sparkling Client Podcast Prism Commanding Interview

8. Prism Supports Sharing Code Between Silverlight and WPF – Multi-Targeting

Silverlight and WPF are pretty similar.  They both use XAML, and they have similar libraries they can call.  Unfortunately, they’re different enough that you can’t add a reference from Silverlight to a WPF .dll (or vice versa).  The way to share functionality between these technologies is to share code between projects.  Enter the Project Linker.  This is an application that makes it easier to share code between Silverlight and WPF.

9. Most Silverlight Applications can Benefit from Prism

Prism isn’t the answer for all applications, of course.  There are some apps (small applications, media applications and possibly games) that Prism might not help with, but in general the patterns are widely applicable (Dependency Injection, Commanding, etc.).  Even if you don’t use Prism, the patterns in Prism are still valuable.  In fact, there are other projects such as Ninject and Caliburn that implement some of the same patterns as Prism.

Sparkling Client Podcast When to Use Prism Interview

10. Prism Helps with MVVM/MVP

Prism doesn’t directly implement either MVVM (Presentation Model) or MVP patterns.  Instead, it provides support (example: Commanding) that makes these patterns easy to implement.  See the Reference Implementation and Quickstarts for examples on how to implement these patterns using the support that Prism provides.

This post uses the free Function Icon Set.

Entry Filed under: Uncategorized

12 Comments Add your own

  • 1. NewsPeeps&hellip  |  July 2nd, 2009 at 6:23 am

    Prism Silverlight – 10 Things to Know…

    Thank you for submitting this cool story – Trackback from NewsPeeps…

  • 2. Community Blogs&hellip  |  July 2nd, 2009 at 2:43 pm

    Erik Mork’s Prism for Silverlight Resources…

    URL : http://www.sparklingclient.com/prism-silverlight/ Erik Mork, Silverlight MVP, host of the SparkingClient…

  • 3. DotNetShoutout&hellip  |  July 2nd, 2009 at 5:02 pm

    10 Things to Know about Prism Silverlight…

    Thank you for submitting this cool story – Trackback from DotNetShoutout…

  • 4. My favourite Prism resour&hellip  |  July 4th, 2009 at 6:54 am

    [...] favourite Prism resource Want to learn Prism? This is the way to go: 10 Things to Know About Silverlight Prism by Erik [...]

  • 5. DotNet Feed&hellip  |  July 4th, 2009 at 8:33 pm

    Prism Silverlight – 10 Things to Know…

    Thank you for submitting this cool story – Trackback from DotNet Feed…

  • 6. Why Shouldn’t I use&hellip  |  July 5th, 2009 at 12:10 am

    [...] a list of 10 Things To Know About Silverlight Prism on the Sparkling Client blog. [...]

  • 7. Friday Links #59 | Blue O&hellip  |  July 11th, 2009 at 12:10 pm

    [...] Prism Silverlight – 10 Things to Know -  Prism is one of the hottest topics in Silverlight.  Here, are 10 things that every developer should know about Prism. For a great write-up on Prism, read: Shawn Wildermuth’s MSDN article. [...]

  • 8. People Over Process &raqu&hellip  |  July 31st, 2009 at 12:04 pm

    [...] Prism Silverlight – 10 Things to Know [...]

  • 9. Tune Up Your PC » P&hellip  |  September 3rd, 2009 at 2:16 pm

    [...] Sparkling Client – the Silverlight podcast [...]

  • 10. Damian Schenkelman’&hellip  |  October 21st, 2009 at 6:30 am

    [...] Watch videos. There are lots of video tutorials going around, but these two collections are particularly good. Videos from P&P team & 10 Things to Know About Silverlight Prism. [...]

  • 11. Amit Sharma  |  February 28th, 2010 at 4:29 pm

    Thanks for this excellent post! Made things around Prism a lot more clear.

  • 12. Iqbal  |  April 21st, 2010 at 9:54 pm

    Thanks, its really helpful to understand Silverlight Prism easily.

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Hosts

Erik Monica
Erik Mork Monica Mork

Categories

Links

Recent Posts

Calendar

September 2010
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
27282930  

Posts by Month

Posts by Category

Meta