Why we have built RadDomainDataSource for Silverlight?

Monday, January 03, 2011 by Stefan Dobrev | Comments 16

Although Rossen has stated almost all of the things in his introductory blog post about RadDomainDataSource I wanted to create a separate blog entry which answers the most important question that you might be asking: “Why Telerik have developed their own version of a domain data source component?” Here is the answer:

We felt your pain

We have received numerous forum posts and support tickets stating that you want a codeless approach to data-binding that supports most common data operations without the need for any custom code. During the times when RadDomainDataSource was not available you will have to write hundreds of lines of code in order to support server side filtering. Yes sorting and paging were happening on the server automatically, but who needs them without the power of the built-in Excel like filtering of RadGridView. You wanted a seamless integration between your data and our data oriented components like: RadDataFilter, RadDataPager or RadGridView and this is exactly what we have developed. We are also making sure that any future data component that will be developed will lay on the foundation that we have already established and will integrate smoothly as others do.

We wanted to add value

Microsoft’s DomainDataSource lacks some key capabilities and this is a place for someone like Telerik to step up and fill these holes. Here are some of the v1 features that add value to our offering compared to the Microsoft’s one:

  • Filter Composition – we support nesting of filter descriptors to unlimited depth allowing you to compose complex filter conditions.
  • Fine grained query parameter control – We expose a PreparedParameterValue event which provides a way for you to change each parameter or handle a possible exception before the entity query is sent to the server. This opens the door for handling any custom query scenario that you might have.
  • Along with the control we are shipping a set of extension methods which allow you to write native LINQ expression against an entity query object. Those are very handy in data virtualization scenarios like the one in this blog post.

We heard you - the community

One of the most requested feature on RIA services suggestions forum is “MVVM friendly DomainDataSource”. This question was also asked a great number of times on our forums as well. We as you believe that putting a control in your ViewModel is far away from any best practices and this is the reason why RadDomainDataSource was developed with MVVM in mind. What do we mean by that? We are exposing the heart of the control named – QueryableDomainServiceCollectionView as public class that you can start using in your ViewModels right away. You can learn the details here. So our answer to the MVVM purists out there is: We got you covered!

We wanted to invest in the future

Last but not least we wanted to built a foundation for future data source components that we are going to develop. We are pretty sure that what we have developed can be easily extended to support other data access technologies providing filtering, sorting, grouping, paging and aggregation out-of-the-box. This means that you can expect a pleiad of data source controls coming up during the year.

 

Having all these objectives on the table we have decided to invest our time in developing RadDomainDataSource for Silverlight. I hope you like the end result as much as we do.

 

Don’t miss other RadDomainDataSource related blog posts:

Posted in: Silverlight

