locked
Design isuue. RRS feed

  • Question

  • hi guys

    i have to start a new project (silverlight based), but i am unable to find a standard and latest   design structure,
    should i use L2s or EF, i want to follow to n-tier architecture ,there are many sample applications i have seen but there
    WCF services are   included in the web application   why ?but i want my WCF services in the separate project ,
    am i thinking in a right way ? please any help , thanks , regards.
    Sunday, November 29, 2009 11:01 PM

Answers

  • The answer is it DEPENDS.

    1) what is your timeframe?  If you are planning a Q3 2010 release, then I would say use Silverlight 4+Visual Studio 2010+WCF RIA Services for a Silverlight n-layer application with WCF.  If you need something sooner, I would use Silverlight 3+Visual Studio 2008+WCF Data Services (right now its ADO.NET Data Services 1.5 CTP 2...which will be released in a few weeks).

    2) EF plays nicely with ADO.NET Data Services and WCF RIA Services.  L2S is FANTASTIC for read-only type database access. EF is going to have more features and integrate better with future WCF business frameworks.

    3) If you are doing an API for services or your service tier is tailored to an SOA initiative,then absolutely make them seperate projects.  For example, if I am creating a WCF REST service as an API that one of my consumers is Silverlight..it definitely needs to be seperate.  However, if I am creating an LOB (line of business) app,then they should be together.

    4) Don't fall into the Microsoft "best practice" trap, because it is always evolving and changes.  Just 2 weeks ago at the PDC, they re-aligned all the service frameworks to WCF.  To me that was expected, but for some its a surprise.  

    Monday, November 30, 2009 1:20 AM

All replies

  • The answer is it DEPENDS.

    1) what is your timeframe?  If you are planning a Q3 2010 release, then I would say use Silverlight 4+Visual Studio 2010+WCF RIA Services for a Silverlight n-layer application with WCF.  If you need something sooner, I would use Silverlight 3+Visual Studio 2008+WCF Data Services (right now its ADO.NET Data Services 1.5 CTP 2...which will be released in a few weeks).

    2) EF plays nicely with ADO.NET Data Services and WCF RIA Services.  L2S is FANTASTIC for read-only type database access. EF is going to have more features and integrate better with future WCF business frameworks.

    3) If you are doing an API for services or your service tier is tailored to an SOA initiative,then absolutely make them seperate projects.  For example, if I am creating a WCF REST service as an API that one of my consumers is Silverlight..it definitely needs to be seperate.  However, if I am creating an LOB (line of business) app,then they should be together.

    4) Don't fall into the Microsoft "best practice" trap, because it is always evolving and changes.  Just 2 weeks ago at the PDC, they re-aligned all the service frameworks to WCF.  To me that was expected, but for some its a surprise.  

    Monday, November 30, 2009 1:20 AM
  • thanks.

    I am following the RIA services.

    but i am confused how can we say it a n-layer , because domain , services(business logic)

    is together into one single project , but i want my business layer , dal ,seperate in each project as it is the convention in my 

    company , how can i do that ?

     

     

     

     

    Monday, November 30, 2009 6:52 AM
  • Hi,

       You can of course build everything from ground up.

       For example , you can build your own wcf service application and host it in a web application.

       As long as the configuration is right, SL appliaction will communicate with it properly.

       The only difference is that usually the ui just invoke DAL layer objects' method to get data.

       But now you need to fetch data in wcf and send it to the client. 

    Best Regards

    Wednesday, December 2, 2009 1:27 AM
  • Just use the DomainSerivce in WCF RIA Services as the Service Layer, let the operation method make calls to you business logic methods located in a separate class lib. Take a look at this blog post: http://weblogs.asp.net/fredriknormen/archive/2009/11/28/wcf-ria-services-and-a-guide-to-use-dto-presentation-model.aspx It will show you some examples how you can do it..

    Wednesday, December 2, 2009 1:55 AM