Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

C# - WCF + WPF + SL shared lib

Posted on 2010-09-04
3
Medium Priority
?
416 Views
Last Modified: 2012-05-10
Hi,
i am currently developing a Client/Server achitecture based on Windows Communication Foundation technology.

In my solution, i have a Self-hosted WCF service in a WPF Application, a WPF client application, a Contracts/Data library with severals interfaces and classes used as servicecontract and knowntype in the WCF service.

For now, everything work when connecting the WCF service with the WPF client with the contracts/data library as reference in both.

But now im facing a problem where i need to create a silverlight client that will re-use the same contracts/data library and be able to communicate with the WCF service(just like the WPF client is doing it).

Since we cant use Windows based library as reference in a silverlight application, what should i do now?

Thanks in advance!
0
Comment
Question by:Enill
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 11

Expert Comment

by:lenordiste
ID: 33607843
I would advise you to follow SOA/SAAS guidelines if you are building a service that should be able to interact with different client types.
That said, everything should be fine in the scenario you described above as long as the "shared library" only contains contract information. Any other information should not be shared and should only be known to your WCF service.

what are you calling "windows based library"?
0
 

Author Comment

by:Enill
ID: 33608970
By '"Windows based library" i mean that a library project created in Win32/WPF cant be used directly in a silverlight application by adding it as reference.

This is causing a problem where the same type of object need to be managed on silgerlight side than WPF client side(and server). Those types are my "custom" made communications packets classes.
0
 
LVL 25

Accepted Solution

by:
apeter earned 2000 total points
ID: 33611200

1.  Create a project, Create one more project of type "Siliverlight ClassLibraray" in the WCF server solution file.
2. Add files. Right on the above silverlight project and select "Existing item" . Select your existing Windows based library file. But before client "Add" button select the down arrow and select "Add as link".

In this way you have one source. When you update in windows based library, ur Silverlight libraray also will be updated automatically every time u build. The will create a Silverlight DLL. Now point to this DLL in your silverlight application.

Hope it helps.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question