16 Comments

  • Ben 04 Jan 2011
    Excellent article putting everything into perspective. The LINQ extension methods are great additions to fill the hole.
    ..Ben
  • Iosu 04 Jan 2011
    Hi

    Nice job!!...

    It would be great if it will be compatible with Devforce......  Any chance???


    Thanks!
  • Ben 04 Jan 2011
    Stefan;

    How does VirtualQueryableCollectionView and QueryableDomainServiceCollectionView come into the picture together. How does QDSC use VQCV as a base of it virtual engine. I'm a bit unclear how and when and where these two are used to accomplish both filtering and virtualization.

    Thanks!
    ..Ben
  • Ben 04 Jan 2011
    Also, where can we get more docs on the properties and methods and more in depth info on this collection and Virtual engine?
    Thanks!
    ..Ben
  • Stefan Dobrev 05 Jan 2011
    @Ben
    * Although they share a common base class (QueryableCollectionView) both collections that you are mentioning are kind of orthogonal. The virtual one is solving the problem of "lying" that it has specific number of items and requests each one of them on demand. As for the domain services one it is specific for the domain of WCF RIA Services and how they represent data. You can envision that in the future we might extract the virtual behavior from the virtual collection view and apply it on other queryable views as well.
    * Regarding the help documentation and API reference they will be available in service pack time frame. Along with them there will be a couple of examples illustrating different usage scenarios. Till then the best way to explore the domain services view is to follow our blogs or play with it inside Visual Studio. As for the virtual collection you can already look at our examples and help documentation.

    @losu
    Writing a data source component will be even easier for DevForce, because of their native LINQ support on the client. However having tight integration with them is not in our immediate radar. But it sound like a nice pet project that you can cook and share with us via our public code library.
  • Ben 05 Jan 2011
    You can envision that in the future we might extract the virtual behavior from the virtual collection view and apply it on other queryable views as well.

    Stefan, this exactly how I perceived or envisioned to be [perhaps as of now], but you just clarified that the virtual engine is not built into the QueryableDomainServiceCollectionView as of now. Which is fine, as long as I'm clear on that.

    Now, what I'm still not clear is, how do you combine the two together to get the best of each? That's really my question.
    I see when using QDSCV we no longer need to use DomainContext anymore from our ViewModel. The QDSCV sits between the View and DomainContext.
    Now when I was looking at Vlad's sample, he first created a query based on the Domain Context first and then he created a View object based on the Virtual collection and then passed the query to it.
    So, now my thinking is that, instead of creating that virtual query based on DomainContext, can we creat it based on QDSCV and then pass it to the Virtual collection? Is this the way to combine them both?

    If yes, then that raises the question that the Virtual collection has it's own methods for Sorting & Filtering.

    Or is it just better to use one and not mix them together?

    Sorry for long question. Just trying to see how these two beasts come together :-)
    ..Ben
  • Stefan Dobrev 06 Jan 2011
    Hi Ben,

    My suggestion for you is to use each one of the collections depending on your scenario and requirements. If you need virtual scrolling you should use the virtual collection view, if you have basic CRUD scenarios with paging you can go with domain service collection. The good news is that both collections are queryable onces and this means that they will integrate nicely with other data components like grid, filter, etc. If you need a virtual scrolling experience that is tightly couple to RIA Services (as QueryableDomainServiceCollectionView is) you might want to derive from VirtualQueryableCollectionView and implement it that way using the provided extension methods. As of today there is nothing like that built-in in RadControls for Silverlight.

    Hope this helps.
  • Ben 06 Jan 2011
    Stefan, thank you kindly; Yes, your explanation made it very clear. I was almost drawing to the same conclusion and your points are well taken.
    Thanks!
    ..Ben
  • Tim 06 Jan 2011
    Excellent solution toward solving a real problem.
  • Iosu 07 Jan 2011
    hi
    @losu
    Writing a data source component will be even easier for DevForce, because of their native LINQ support on the client. However having tight integration with them is not in our immediate radar. But it sound like a nice pet project that you can cook and share with us via our public code library.

    If you give me and startup ideas ..... I will do it

    Iosu
  • Stefan Dobrev 10 Jan 2011
    @losu

    My suggestion is to look at QueryableDomainServiceCollectionView and its implementation. You can modify the respective RIA related properties to become their equivalent ones in DevForce. The key method that you will have to override is CreateQuery one which constructs the LINQ expression.
  • Ben 14 Jan 2011
    <<* Regarding the help documentation and API reference they will be available in service pack time frame>>

    Hi Stefan;
    Now that the SP1 is available, can  you point out where the docs would be?
    Just did a search here and couldn't find any docs.

    Thanks!
    ..Ben
  • Stefan Dobrev 17 Jan 2011
    Hi Ben,

    Here is the link to our online documentation. Please note that it currently contains just a few articles, but are going to expand and update these resources in the upcoming weeks.

    Here is the link to our online examples containing the most common scenarios you may encounter. If we missed something please tell us so we can add it as well.

    Regarding the API documentation it is not yet included in our online help. We are in the process of incorporating it as well.
  • Ben Hayat 21 Jan 2011
    Excellent Stefan; Yesterday, I was recommending Telerik toolkit to a company (which he is about to buy now) and the RADDomainDataSource and it's powerful collection was my main point. He was under a wrong impression the difference between MSFT DDS and Telerik DDS.

    Once the docs are complete, please post a blog, so I can pass it along.
    Thank you for your cooperation.
    ..Ben
  • Keith 22 Mar 2011
    Can you give me any pointers on creating a version of the VirtualQueryableCollectionView to use a QueryableDomainServiceCollectionView?  It does not seem like the VirtualQueryableCollectionView has overridable properties so I can't just inherit that class.  You talked about some extension methods.  What extension methods are available to make this easier?  Thanks.
  • chadbr 05 Apr 2011
    I hope this will soon support some of the new silverlight 5 reflection API's

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)