Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

We have a large project that has nearly 20 modules on it. We want to use WCF for the business layer.

We have thought of three ways to implement WCF our project:

  1. Use only one datacontract and one operation contract. Send ClassName, MethodName to operation and create class by reflection then invoke the method in WCF side.
  2. Put all the modules in one wcf application, and create their data contracts, operation contracts.
  3. Create a seperate wcf application for each module and host them seperatly.

We use web services because, we need call business layer in java and c#.

Which one is the best way? I need your ideas.

share|improve this question

closed as not a real question by gnat, Walter, Robert Harvey, Jim G., thorsten müller Nov 24 '12 at 8:47

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
-1: We want to use WCF for the business layer. Please tell us why you think that WCF is a good fit for your application. For instance, why is a DLL project insufficient? –  Jim G. Nov 23 '12 at 16:45

2 Answers 2

up vote 3 down vote accepted

Assuming that the 20 modules are not completely unrelated, the second way is the normal approach.

Ideally, you would like calling your services via WCF to feel very similar to calling methods in a DLL. That's the whole point of the WCF (and going back to earlier days, webservice) client proxies.

The first idea - using one contract and sending the class name and method name - is just horrible.

The third idea is just more work for no apparent reason, unless the 20 modules are so unrelated that it makes no sense for them to be in a single application.

share|improve this answer
  1. Don't, It will be a mess.
  2. If you need all modules everytime do it.
  3. On my side I have several services serving different usecase domain. I want them to be injected in my app through an abstract interface so our app can use local implementation, wcf distant implementation or anyother transport. It looks like this:

enter image description here

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.