I first built the web app, and a bunch of class libraries.
- The web app uses the class librares.
- The mobile app uses the expose public web service.
Now i’m thinking, since the mobile app has much of the same functionality of the web app, maybe I should make the web app also use the public web service?
Would it be a good idea for the web app and mobile app to use the same public api?
Please help me decide and let me know why it is a good idea or a bad idea!
thanks guys
EDIT: I guess if I have the web app use the public api, then performance may be degraded? since it has to go thr the network stack, and also need to provide authentication hmm ….
The disadvantage of using web service by a web application makes it slow, due to another request (althought even both are on a same server) and also cause performance issues. so it’s not a good idea due to its disadvantages.
I have not tried the WCF with ASP.NET, but i guess it is better to use WCF with ASP.NET through TCP protocol. Even without TCP, it’s faster than web service.