Tutorial :Designing a WCF service to send back image information


I am designing an WCF service which will return a list of vendors for a search query. I need to send the logo's of these vendors to anyone who consumes the service. What would be the best way to approach this. Do i just send the image paths across or is there a better way.


Look at this for a possible solution to your dilemma.



There are lots of design implications in your question. Will the consumer of the service necessarily have access to the "path" of the image (I am assuming you mean an URI or UNC path)? If not, it is likely you will have to send the image with the response.

You could also separate out your services, one that would grab the metadata for the image and one that actually goes and fetches the bits of the image itself. You should also be aware of the size of the images and whether or not you truly "need" them. If you are sending images that a client would only see if they click on the results, for example, you might consider a more lazy loading approach.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »