Koen about .Net

February 22, 2010

Reply to ‘The State of Data Access in Silverlight’

Filed under: Development — Tags: , — koenwillemse @ 11:28

Shawn Wildermuth wrote an interesting post about the state of Data Access in Silverlight. As I’m currently working on a Silverlight application which can serve as a reference architecture for applications using RIA Services, I think I can say something about that.

The ‘Add Service Reference’ kind of functionality which he points out could be very interesting, especially when working on large projects. The more projects there are in your solution, the longer it takes to compile, so this could potentianally improve the speed of development. I think it might be interesting in scenario’s where you have a simple model which doesn’t expose much functionality or information, other than what that client needs, but when working on a bit more complex applications, I wouldn’t want to expose my domain model outside the services.

The points he makes about Validation attributes, eager loading and navigation are not really points that are interesting for me (now). Reason is that I don’t want to expose my domain model using RIA services. As I look at it now, it exposes a lot more information than needed. So I use Dto objects to transfer information to the client with the simple validations which can be done using the attributes.

The point he makes about the loosely coupled application when developing with RIA services is true. There are some difficulties to overcome when working with it. It is especially difficult when you want to do development in a TDD way. For instance, to work with a MVVM pattern and RIA services for instance, in a TDD fashion, you will need to create an interface for the generated context so you can intercept calls to the framework. I will write about this in a future post.

So, wrapping it up, adding a ‘Add Service Reference’ kind of solution would be very interesting. Next to that, it would be a good thing if the generated code would be more TDD and mocking friendly. Right now it’s very difficult, because a lot of classes are sealed, or only have internal constructors (like the LoadOperation for instance). This results in the need to define some other ways to work around this.

EDIT: Right after writing this post, I found this blog post from Brad Adams about splitting the project in different solutions. Seems a reasonable work around.


1 Comment »

  1. Great Information. That sounds pretty cool. Really helpful thanks for the Article, Great job, Keep posting interesting matters here. Looking forward to it. Thanks and keep it up! All the Best.
    enterprise application development

    Comment by kevin matin — January 11, 2011 @ 10:58

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: