Attention: We are retiring the ASP.NET Community Blogs. Learn more >

MSDN Magazine - Architecture of an Autonomous Application

There is an article in July's MSDN Magazine that even if it talks about Fiefdoms, it discusses the issues I've been talking about on how to map Entities to DataSets.

Start reading in the 3rd paragraph under the 'XML-based Web Services' subject ;).

 

2 Comments

  • I have to sadly confess that the article was in my opinion pointless. Why do 4 different statements have to be executed to populate a correctly defined business entity?





    The article has quite a few gaping holes.





  • I thought the article was great and explains a lot about how SOA and datasets compliment each other. I have found a lot of value in using typed datasets for doing the same kinds of things he mentions so i can see where he is coming from. Can you do these types of things with domain model? of course. but i think his point was that you have to aggregate your data in a DM by creating several realated objects (with possibly more data than you need) and then formulating the aggregate. So you in essence have normalized data again at the entity level which need to be de-normalized for the client. So why not treat your DB as your domain model since it closely (or loosely) represents entities and denormalize the data in your query which populates a dataset representitive of this denormalized form. So he stesses having very flat datasets which are focused on the need and require less calls to the db.



    Why less calls to the db? Well typically each entity class would have it's own method for loading based on its properties... this loading method would typically be encapsulated from other load operations done on other entities. So if i needed several entities to gather the data required for my emissary, i would call the load on each one. Could it be done in one call? of course, but typically it's not?



    My biggest objection to this model is that it lacks the ability for inheritance which can be very limiting imo. I also think he might be little narrow in his thinking that only datasets can take advantage of the XML-based API's in the framework. You could serialize/deserialize an entity class to XML for transport very easily as well in the framework. I also struggle with datasets when in comes to passing a single item out. Seems (and is) terribly ineffecient. :(



    But in the web world (which is his focus) the attraction of being able to send large collections of relevant data over the wire at one time is appealing and very effecient... and can be done very easliy by taking advantage of all the built in functionality of datasets.

Comments have been disabled for this content.