create service provider to access service either through host or service directly

I have one issue when creating SOA using wcf. We have web client and other clients (outsider).

Web -> Host (WCF) -> Service (Contracts) -> Business -> Data -> DB
For web, since it sits in the same web server with the service, instead of calling thru host, i can just directly reference it to service, but then it becomes coupling with service, but advantage will be faster. What do you think? Can I also create a project, where web reference that project. This project basically will either direct me to service directly or can be through host, depends what web tells this project to. Is it also possbile? how to do this?
johndennyAsked:
Who is Participating?
 
apeterCommented:
If  separated also, i guess it will be near your web server.

It is good idea but, if you going to user any other binding other than bascihttpbinding...how this extra layer is going to accept and parse it.Isn't that your reinventing the wheel here?

0
 
apeterCommented:
Better option is web having reference to wcf directly. As you said, it is good for performance. In case of outsiders, they can come via host.
0
 
johndennyAuthor Commented:
you are right, what if creating a project like i mentioned, to have option to go via host (if service later separate from web server).  How to achieve that?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.