All Questions
26
questions
1
vote
2
answers
116
views
How to properly implement Rest Controllers to handle overlapping entities?
I have:
A User entity.
A Poll entity.
Relationship: User creates polls.
Use-case:
When an arbitrarily user is clicked his/her profile is loaded and shown.
The profile includes a list of polls ...
3
votes
3
answers
1k
views
RESTful endpoints for returning same model based on different fields?
What is the recommended convention to be followed for identifying different GET endpoints that fetch the same model/entity using different fields/parameters?
For example, there is a Student entity for ...
1
vote
2
answers
117
views
How to provide error details back to REST request?
In an ASP.NET MVC 4 REST API application, we have SQL errors which are occuring during the request.
However, since the requests are big, we are streaming the data back to the client, which means we ...
1
vote
0
answers
208
views
Rest API backend and React frontend is MVP?
I'm doing a website that has a React frontend that calls some RESTful API and I would like to know if this is an MVP pattern.
I think that the React application implements the View and the Presenter, ...
4
votes
1
answer
2k
views
Why does the Django Rest Framework encourage separating Model, Serializer and Views for the same object across multiple files?
Summary: Why shouldn't I put model, serializer and view classes for the same object in the same file in my Django Rest Framework application?
I'm building an application using the Django Rest ...
-1
votes
1
answer
246
views
Java MVC or Rest based approach with security [closed]
I am working in designing Java-based web applications. Although, I have worked with Java core still a novice in designing web-apps and do not have enough confidence in what I am thinking is correct or ...
3
votes
1
answer
546
views
Writing decision statement on controller layer
We are developing a REST application based on an MVC architecture.
The service layer is returning Optional<T> where T could be any class.
So on the controller layer there is a conditional ...
2
votes
1
answer
63
views
Where to implement URL data validation in Node/Express?
I'm building a RESTful API using Node/Express4 and so far I've been successful. However, I'm not sure where to implement URL data validation - should the router script block invalid URI requests or ...
1
vote
1
answer
917
views
MVC pattern + ( REST) View Confusion
I have been trying to build an MVC structured RESTapi.Since it's going to return JSON only,is it right that my View will just have a header and that the view will output the JSON also?
I planed to ...
1
vote
7
answers
2k
views
REST MVC Confusion For An Enterprise Appplication Architecture [closed]
I already have experience working with MVC based web apps and started reading recently about REST.
But went into confusion when re-thinking about how existing web app not using any kind of framework/...
21
votes
4
answers
62k
views
MVC and RESTful API service
MVC is pretty straightforward. There is a Model, a Controller and a View. When we create a website, it all come together as 'client sends REST keyword request to server -> the server matches the ...
4
votes
1
answer
2k
views
Considerations for decoupling and refactoring business logic to a REST API
We've got a .NET Solution consisting of a MVC Website and a bunch of libraries for business and data logic. In the past the website was the only way to interact with our business logic, but we're ...
-1
votes
1
answer
164
views
Code structure of third party framework [closed]
Is an API always returning 200 OK, an issue?
0
votes
1
answer
200
views
Should models be returning data directly to the client, or to the controller instead?
Disclaimer: This is my first time: using node, creating a REST API, and trying out MVC server side. (so, just statistically speaking, I'm probably doing something wrong ¯\_(ツ)_/¯)
I'm working on ...
1
vote
2
answers
103
views
Should a client check for persisted item existence before modifying it?
I'm developing a MVC Web application with a REST interface.
The REST controller performs actions on persisted items through a service class, which translates exceptions coming from the persistence ...