简体   繁体   中英

Architecture design for an MVC 5 application

We are building an MVC 5 application, a consultant has come up with a high level architecture, not sure that it is the best as it uses SOAP, I thought the current standard was REST. Does anyone have any recommendations? Guidance? Best practices??

The application basically is to be used by authenticated users, who can perform certain functions like update details. Buy things using a merchant gateway etc. Also logging and testing is important as well. I know this might seem like a general query, wasn't sure where to ask

在此处输入图片说明

Well it's all depends on the application you are developing.

WCF is needed for advanced authentication, transactions, binding scenarios. If you don't need it, you can go with MVC Web API for Customer Portal WebServices . Web API is very easy to use, it is flexible and fast. Of cource REST is better. Don't use SOAP if it is possible. REST is MUCH easier to integrate with. Not only for C# client but also for ANY client you need - HTML, Mobile etc.

Regarding DAL: I see recommendation to use Stored Procedures. I am not a fan of stored procs, but sometimes it is the best solution. So I would recommend to use Entity Framework if it possible and stored procs with Entity Framework if you cannot avoid using stored procs.

Looks like the application is going to be pretty large. Business Entities is a notion that architecture will be domain driven(DDD). Take a look at CQRS pattern. It is a very good alternative. With help of CQRS you can avoid typical issues of DDD. When you need a little different models for querying and for commands like Create or Edit.

Soap would be the format used to transmit the data ( XML formatted data transmitted to or received from a client or service. Rest has more to do with how data is passed to the service as a parameter of a url eg. http://sample service/method/data

Perhaps there is a requirement that the service shown in the diagram is owned by a third party ( like the payment gateway ) and they have chosen soap as the transmission protocol.

If the service is yours, I would ask the consultant why soap and WCF vs webAPI and JSON. Not enough information presented to understand what the constraints on the design are.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM