Will .NET RIA Services be the Silver Bullet!
I have spend some time on the Silverligth.net forum and in the .NET RIA Services thread.. and just created a replay on a post about RIA Architecture and design.. I have some concerns regarding to how developers are using .NET RIA Services etc.. maybe it’s not a big deal.. but I will try to share my concerns and made a copy of my replay and created it as a blog post. I look forward to your comments. To get basic understanding about about my view of a RIA Architecture and also .NET RIA Servers, I prefer you read my two other blog post before you read this blog post.
RIA Architecture with Silverlight in mind
A different view of the .Net RIA Services
Developers are so desire to use a perfect and great domain
model to work with. It will help us a lot..(I will claim
that a domain model is not a silver bullet, it's a way we
prefer to work these days, and I prefer it too). We are used
to work that way, we like to work that way.. so why not do
it and why not in a distributed system? There are some
technologies that tried to make sure we could work with
object in a distributed system, like DCOM, CORBA and RMI
etc. Now we have .NET RIA Services..
When I have
read threads in Silverlight.Net forum, I notice that
developers tries to create complex models and want a server
side model to also be used on the client side. Nothing
strange, it’s how we will work, right? So what is the main
problem? Well, developers creates complex models, and do it
in one place (on the server side), and the .NET RIA Services
can "copy" by using code-gen this model to the client-side.
Developers can still work with the entities as it was
locally, because it is what we want to do, it make it a lot
easier for use to build our apps.. we are used to it! But
one of the problems with systems like DCOM, RMI, CORBA and
sort of .NET RIA Services is that they tend to try and hide
the fact that we are actually talking across a network.
Everyone that uses these technologies knows that we are
talking across a network, but it’s so easy to forget about
it, because of the possibility to use object in a way we
want to. The way they hide it, is that we don’t need to care
about knowing about it. It’s the plumbing that is removed
from us. So we can create our model, and suddenly we have it
on the client side and can work with it as it was “locally”.
We have one place where we create our shared domain model
and we can forget about the network (not saying that
everyone does, but regarding to some post in this forum, I
think they are).
By adding inheritance,
lazy-loading (which we want to use, to solve some problems)
etc, will only make sure we try more and more to work in a
way we are used to, even with a distributed system, and we
will get blinded and don’t see the network. We don’t want to
see it, because it will affect how we wants to work, and it
make sure we can’t do what we wants to do.. so we just
remove it from our mind, we hide it, we don’t see it, we
pretend it wasn’t there. I love the sounds of it, it would
be perfect if we don’t need to think about it. Because if it
was never there, we can work in the way we want to work,
right?
As long as developers know and have the network in mind and
create a model based on it, I will be satisfied, but it will
probably not happen. The same mistakes have done before, and
we are only repeating our self. Designing a system that uses
both network capabilities and object oriented design
techniques to their fullest advantage is still possible and
desirable, and engineers will try to solve this. Some day
they may succeed, maybe the final version of .NET RIA
Services will be the ONE! But as long as there isn’t a
Silver bullet yet! I will try to remind people about the
network and the distribution.
EDIT: Only to not
get comments regarding the hidden stuff:
I know that .NET RIA Services team is not trying to “hide” the distributin, but the way people wants to use it, to solve a common problem, and what they are requested and tries to do, concerns me.. and what most developers wants (if it will be available), will make sure the distribution will become “hidden”.