(X) Hide this
    • Login
    • Join
      • Say No Bots Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

CollectionView

(0 votes)
3 comments   /   aggregated from Tales from the Smart Client on Mar 07, 2006   /   original article
Categories:   General

CollectionView is a very interesting construct.  After including it in my ViewModel I meant to quickly blog about the usage...but when I started thinking about it and reading a bit more about it, it becomes even more interesting.  Lots of good blogging.  However, while I think about it, let me quickly make my original point.

The Model has a simple List.  CollectionView wraps a Collection and adds concepts like selection, sorting and filtering to it and supports the INotify... goodness that data binding wants in order to do a really good job.  So, CollectionView is a construct that wraps a Model class and adapts it for data binding from the UI.  Uh...sounds like a ViewModel!

WPF does not use the terminology of M-V-VM, but it repeatedly uses the pattern.  CollectionView is a fine class name, but in very strict terms it isn't part of the View!  A CollectionView implies it has UI. 

If you really want to understand the M-V-VM pattern, there is no better place to start than to study how CollectionView adapts a Collection to be presented in the UI using data binding. 

Going to visit the in-laws, so blogging will be sporatic for awhile.


Subscribe

Comments

  • -_-

    RE: CollectionView


    posted by A. Blogger on Jan 22, 2010 15:51
    Hi - Views have been aroudn for a long time before graphical user interfaces. For example a database view, where data is somehow filtered. So the use of View is entirely appropriate :-)
  • -_-

    RE: CollectionView


    posted by A. Blogger on Jan 22, 2010 15:51
    Hi - Views have been aroudn for a long time before graphical user interfaces. For example a database view, where data is somehow filtered. So the use of View is entirely appropriate :-)
  • -_-

    RE: CollectionView


    posted by A Blogger on Jan 22, 2010 15:52
    Hi - Views have been aroudn for a long time before graphical user interfaces. For example a database view, where data is somehow filtered. So the use of View is entirely appropriate :-)

Add Comment

Login to comment:
  *      *       
Login with Facebook