0

MVVM and Controller

asked 2013-04-09 04:18:40 +0800

JustinFrost gravatar image JustinFrost
145 1 6

I have just used the MVVM to bind data to my zul file, but as I initialler used a controller also on this screen was wondering how this fits into the MVVM architecture if at all ?

The controller is useful for manipulating the UI, especially in my case when I am loading and building PortLayout components from the database.

If their best practice to using the controller with MVVM.

Thanks.

delete flag offensive retag edit

Comments

Great.

Thanks for the reply, I am using a hybrid at the moment, but when using ViewModel it is all data related. So I am happy with a happy medium so to speak.

JustinFrost ( 2013-04-22 09:24:53 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-04-10 23:58:38 +0800

rickcr gravatar image rickcr
704 7

The consensus seems to be that if your manipulating specific pieces of the UI, then use a Composer. The theory is that the ViewModels of MVVM shouldn't have "UI" code in them.

*note, I say the "theory" is, since I often break that theory in practice and haven't noticed any ill consequences. For example, I'll often use Messagebox within my ViewModel commands. In theory I'm breaking the pure separation, but I'm not sweating it too much.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-04-09 04:18:40 +0800

Seen: 36 times

Last updated: Apr 22 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More