Skip Navigation LinksHome / News / View News

MVVM with Prism 101 – Part 5b: ServiceLocator vs Dependency Injection

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on Nov 03, 2009
(0 votes)

Now that Mark J. Miller showed the View-Model in Part 5, it;s time to see how to wire up the View-Model to the View.

First, let me define a few things. First, Inversion of Control is a pattern wherein creation of objects is delegated in an effort to simplify instantiation and/or defer it until runtime. Huh? Inversion of Control is a means of programming against interfaces. Your classes reference interfaces at design-time and then delegate the creation of the concrete classes to a single component or service. The result is you now have a only a single dependency – the “Container” – instead of a complex hierarchy of dependencies.

You can find Mark's previous parts here:

  • Part 1: The Bootstrapper
  • Part 2: The Shell
  • Part 3: Regions
  • Part 4: Modules
  • Part 5: The View-Model
  • Share


    Comments

    Comments RSS RSS
    No comments

    Add Comment

     
     

       
      
      
       
    Please add 5 and 2 and type the answer here: