locked
need to implement an interface based business layer for silverlight/wcf/RIA services app. RRS feed

  • Question

  • as per this initial diagram  http://tinyurl.com/mgxbv9  ?

     do I create interfaces and classes for each interface within

        1.  separate Visual Studio projects?

        2.  the app_code folder within the asp.net project hosting the silverlight client .xap's?

     any examples anywhere? ideas? templates? articles? codeproject ?


    thank you.

    • Edited by hazz Thursday, July 23, 2009 12:58 AM
    Tuesday, July 21, 2009 5:58 PM

All replies

  • The microsoft silverlight site, http://silverlight.net/learn/tutorials.aspx has some great tutorials, including the answer to this question, if I remember correctly.

    Cheers,

    Martin.

    MCSD, MCTS, MCPD. Please mark my post as helpful if you find the information good!
    Friday, July 31, 2009 3:05 AM
  • Martin’s tip is helpful in particular this example http://silverlight.net/learn/tutorials/adonetdataentities_vb.aspx

    If I understand your question correctly: clients have their name stored in the web.config. The client application retrieves this string from the web.config and calls a remote wcf service. Each client has a unique select statement.

    First you’ll have to pass the client name as an argument to the service? With this name you want to find the package/assembly which contains the select statement for that particular client. In the WCF service. One solution is to use Unity http://www.codeplex.com/unity/ to configure which assembly to use for a particular client. This is called dependency injection, a great way to do component based development.

    If the select statement is as simple as select *from reportdate when client  = ‘client_a’ then I would just pass ‘client_a’ as an argument to the server and use it’s value to compose the query.

    http://www.paulgielens.com
    • Proposed as answer by Paul Gielens Friday, July 31, 2009 8:21 AM
    Friday, July 31, 2009 8:20 AM