Thursday, December 17, 2009

WCF RIA Service project notes

  1. I suddenly realized why RIA Service project solution has such strange structure which requires
    common source code to be shared between server and client projects: this common code must be
    compiled against different DLLs on the server side and on the Silverlight side.
    They probably decided that this is good for all types of clients.
  2. To share my RIA Service:

    1. Copy *.Web project to IIS (say into dir ProFilerNetSrv)
    2. Create file crossdomain.xml in the root
    3. share *.DLL and *.Web.DLL,
    4. create Silverlight project and add correspondent references.
    5. access service using virtual name:
      ProFilerContext db = new ProFilerContext(new Uri(@"http:///ProFilerNetSrv/ClientBin/ProFilerNET-Web-ProFilerService.svc"));

  3. Auto-generated data object model on the server is different from data object model on the client.
    I understand: they were created by different groups that never seen each other.
    But this is a shame for Microsoft. In my opinion.
    Simple sample: client has OnCreate() and default constructor, server does not.
  4. Still too crude. Referencing as WCF service it expose only two functions out of bunch.
Probably have to wait till version 3, though there are no much alternatives. Will look at CSLA.

No comments:

Post a Comment