Share via


DataSet and Silverlight

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: https://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: https://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: https://msdn.microsoft.com/en-us/magazine/cc794260.aspx. We welcome any feedback from the community on this.

Thanks,
Chris Robinson
Program Manager - DataSet

Comments

  • Anonymous
    May 26, 2009
    PingBack from http://microsoft-sharepoint.simplynetdev.com/dataset-and-silverlight/

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

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

  • Anonymous
    May 28, 2009
    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.

  • Anonymous
    May 28, 2009
    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.

  • Anonymous
    May 29, 2009
    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.

  • Anonymous
    May 31, 2009
    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.

  • Anonymous
    May 31, 2009
    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.

  • Anonymous
    June 01, 2009
    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

  • Anonymous
    June 01, 2009
    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

  • Anonymous
    June 01, 2009
    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.

  • Anonymous
    June 02, 2009
    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).

  • Anonymous
    June 02, 2009
    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.

  • Anonymous
    June 03, 2009
    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

  • Anonymous
    June 04, 2009
    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.

  • Anonymous
    June 07, 2009
    Daily tech links for .net and related technologies - June 8, 2009 Web Development Using ASP.NET Routing

  • Anonymous
    June 09, 2009
    The comment has been removed

  • Anonymous
    June 09, 2009
    Apart from the dataset as a parameter. I need to pass a collection of key-value parameters (this could include the workflow string) Currently, I use 2 ways to do this: On the web client calling a web service, I create a javascript array and process as follows on the server: [System.Web.Script.Services.ScriptMethod] public Dictionary<string, object> GetData(object jsBus) {  Dictionary<string, object> ht = (Dictionary<string, object>)jsBus; ... } Sometimes I pass the collection both ways. The second way with Winform as client, is to use a JsonSerializer and pass my key-value collection to the server as a string: public DataSet GetData2(string flow, string json) ... Before I used xml to pass the collection but with JSON my payload is much smaller. So besides needing to pass a dataset to the service, a key-value collection or JSON object to string is needed.

  • Anonymous
    June 09, 2009
    The comment has been removed

  • Anonymous
    June 09, 2009
    If I had a method: public DataTable GetCustomers(); and I needed to get orders, I would need to create a method: public DataTable GetOrders(); recompile the webserivice, publish... have to update the client proxy... etc.  Lots of work. However, with the generic approach I described. All I have to do is create a workflow script(using a tool I have) publish to the web service workflow store (Can be as simple as saving a file). The for the client, create a method, add some params including the workflow name as a string and I'm done. I do not have to focus so much attention on the plumbing. Microsoft, has coming along way in helping to take care of the plumbing. But lately, I have heard of 3 companies that may have to go back to doing some of their own stuff due to missing parts.

  • Anonymous
    June 09, 2009
    Sorry, did not mean to go on and on about the genericness that I wish we could have... I just hope that no matter what the method way... DataTable is non-typed. So we can access collections like: dataTable["Tablename"].Rows[0]["Fieldname"].ToString(); etc....

  • Anonymous
    June 10, 2009
    The comment has been removed

  • Anonymous
    June 10, 2009
    Thank you for your suggestion. And I can understand the problem it would create if it was done wrong. However, my experience is the other way. Implementation and maintenance is a pain because of all the "coding" we have to do.  Since we cut our actual code by 1000s+ of lines there is less to worry about. In any case, it is up to the customer to decide. I have done both since 1990... and strong typed back further. We supply 2 types of software to our customers. One type using strong typed would be ok. The other type is for maintenance. They want to type a select statement on the client and do basic edit in a datagrid. They do not accept: Just a moment while I go code this.

  • Anonymous
    June 14, 2009
    I'm very disappointed with the RIA samples (not sure about the other data access in Silverlight), very slow.  I'm wondering if it is because of all the object bloat.  I'm sure coding a Dataset like object would be much easier and more performant. Our asp.new ajax via server methods is almost instant. Silverlight RIA is like 10 seconds slower.

  • Anonymous
    June 16, 2009
    Thanks for all the comments on how your interfaces work Donald. I do think as a previous poster indicated that the generic interface that you use can lead to difficultly of understanding the interface. However I understand how there are times that developers want flexibility. Thanks Chris Robinson Program Manager - DataSet

  • Anonymous
    June 23, 2009
    New problem.  How can I do this without a non-typed generic dataset? Our customer wants to import an Excel spreadsheet(xml format), display the contents in a datagrid and if everything is ok, post the results back to the web to be inserted into a database. They want to control creating the db table and structure of the excel spreadsheet.  In other words, they do not want to have to call us to do any coding. I would like to use Silverlight to do the heavy processing as doing it in asp.net usually times-out.

  • Anonymous
    June 27, 2009
    Hi Cris, You must considered that many Legacy Applications into WinForms that do extensive uses of dataset untyped/typed. I have pull of services (>850) that uses dataset untyped with UI that consume it's with databing.   I forced to not use Silverlight  OR migrating full presentation and bussiness layer. It's must be an paradigm option For developers Not of the imposition of infraestructure. thanks, Jorge

  • Anonymous
    July 15, 2009
    The comment has been removed

  • Anonymous
    July 17, 2009
    Hey Jorge, We have been thinking alot about the exact scenario you are brought up. I am aware that companies have invested heavily in DataSet business logic. There is business logic in partial classes through dataset events and also through other Business logic adapter classes. I have been prototyping a design to proxy a set of DataSet business classes to Astoria. I believe that this will satisfy many of the needs that developers have. As I have said before we intend to deliever this to codeplex within the next 2-3 months. Thanks Chris Robinson

  • Anonymous
    July 19, 2009
    New problem.  How can I do this without a non-typed generic dataset? Our customer wants to import an Excel spreadsheet(xml format), display the contents in a datagrid and if everything is ok, post the results back to the web to be inserted into a database. They want to control creating the db table and structure of the excel spreadsheet.  In other words, they do not want to have to call us to do any coding. I would like to use Silverlight to do the heavy processing as doing it in asp.net usually times-out

  • Anonymous
    July 22, 2009
    Hi Chris, Could you look at this: http://silverlightdataset.codeplex.com Thank you Vitaly Laskarzhevsky

  • Anonymous
    July 27, 2009
    Consider in an example like creating a fully functional front end for SharePoint or CRM -- two systems that have highly flexible metadata and allow the end users to configure and customize at great lengths. Take the scenario of a creating a Silverlight front end for a custom list in SharePoint.  Since the definition of a custom list in SharePoint is completely up to the end user it can contain any number of fields.  Since each field has sufficient metadata associated it should be possible to create a rich interface for working with the data.   I am curious as to what are your current thoughts on allowing the developer to expose something like this to a front end platform like Silverlight.

  • Anonymous
    July 28, 2009
    Ridiculous... I've been supporting C#/.NET for years now since 1.0, and recently stepped into a job where my primary first task (unbeknownst to me during interview) would be coding a drill-down dashboard in Flex/Java/BlazeDS/Spring/Hibernate/Tomcat, which is a bit ridiculous given the number of toolsets needed to bring in data into a simple reporting application that will do no persistence. I haven't done much research into Silverlight until recently because I mostly did C#/Winforms development in the past, but I assumed that it would be a less heinous stack of tools to develop with and train the business on. No such luck as I've found out according to this post, the constraints look the same as Flex, and not even just that, while trying to get Visual Web Dev Express 2008 sp1 to do a Silverlight test, the IDE fails on XAML creation (Microsoft.VisualStudio.Xaml.dll error, reinstalling did not help).  This Silverlight development venture for me has been a trainwreck disaster.  I thought the nice thing would be that IF I could get the Silverlight install working and running in VS then I wouldn't have to go through XML/SOAP or some patchy binary format like AMF to get simple data from an Oracle server like I would with Flex.  Now I'm seeing here that's not the case, it's just as bad.   It's no wonder to me why DevExpress and other vendors haven't come out with a Pivot Table control for Silverlight yet.  It wouldn't make any bit of sense with the performance hits from ORM overkill, especially in the kind of applications I find myself often tasked with where it makes absolutely no sense at all to have that extra layer, and just makes it more difficult to perform reporting tasks because usually data pulled in from a large data repository is queried and summarized using SQL expressions and statements (e.g. GROUP BY, WHERE, etc).   I've never worked at a company that didn't have some large data repository of transactional data with millions maybe even billions of records in a single table with 80 fields or more.  Usually what an IT group or reporting group may want to do is create an end user tool that allows a user/manager to query databases and perform some limits analytics on transactions, without having the security concerns of having them hit a production database and maybe even write to it if they don't know what they're doing, and it effectively gets rid of ad hoc reporting tasks and apps to perform redundant functions.  A customer may want to be able to dig into a very small fraction of that data to do an analysis on a few transactions without pulling in all 80 columns and 1 billion rows, but in order to do that they need a dynamic solution which I'm sorry to say ORM is NOT.  What's sad is that I could have done all of this and have before pretty painlessly in a C#/Winforms/ADO.NET app with DevExpress's DataGrid and PivotTable that gives the user a selectable list of fields to bring in, and allows them to pull in data based on a set of predefined filters and selectable time ranges.  Using Silverlight's methods, this would be a huge undertaking. This is very disappointing, I've already uninstalled VWDX 2008 sp1 on my machine at the office.  Please stop selling the world that this stuff is the "latest and greatest" when it's clearly not and it limits the developers.  It's created a culture where managers now want an RIA for everything but clearly that's not the solution for all problems.  You guys were doing fine around 2005 in the 2.0 era, but since then MS has been losing touch with its customer base I feel and you're imposing unreasonable constraints on developers.  I'm not knocking the ORM approach when it makes sense: i.e. you have total control over your data in your environment to create your own tables, you have an application that needs to persist records back to a database, and you have an application that doesn't need to support large scale production data.  However, clearly ORM doesn't solve every imaginable problem space, and there should always be access to the original ADO.NET methods in any .NET technology.  It's sad that projects exist like the one linked above for patchworking in the enabling of ADO.NET technology into Silverlight, it defeats the entire point of having a robust .NET framework.  It just shows that the approach you guys are taking is not in the best interests of all developers, and it's one of those things that worries me about the future of .NET-based technologies since developers will always move to adopt the technologies that will tackle the lion's share of their problems. Oh well, there's always ASP.NET+Ajax with its flakey browser support I guess...

  • Anonymous
    August 21, 2009
    Hi guys, Silverlight DataSet (http://silverlightdataset.codeplex.com) supports binding to DataGrid with AutoGenerateColumns="False" now Vitaly

  • Anonymous
    October 05, 2009
    The comment has been removed

  • Anonymous
    October 08, 2009
    The comment has been removed

  • Anonymous
    October 31, 2009
    The comment has been removed

  • Anonymous
    December 14, 2009
    Silverlight DataSet project was moved to http://silverlightdataset.net Vitaly

  • Anonymous
    December 15, 2009
    I'm hopefuly about your dataset project Vitaly :)  Thanks for releasing it free.  I won't have time to use it for a while, but I'm looking forward to giving it a spin in the next month or two.

  • Anonymous
    December 22, 2009
    I can only add to the general complaint about missing datasets. Our web service uses strongly typed dataset as interface. Service response to particular request is returned as strongly typed dataset which really saves development time while preserving strong interface definition. Now we added silverlight client and our work is going to be doubled cause we have to write special interfaces just for the silverlight client. I do not understand what was the reason not to have them? ADO.NET and datasets are used in most database related applications. I hope we can find some quick and easy workaround...

  • Anonymous
    January 03, 2010
    I'll have to add my disappointment to the other remarks here.  As a business application developer, nothing is more important than effectively managing the relational data in the enterprise database.  ADO.NET's dataset and typed dataset are incredibly productive tools for doing this.  What good will Silverlight be to me without them?  Nothing.

  • Anonymous
    January 19, 2010
    The problem is I find is that there are several circumstances where having a 'contact first' model to be a burden. Think of something like custom reports. No one wants to write a data contract for every single report definition that may come up in an application. The ability to use datasets is critical IMO for any data centric application.

  • Anonymous
    February 03, 2010
    Hi guys, ComponentOne provides a dataset implementation in its Silverlight suite. See it here: http://www.componentone.com/SuperProducts/DataSilverlight/ Regards

  • Anonymous
    February 16, 2010
    The comment has been removed

  • Anonymous
    February 26, 2010
    Unbelievable.  The idea of not having DataSet is completely ridiculous.  My company has a custom, generic WCF service which returns DataSets, and implements some pretty complex logic for caching and security.  We use it on a very large number of different projects.  So instead of having to reinvent the wheel for a new client, we reuse this WCF service, and it has a standard API like "GetData(string storedProc)" and so on.  It works great.  And it returns DataSet, which we can then cast into strongly-typed DataSets on the client, and the service doesn't have to know of their existence or to be updated/recompiled. Without DataSets, we are in big trouble.  Since it is a generic service, we can't add DTO or strongly-typed objects/classes to the service.  Because each project is different.  We have databases with hundreds of tables each... Way to go MS.  I swear, they are pushing away developers who work on REAL ENTERPRISE level applications.  All the new technology works great (such as Linq) if you are doing some small-time single project.  This whole Silverlight and DataSet issue is just another nail, following the whole Linq idea, which is also "small-scale".  We have thousands of stored procedures which are optimized based on indexing on SQL-Server, why would we ever want to use Linq, it will never be as fast... sigh

  • Anonymous
    March 17, 2010
    The comment has been removed

  • Anonymous
    April 14, 2010
    @Chris Robinson Hey Chris, I hope that you will make Datasets available in Silverlight 4. All our front-end applications consume webservices with  untyped datasets  as input parameter and return value. We have invested a lot of money into these webservices. Unless Silverlight can use Datasets / Datatables, we will not move over to silverlight. I cannot understand why Microsoft refuses to put datasets / Datatables in silverlight...this is really a blocking point in adopting Silverlight. Form this thread, I see that a lot of developer are in the same situation. Please, please reconsider you decision

  • Anonymous
    April 20, 2010
    The comment has been removed

  • Anonymous
    May 06, 2010
    All our customers have their own data modals, and we cannot use ORM or Entity framework. Alternatively we would like to use DataSet for the followings:

  1. Communicate with server via WCF;
  2. Host ViewModal in SL4 client;
  3. Bind DataSet, DataTable, DataView with SL4 UI;
  4. Offline support, storage and serialization;
  5. Share and reuse some queries, and stored procures.   The DataSet, DataTable, and DataView are dynamically generated on the server, and combine both Business Object info and the metadata for various purposes on SL client. We used DataSet on the above five tasks with WPF, and would like build one for SL4 or SL5.
  • Anonymous
    May 11, 2010
    I too am in favor of dataset support in Silverlight.  It is simply too big a task to reengineer all the tiers of an application to use a Silverlight front end.  If I could just address the interface tier and get Silverlight to work with my existing middle tier, then I would adopt Silverlight.

  • Anonymous
    July 05, 2010
    The comment has been removed

  • Anonymous
    November 09, 2010
    Chris, do you have an update on your last ideas/implementations? I do not want to repeat all the opinions here - MS is simply wrong on not implementing datasets!

  • Anonymous
    November 09, 2010
    Chris, do you have an update on your last ideas/implementations? I do not want to repeat all the opinions here - MS is simply wrong on not implementing datasets!

  • Anonymous
    January 08, 2011
    I checked back after 9 months since my last post, and found nothing to assure me that Microsoft is taking any notice of us at all. The recent SL announcements by MS seem to have ignored our requests for dataset support?

  • Anonymous
    January 09, 2011
    The comment has been removed

  • Anonymous
    March 04, 2011
    I thought I'd check in, a year later. Nope, it justa aint gonna happen. Time to give up and move along.

  • Anonymous
    July 13, 2011
    The comment has been removed

  • Anonymous
    August 18, 2011
    So one who wants to use DataSet with Silverlight should try Mono's opensource DataSet implementation maybe or try silverlightdataset.net/.../Default.aspx. Alternative is www.componentone.com/.../DataSilverlight but is very expensive. Not sure if aspectize.com/Default.aspx has some alternative too (mentioned in this post comments). Else stick with Windows clients and full .NET via ClickOnce (also works in Mozilla) and forget Silverlight

  • Anonymous
    August 19, 2011
    silverlightds.com btw seems dead (shows some landing/error page)

  • Anonymous
    June 11, 2012
    Very Well ,i am just stat using Silver light  and i am hanging around the few projects but i have a problem  with data-grid . how we will bind  those data which generates dynamically like Xl Sheet . so i found we do not have any method f or that. why we are limited with predefined List with pre define columns?

  • Anonymous
    February 21, 2013
    Very dissapointed that you will not support datasets,  Giving three more frameworks to learn is a non-starter.  This is why so many are flocking away from Microsoft.

  • Anonymous
    October 07, 2013
    You may get some mileage from JSON.NET which can convert between JSON and DataSet and DataTable.