Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 620721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:47:41+00:00 2026-05-13T18:47:41+00:00

Perhaps I have been doing Flex development with Frameworks like Cairngorm too long but

  • 0

Perhaps I have been doing Flex development with Frameworks like Cairngorm too long but I still don’t get MVVM. I am aware that Cairngorm is a framework and MVVM is a design pattern, but what I am comparing here is Cairngorms implementations of design patterns, mainly the model view controller and the command pattern. Don’t get me wrong, I think the idea of binding a view to a view model is great and the advantages in testability and designer-programmer workflow are great. But there are two things that bother me: one is programming all my actions with Commands, which by the way also bordered me from Cairngorm. Only in Cairngorm the way they implemented the command pattern gave you the benefit of having a centralized controller for all your commands, which you don’t seem to get with MVVM, unless I am missing something. And if I thought implementing the commands in Cairngorm was convoluted in MVVM is much worst, I mean having to create private classes that implement ICommand for everything I do seems like too much. And then you have the problem that not all controls implement commands so for example if you are using a ListBox, which I use a lot, you are out of luck; there are workarounds but all kind of convoluted.

The other thing that bothers me is the communication between View Models. In a standard Model View Controller you collect all you information on a centralized model which is observed by the views, but this doesn’t seem to be the case with MVVM, at least not in the examples that I have seen. So, for example, if you have a control with a list that you use to select an item which is then used as source for different views and consequent actions it is not clear to me how you notify everybody of the changes without a centralized model.

I am aware of MVVMFoundation and the work of Tom Ershamam about WPF Commands Everywhere. Called me old fashioned but I think that in order to really understand a pattern you have to build an application that uses it from scratch. Which is what I am doing, but the whole time I keep thinking I must be missing something essential because I don’t seem to be able to quiet this little voice in my head that keeps telling me there must be a better way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:47:42+00:00Added an answer on May 13, 2026 at 6:47 pm

    Whatever the framework/architecture/pattern, you will always need something that responds to a button click, on a toolbar/menu or plain form. And you need something that says if the button/menu should be enabled. So the ICommand interface is nice for this.
    I agree with Petoj, you don’t need a new class. I wrote a simple implementation that takes 1 or 2 delegates, one for the actual response to the click (the Execute method) and an optional one for the “enabled” status of the command.
    This way, the ViewModel is not cluttered.

    But I agree that this is not a centralized repository of commands. But do you really want one ? I prefer to have commands specific to one part of an app to be in the corresponding view model, with appropriate events raised when the rest of the app should be notified.

    For the listbox, I bind the SelectedItem property to a property on the ViewModel. With INotifyPropertyChanged, any part of your code can react to the change.

    Communication between ViewModels is a good question. If you need different views on the same screen, you can have a “super” view model that contains the view model of each view.
    There are quite a few MVVM frameworks out there. I used parts of Mark Smith’s MVVM helpers, which is quite lightweight and useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 314k
  • Answers 314k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As others have pointed out, it's best to stick with… May 13, 2026 at 11:01 pm
  • Editorial Team
    Editorial Team added an answer Since n is 10, I would definitely just preallocate the… May 13, 2026 at 11:01 pm
  • Editorial Team
    Editorial Team added an answer We use Resharper for that feature and a lot of… May 13, 2026 at 11:01 pm

Related Questions

I'm building my first Flex custom component, in Flex 3. It is a data
Currently I am working on a piece of software, which is currently written 100%
Lat week I downloaded the Glazed List library into eclipse. I have been looking
I'm trying to understand the basics of lambda calculus and Church numerals. I have
I find myself needing to store public key certificates, and a single private key

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.