Options for keeping models and the UI in sync (in a desktop application context)

Posted by Benju on Stack Overflow See other posts from Stack Overflow or by Benju
Published on 2010-03-11T21:19:36Z Indexed on 2010/03/18 2:01 UTC
Read the original article Hit count: 374

In my experience I have only had 2 patterns work for large-scale desktop application development when trying to keep the model and UI in sync.

1-An eventbus approach via a shared eventbus command objects are fired (ie:UserDemographicsUpdatedEvent) and have various parts of the UI update if they are bound to the same user object updated in this event.

2-Attempt to bind the UI directly to the model adding listeners to the model itself as needed. I find this approach rather clunky as it pollutes the domain model.

Does anybody have other suggestions? In a web application with something like JSP binding to the model is easy as you ussually only care about the state of the model at the time your request comes in, not so in a desktop type application.

Any ideas?

© Stack Overflow or respective owner

Related posts about desktop-application

Related posts about mvc