WPF and Business Logic

I read something interesting on Scott Hanselman's blog the other day regarding WPF. It was in relation to activating and dis-activating some controls based on the value of other ones. And I "quote":

His proposed solution is taking advantage of WPF's extremely powerful binding capabilities. I "quote" again:


He's happy with that. I'm not! He's putting business logic inside the view. And it scares me to see things like this because it tends to non-testable and "obscure" problems.

2 thoughts on “WPF and Business Logic

  1. Holger Flick

    WPF binding is very powerful and it should be possible to use static methods of static classes in order to separate the business logic from the view. I guess he just wanted a brief XAML example. But I agree, I am not a big fan of "XAML-apps" either.

  2. hadi

    There’s no need for static classes. As long as you set the DataContext appropriately that’s enough.


Leave a Reply

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s