D
D
Devil Devil2016-08-13 10:22:18
API
Devil Devil, 2016-08-13 10:22:18

Implementing WEB API in MVC project?

Good day to all! There is an MVC project. Essence: information site, with authorization, and the possibility of CRUD operations. you need to add an API that would act as an intermediary between the data from the database and the business logic of the site. Give me an idea how to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jershell, 2016-08-13
@jershell

It's hard to say something, but look towards jsonrpc.
Specification - www.jsonrpc.org/specification
jsonrpc library for nodejs and browser - https://www.npmjs.com/package/simple-jsonrpc-js

S
Sergey, 2016-08-13
Protko @Fesor

I have an MVC project

If you have an MVC project then you shouldn't have any problems. We just add another bunch of controllers that will form the View and ask the model to do something. The model in this regard is not a "record in the database", but some kind of logic that should perform these CRUD operations.
Another thing is that YOU MVC can mean "well, I stuffed the logic into the controllers there and I just have a templating engine..."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question