Reputation: 1
Good Night guys,
I'm starting a project in asp.net, where initially not use wcf service but I want to leave you prepared for a future implementation services wcf between aspx and business layer.
Question:
Can I reuse the interface of business for wcf services?
My idea is while there are no services, create an architecture where the aspx will call business layer through a factory. All business class will implement a interface.
Later we will have a service for each business, so I would like to know if it's a good idea and possible use the same interface implemented for each business for the wcf service.
Implementing the same interface, the factory would decide whether it would return an instance of the business or an instance of the service. What do you think?
Upvotes: 0
Views: 140
Reputation: 3493
WCF requires class and method attributes to be declared on your interface, so you end up muddying the waters a bit.
I'm actually not a huge fan of WCF because of that and some other reasons. Service Stack is quite nice and allows one to easily expose a business interface via HTTP.
Upvotes: 1