Is it possible to "bring your own MVVM" with CSLA?.. #1987
-
Hi, I just learned of this wonderful project through a random YouTube recommendation that came across my dashboard! I'm watching the video from July 2018, and the discussion on databinding (in my case, I'm using WPF) - last year or so I fell in love with the Stylet MVVM framework (https://github.com/canton7/Stylet) which has its own method for setting / notifying of view model changes. Prior to that, I was using DevExpress MVVM since I use their UI controls in my applications. So I'm wondering does CSLA support the use of other MVVM frameworks (another good example - Unity), or would I have to use what's put forth in the CSLA framework? Please forgive if this is an "ignorant" question - I just learned of CSLA, and I'm halfway though the first video, and I'm really excited to have, as you stated a Business Logic framework to use right along with the other frameworks I use and enjoy! Ultimately all MVVM frameworks result in a call to NotifyPropertyChanged etc., but I know Stylet does its Commands a little bit differently "Actions". I figured I'd ask, to see what my options are before I setup and try and work though a test project. Thanks for what looks to be an amazing Framework! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @WillBellJr, welcome to the community! The short answer is that CSLA should work with pretty much any MVVM framework. My recommendation has consistently been to use very thin viewmodel types, allowing the view to bind to the model as much as possible. This is because a well-designed CSLA model object will expose the right properties for the UI, and already supports data binding plus a bunch of extra rich functionality around validation and authorization rules that go beyond basic data binding. Conceptually then, a viewmodel does three primary things:
The If it is not helpful to you, there's absolutely no requirement to use it, though you might want to create something similar that works with your specific MVVM framework. |
Beta Was this translation helpful? Give feedback.
Hi @WillBellJr, welcome to the community!
The short answer is that CSLA should work with pretty much any MVVM framework.
My recommendation has consistently been to use very thin viewmodel types, allowing the view to bind to the model as much as possible. This is because a well-designed CSLA model object will expose the right properties for the UI, and already supports data binding plus a bunch of extra rich functionality around validation and authorization rules that go beyond basic data binding.
Conceptually then, a viewmodel does three primary things:
Model
property so the UI can bind to the model