views:

776

answers:

2

I am starting a new Silverlight 3 RIA application. Historically when doing my web development I have a solution with the following project structure.

Core - Generic and misc stuff. 
Model - Domain model in nHibernate
Services - Business logic, services and repositories
Web - Web using MVC

With my new project in Silverlight RIA it by default creates the Silverlight client and Web projects. The Silverlight project seems to map to the Web project and Web maps to Services & Model. Is this how people normally set up their Silverlight RIA projects, or how do you do it?

+2  A: 

Here's what I typically do for simple solutions:

Step 1: Create Web project - either a simple web app, or an MVC web app. Step 2: Create an SL app, and link it to the Web project for deployment and for the .NET RIA Services link.

For a more complex project, I have:

Step 1: Create a class library for representing my DAL, and entity types Step 2, 3: #1 and #2 from above.

Potentially if it makes sense, I'd split out the domain services and app logic into a separate project, or put it into the DAL assembly. Depends on what are the intended reuse scenarios... rather than hard/fixed rules.

NikhilK
A: 

Nikhil Kothari's weblog has a great article describing the architecture of an RIA Services app: http://www.nikhilk.net/NET-RIA-Services-Vision-Architecture.aspx

Nick Gotch
Yes, I have seen these. Thanks.
Craig