tags:

views:

51

answers:

2

I've been reading a lot about the MCV and MVP patterns for use with UI and it seems like a really nice powerful way to handle user interfaces. I am - however - having a difficult time deciding how this could integrate into a system where data in the model is created from a Data Acquisition System or Serial/Ethernet devices. There is also the added step that 70% of application interaction is performed by a PLC instead of a live user.

It seems that for apps that just read/write & manipulate information from a database this works great, but how does does hardware and automation fit into these patterns? Is it as simple as another controller (for lack of a better term) that interacts with hardware that manipulates data and writes to a model?

Maybe I am over thinking this or thinking too simply, so any advice would be great. I'm not quite sure where I'm going with this, so if something doesn't make sense or I was too vague leave me a comment.

Thanks!

+1  A: 

The hardware state is your model. How it gets updated is not part of the pattern, only how an update to the state affects your view.

Hans Passant
A: 

Just adding to what Hans said - Your data acquisition feeds into the data model of your application.

(Using the MVVM/WPF/Silverlight context) This in turn should raise the NotifyPropertyChanged event on your ViewModel (aka Presentation Model), which then propagates through to your view automatically via databinding.

Doobi