i have a project (Web Application) in c# like shopping cart and i have to build it in such a way it can be integrated in any other project to decrease work load.
so the functions of it can be used in best,secure and faster.
So what should i prefer WCF or DLL’s(Class files.)?
Thanks.
If you use WCF you will get a set of webservices that need to be hosted and can be called from one or multiple shopping systems.
Such a service layer would be a nice idea if you can have multiple shopping systems that share their backoffice. The service layer can then be reused for multiple shopping applications.
If that’s not the case and you want to only use reuse basic functionality, like a shopping card or a Product item, then you’re not talking about sharing a whole service layer but about reusing several classes. A shared dll would then be more appropriated.
Another thing to keep in mind, is that if you design your solution with a service layer you can always quite easily decorate it with WCF attributes to turn it into a WCF service. The consuming code will not notice this.
So it depends on the amount of code you want to reuse and if the new applications can reuse it out of the box, or if they have to make modifications to it.