Let make a litle case so that it is easy to explain my dilemma.
I have 3 service kind of loose from each other so that they can be run on separate machines or what so ever. They still need each other to get full picture.
Lets say we have a service for:
- StudentManagementService – Manage all student data
- TestManagementServide – To Manage all test that there are like C# exam
and stuff - StudentScoreService – Keeps score what grade who got on what test
So this is where my dilemma comes in: I want to build silverlight client. As I see it I have 2 options to comunicate to theese services:
-
Call theese services direct from my Silverlight application (From Client)
-
Call service on Silverlight Host/Home/owner site and from there all those services
As i see there as some advantages and disadvantages for both cases
Case 1:
- Every service needs to support
silverligth type security
(username/password in this case) - Every service has to have Silverligt
type binding (this my lead to coding
extra stuf into service) - No need for extra leyer like in case
2 - Cross Domain Policies
Case 2:
- You hava a leyer between you
Silverlight app en services that is
working like some kind of ruoter - You have extra leyer that translates
from silverlight data to other
services for optimal preformace like
net.tcp - No Cross Domain Policies
So what do others think? And can you speak from experience?
Thx
I prefer case 2. As you said, you avoid the need to tailor all of your services to make them Silverlight accessible. An extra layer is not hard to create, doesn’t incur that much overhead, and introduces a nice layer of decoupling- for example, what if the addresses of one of your services changes? With an extra layer, you can store and control that information purely server-side.