Silverlight and N Tier Architecture
Ryan van der Kooy asks:
"I've been beginning to try to find out how a good architecture will work using silverlight 2.0. I've read that Silverlight 2.0 could possible offer a 6 tier design. However, having a bll in your silverlight app could possibly be exposed by anyone decompiling dlls in the client bin. Is this true?
I've also thought about how Business Objects will work in an app when they would (for the most part) be built, then serialized to be passed through a webservice. Perhaps i'm looking waaaayy to deep into it. Perhaps a simple client/server model will be best for a silverlight app? DAL connected directed Silverlight through a webservice? "
Sliverlight 2.0 applications should be "service oriented" applications. The fact that an application calls a web service does not make it service oriented. You should never have a business logic dll in a Silverlight application. Instead, expose business services on your web server. Business services expose the logical operations that your application is capable of performing... remember, the logical operations, not the physical operations (ie. PlaceOrder, not CreateOrder). These operations many times contain many physical operations like Create Order, Create Line Item, Send Confirmation Email, etc., but leave these details to your service. Generally, this will mean that your clients are telling you what to do, but not how to do it. By not having your application explicitly request that each minor step in the order placement process is performed, you are free to make fairly large changes in how you process orders without updating the client.