More Layers = More Complexity
Join the DZone community and get the full member experience.Join For Free
we had an interesting discussion on the course a couple of weeks ago that i thought was worth summarising here. one of the key functional requirements of the case study that we run through is that the system should be able to distribute data to a subset of users on the corporate lan. now there are 101 different ways to solve this problem, with one of the simplest being to allow the users to access the data via an internal web application. since only a subset of the users within the organisation should be able to see the data, any solution would need some sort of authentication and authorisation on the data.
given the buzz around web 2.0, ajax and ria in recent times, one of the
groups decided that it would be nice to allow the data to be accessed
via a silverlight application. they'd already thought about building an
asp.net application but liked the possibilities offered by silverlight
(e.g. the ability to slice and dice the data interactively). another
driving factor for their decision was that the silverlight client could
be delivered "for free" in that it would take just as long as building
an asp.net application. "for free" is a pretty bold claim, especially
considering that they were effectively adding an extra architectural
layer into their software system. i drew up the following summary of
their design to illustrate the added complexity.
while i don't disagree that silverlight applications aren't hard to build, the vital question they hadn't addressed was where the data was going to come from. as always, there are options; from accessing the database directly through to exposing some data services in a middle-tier. the group had already chosen windows communication foundation (wcf) as the mechanism for exposing the data, but this led to yet further questions.
- what operations do you need to expose?
- which technology binding do you use?
- how do you ensure that people can't plug in their own client and consume the services?
in the context of the case study, the third question is important. the data should only be accessible by a certain group of people and we really don't want to expose a wcf service that anybody with visual studio could consume. this led to discussion about the use of ssl to secure the service, but ssl only secures the transport layer to stop data being looked at in transit. in this case, some thought needs to be given to authentication/authorisation of the service itself .
coming back to "it won't take longer than building an asp.net
application" then. in this situation, the benefits brought by the
additional silverlight layer need to be considered alongside the
additional complexity that's also been introduced. more moving parts
means more work designing, developing, testing and deploying. despite
what it might say on the box, nothing is ever free and you need to
evaluate the pros and cons of adding additional layers into a design,
particularly if they result in communication between
Opinions expressed by DZone contributors are their own.