Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4123

What is the VIEW in a backend REST-API?

$
0
0

I want to create a simple REST-API (or maybe later in combination with GraphQL).
PS: I'm using C#.NET Core / .NET-5.0 and PostGreSQL. Working with Rider with an "empty solution".

API-ControllerModelsServicesRepositoriesDatabase
RequestInputModelDataValidation, DataManipulation, IPODB-EntitiesSQL-Code
ResponseOutputModelDataManipulation, DataValidation, IPODB-EntitiesSQL-Code

So I have this structure (directories):

  • Controllers { ... }
  • Models
    • Commons { ... }
    • Inputs { ... }
    • Entities { ... }
    • Outputs { ... }
  • Services { ... }
  • PgsqlRepository { ... }

In my mind, the VIEW of a REST API is the combination of the "end point" and the "output model".
Both are provided by the corresponding API controller.

So where exactly is the VIEW in the MVC for a REST API?
Or is a backend interface (with REST API) not a classic MVC at all?

And yes, the MVVM in the frontend naturally offers a VIEW and a ViewModel.
But my question is only about the backend.


Viewing all articles
Browse latest Browse all 4123

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>