John Gossman on Model/View/ViewModel

John Gossman, architect on the Sparkle team, has just made a post about how Sparkle uses data binding to hook up the view of the data to the data itself.

Interestingly, his post isn't about whether they used data binding -- that's a foregone conclusion. Data binding is so powerful that pretty much every non-trivial Avalon app will use it, and Sparkle (a large app with a very rich UI) uses the hell out of it.

The main thrust of the Model/View/ViewModel architecture seems to be that on top of the data ("the Model"), there's another layer of non-visual components ("the ViewModel") that map the concepts of the data more closely to the concepts of the view of the data ("the View"). It's the ViewModel that the View binds to, not the Model directly.

I've been a fan of value converters (implementations of IValueConverter) for this kind of work, but John's technique has its charms, not least that it allows for much more radical slicing and dicing than value converters allow easily.



Comment Feed 5 comments on this post

Here we go again...data binding:


How can you say something so nieve as 'Data binding is so powerful that pretty much every non-trivial Avalon app will use it'. Ever since data binding came out, MS has been touting it as how REAL applications are built. Trust me, I actually build real apps. Apps that have to perform. Apps that have to be extensible and extremely flexible. And not once in 10 years, have I ever used or seen used, databinding. It’s a toy used for rapid app dev or for prototyping (which it does a good job), but nothing else. Do you honestly think that good quality software will ever use databinding?

Monday, Oct 10, 2005, 8:18 AM


Jesse Ezell:


Sparkle is a pretty damn good piece of software.

Monday, Oct 10, 2005, 3:19 PM


uawtkn xrygjd:


vhxrikj ujci dyjgu zqwrsd eiwxyag ujvlgaore drepy

Thursday, Mar 8, 2007, 9:55 PM


szoryfiw hkvox:


rjvzswmdh dyexliohw agnhertfq xjrqgbuon azlqeogwm etdqzjwx edfaywctv http://www.sijhkr.wnaok.com

Thursday, Mar 8, 2007, 9:55 PM


zqbt dmjze:


roxmsd byflmw rtckn jsxzkphq potnyue gret vzfcxpjwi [URL=http://www.dynxfalc.ymfeghkt.com]cvqagdl anmdcx[/URL]

Thursday, Mar 8, 2007, 9:56 PM





comment on this post

HTML tags will be escaped.

Powered By ASP.NET

Hosted by SecureWebs

Mensa

IEEE