?
Solved

Share ServiceReferences.ClientConfig in common assembly with multiple UI projects

Posted on 2010-11-09
3
Medium Priority
?
907 Views
Last Modified: 2013-11-12
Hi,
currently, I am designing a Silverlight application in which I want to have a common assembly that performs WCF web service calls, and also provides methods to process and handle data exposed by that WCF web service.

Besides this common assembly, there are several separate UI projects (XAPs) that shall make use of this assembly and its data handling methods. E.g. I would like to be able to call a method "GetUserData" defined in the common assembly (which in turn calls a web service function and processes the results) from each of the UI projects that reference the common assembly.

However, currently this requires me to copy the ServiceReferences.ClientConfig file defined in the common assembly to each UI project that wants to make use of it. Although this works fine, I feel a bit uncomfortable with copying this file around, as it creates duplicate code and potential versioning and maintenance issues. Moreover, you couldnt do so if you would like to reference a compiled common assembly outside your own solution in VS.

Is there a way to share or reference the ServiceReferences.ClientConfig from the UI project that uses it, or at least read the configuration info in this file on startup of the UI project, and then make the UI project working on this configuration.

Or does this concept mean a lack of architecture and design at all ?

Cheers,

Joerg
0
Comment
Question by:JCassardelli
[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
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 2000 total points
ID: 34099610
one way of doing it is move these binding configurations to a xaml file, and then at the silver light application start up , download this xaml file, read all the info and convert into objects.Have a factory to create you service connections , and in this factory use the object you created at app start up to create the connections.
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 34099611
not sure if i gave enough info to start with, do let me know if any more is required.
0
 

Author Closing Comment

by:JCassardelli
ID: 34255715
Sorry for coming back late, was distracted by other projects.

Your solution sounds reasonable, however, as its my first Silverlight project and currently all Clients that might use it are under my/team control, I decided to keep it simple for the time being. At the moment I stay with the VS solution to add the ServiceReferences.ClientConfig file from the common data services class as a link to all projects that want to consume this common data services class.

I found that, as a Silverlight / WCF beginner (moving from "classic" ASP.NET) there are too many other hurdles to be overcome before I should start a fully-fledged code implementation at this point.

Thanks nevertheless for your useful suggestions
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

771 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