Answer the question
In order to leave comments, you need to log in
Web Service: WCF or ASP.NET MVC?
Hello. What is better to use to achieve maximum speed and easy extensibility when implementing a web service that works with the database and api of other services, as well as to create your own api.
ASPNET MVC. WCF or both? And how to implement it correctly from the point of view of the project architecture?
Answer the question
In order to leave comments, you need to log in
It all depends on the project and application.
In general, architecture options might look like this:
This bundle is recommended for serious, high-load and cross-platform projects with serious security requirements. WebAPI (in fact, it will be a proxy for WCF SERVER'a) and MVC can spin on the same IIS server. WCF SERVER is better to keep as a separate service either on the same machine or separately.
The WebAPI layer can be removed if the service is more intended for internal use, where cross-platform is not needed and WCF SERVER is expected to have many different clients.
This architecture is suitable for 99% of Internet startups. The simplest and fastest in development, while not much inferior to the more complex options described above. And with the release of MVC 6, the need to run such a server on IIS will disappear and will allow you to run it on Linux.
Most likely, the latter option suits you better.
Why do you need ASP.NET MVC when ASP.NET WebAPI can work without it? WebAPI can be used for your api. Apparently, ASP.NET MVC is generally superfluous here, because it is for the UI. Here is more about your architecture question. Apparently it should be. Inside your model is wrapped in a model service. This service works with a DB. Then you attach your external service to the same service for working with responses to external requests and for calling external services. In general, the usual architecture, but without the UI / UX layer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question