DataSet and Silverlight

DataSet and Silverlight

  • Comments 51

I’ve been asked a few times lately whether DataSet is or will be supported in Silverlight, so I thought I’d post the answer here.

There are no plans to add DataSet into future releases of Silverlight. However we are investigating work to bridge existing DataSet investments to new data technologies. Below are three different approaches that can be used to build data-centric applications in Silverlight now.

ADO.NET Data Services is the primary approach to creating data-centric applications in Silverlight. There is a client api within Silverlight for accessing these RESTful Services. ADO.NET Data Services exposes data through ATOM and JSON which are standard technologies when building rich internet applications. Here is a link to get started on this technology: http://msdn.microsoft.com/en-us/data/bb931106.aspx

In addition to ADO.NET Data Services, there is .Net RIA Services. The project aims to allow developers to build rich internet applications on Silverlight using Visual Studio. This isn't a released project yet, but there May 2009 preview that developers can use. Here is a link to this preview: http://silverlight.net/forums/53.aspx.

Lastly, if there are requirements to expose data through Web Services rather than RESTful Services, we would recommend using WCF. These services can be accessed within Silverlight and would expose specific data contracts, not DataSets. Here is a link to get started on this approach: http://msdn.microsoft.com/en-us/magazine/cc794260.aspx. We welcome any feedback from the community on this.

Thanks,
Chris Robinson
Program Manager - DataSet

  • PingBack from http://microsoft-sharepoint.simplynetdev.com/dataset-and-silverlight/

  • If you are looking to follow this series, be sure to subscribe to my RSS feed at http://feeds.jasongaylord

  • If you are looking to follow this series, be sure to subscribe to my RSS feed at http://feeds.jasongaylord.com/JasonNGaylord

  • The DataSet has many parts to it. Which parts are people asking for? That should be clarified first. In one blog some, like myself, were asking for Non-Typed Datasets and not necessarily the type that has a dataAdapter built into it.

    What we want is a way to call a web service specify a workflow(some kind of selection spec) which puts the data in a dataset and returns it to the client.

    Once on the client we can set the datasource to the dataset, datamember to the table and we are set to edit. We can edit the rows and have them marked with meta data as to whether they are inserted, modified and/or deleted. Cache the changes and/or submit the batch of changes back to the server for updating the database. Optionally, the dataset could be saved as a diffgram to be used for debugging, archiving, etc.

    A minimum of 2 web service calls could handle an unlimited amount of datasets:

    public DataSet GetData(string workflow, object[] params);

    public DataSet SetData(string workflow, DataSet dataset);

    Show me how to do this with Silverlight: Create an app. do do CRUD operations on a datatable, compile it, deploy it. Then add some kind of script, xml

    config. that the client app can call and get a different table to do CRUD operations on WITHOUT adding code on the Silverlight app.

    I've heard of I think it was DevExpress that can do Anonymous types... I think that is a step in the right direction and something that MS should do.

  • This is a bad news. DataSets are best thing that happened to developers who work with Relationnal Data (that is nearly all developers).

    ADO.Net Services is the poor man’s way of working with Data, one Table at a time; While DataSets (many tables, many relations, constraints…) enable you to build complex and flexible business applications with little effort.

    I follow the EF Team Blog and see how they are struggling to implement Change Tracking, Data cache, and so on just to end with an Object Model that fits difficultly to the Data that is and will be Relational for the foreseeable future. I don't understand why people are so hostile to DataSets, the .Net framework without DataSets and with only EF as means of working with Relational Data is a real bad idea.

  • This is really good news. It’s time the Microsoft world starts to move away from data centric designed. The MVVM pattern is the only real way to build Silverlight (or WPF) based applications. DataSets are only good for what they were meant to be (In memory databases) and not data transfer objects.

    As far as how to handle change tracking, data caching, and so on. There are plenty of well known design patterns such as Unit Of Work and Repository that handle them.

  • Microsoft has always been about options. Implementing MVVM without datasets is not the only real way to build Silverlight and/or WPF based apps.  It is one way. MVVM can be implemented with generic non-typed objects(datasets or other) too and should be provided as an option. Don't force us to create a 1000 objects for a 1000 tables.

  • Who can do more can do less !

    DataSet can do the job of DTO with no effort. Don't you have the impression of designing twice your model, whereas it should concern the same logic ?

    I agree that MS power has been about options, and that we are loosing a real big opportunity to build Silverlight easily. I mean, for people used to work with DataSet, DTO and whatever MVVM pattern are quite hard to assimile. It is just a missed opportunity to get Silverlight more attractive to a lot of developpers, that feel very chilly today to move on WPF and Silverlight.

  • Just as one MAJOR clarifying point, DataSet will not be included in Silverlight, butit will always be in the .net Framework.

    Thanks

    Chris Robinson

    Program Manager - DataSet

  • One of the points I indicated in the blog post was that we are working on bridging DataSet to other technologies. Currently we are working on a way to leverage existing DataSet WebServices by putting an Ado.Net DataServices wrapper around them. The way we are achieving this is by implementing an interface called Data Service Provider using Ado.net Data Services v1.5. We will be releasing this code to the public so that this can be one way that people can move foward to leverage existing DataSet webservices for Silverlight. I will send out more details when we release this.

    Thanks

    Chris Robinson

    Program Manager - DataSet

  • I know the dataset will not be included in Silverlight... but sure would be nice if it was supported as an optional addin library on the client for databinding non-typed data and for persisting to diffgram xml.

  • Of course, we hope that DataSet will always be in the .Net Framework ! But, as Donald said, when we use DataSet as non-typed data container to support generic DataBinding, we would like to make it work also with SilverLight. And ADO.NET services won't help us to do the same things (I mean generic Relationnal DataBinding on non-typed data).

  • Where can we get more information about this: Ado.Net DataServices wrapper?

    Will it allow us to use a single method for getting different table data as this method?:

    public DataSet GetData(string workflow, object[] params);

    And update different table data as this method?:

    public DataSet SetData(string workflow, DataSet dataset);

    If it is just to wrap the dataset and turn it into a strong typed class that we have to code for every table then I do not thing it is worth it to write the wrapper... I would rather just use the new way.

    However, if it can be generic like this:

    public GenericObject GetData(string workflow, object[] params);

    public GenericObject SetData(string workflow, GenericObject genericObject);

    then I am interested.

    I want to write software not hardware.

  • Donald,

    We are currently working on something that seems very close to what you describes.

    I don't have any doc in english, but if you mail me (nico[at goes here]aspectize.com), I can describe what we will release in a few week (DataSet/DB mapping with powerfull client Relationnal DataBinding).

    Nico

  • Was just playing with Quadrant.  I would love to simulate that kind of interface for working with databases.... however, without a generic non-typed dataset I'm not sure how it could be done.

Page 1 of 4 (51 items) 1234
Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post