RIA Services Data Paging & Dynamic Data Binding - Part 1
Uploader Comments (arunavg)
All Comments (11)
-
Some of the comments in here show a clear lack of understanding of UI architectural patterns and practices. They are indicative of someone who has read a book or two on them but have yet to work on any real, meaningful projects !
I don't have the time to butt-heads with a bunch of newbies.
Good luck guys and don't forget to read-up a little more :)
-
krityav -- You need to read up a little more before before engaging your mouth. You come right out of a book. Gather some experience from building real world enterprise applications before jumping in here with our 2 cents.
Incidentally, dropping templates from WPF has no bearing on this discussion.
-
Please review your understanding of separation of concern and how MVVM achieves that, also MVVM is not the only architectural pattern for achieving it. Learn about MVC and MVP.
-
DomainDataSource, regardless of whether it is in XAML or code-behind, is not used in enterprise application design.
The whole push is to make the code-behind as code-free as possible and this can be achieved only via an MVVM architectural pattern, which advises against data access code in the XAML (i.e. no drag-n-drop) or code in the code-behind. Using a combination of data-binding, commanding, behaviors, triggers/actions and events, an attempt needs to be made to limit the code-behind.
-
The DomainDataSource is for RAD prototype development only. Demonstrating it, you run the risk of getting newcomers to this technology to use bad design principles which violate separation of concerns and make the application strongly coupled -- in your case you have data access code in the XAML !!!!!!
It is alright to demo this, provided you make it very clear that this is a prototyping design only and should never be used in enterprise applications.
To cut the chase, the domain data source class is designed with an intent to serve as a model in MVC or MVP or MVVM (restriced to xaml). It has all qaulitites essential to serve as a model:-
1. It is self contained and can work with no reference to presentation
2. It can serve multiple presentation (and simultaneously)
3. When its internal state changes it raises events that can be observed by views.
Ofcourse, there may be times when due to its abstraction DDS might not be the best choice.
arunavg 9 months ago 2
Rahul -- please dont get over excited, the comments you see here are from all seasoned peoples. I myself have worked for 38 projects over a period of 8 years and some of them are apps that you frequently use (I work with MS). and majority of my appilcations are EA apps. There is no one against MVVM, but yes it is not the ONLY way of implementing seperation of concern.
If you know only one of doing something then probably you havent done it right yet.
arunavg 9 months ago
You can always learn rules from the book, but there are always exceptions beyond it. By the way Microsoft has dropped MVVM visual studio project template from WPF toolkit.
arunavg 9 months ago
I am a strong supporter of MVVM and MVC myself but for anyone who has really implemented MVVM surely understands that it is a overkill for simple application. Further performance is a always something you need to watch while using this pattern and might require adapting to single static callbacks with this pattern which is against the pattern itself, (also identified by John Grossman who promotes it)
arunavg 9 months ago
Please Look into part 2 of the demo which shows using domaindatasource from code behind.
Besides using domain datasource will not necessarily violate seperation of concern although it does when you put it all in the XAML.
arunavg 9 months ago