All Questions
Tagged with rest design-patterns
63
questions
1
vote
5
answers
495
views
DTO vs POJO (Entity) on POST request
If I have for example a User POJO like the following
@AllArgsConstructor
public class User {
@Id
private final String id;
private String username;
private String password;
private Date createdDate;...
0
votes
1
answer
460
views
Is it okay to combine bff and rest api?
I'm building an application related to donation on streams.
And I have such models as "alert" and "alert-template".
"alert" is a set of different parameters to understand ...
0
votes
1
answer
368
views
Where should I create my aggregate root? in api or frontend?
I am writing a simple application to apply what I have learned so far in DDD.
I have the following mysql tables in my api server
Sales
Column
id
pk, int
title
varchar
description
varchar
Images
...
1
vote
4
answers
2k
views
Design REST Polymorphic API
I have a client/server application that exposes data and commands through REST APIs. This API exposes a GET /recipes/:id endpoint that instructs the client on how to show a recipe. A recipe can be ...
1
vote
1
answer
353
views
Asynchronous HTTP request pattern
Here is the pattern that I thought about for a resource accepting a single asynchronous HTTP request at a time (i.e. a request which has not yet been fulfilled when the response is sent):
Create a ...
3
votes
2
answers
172
views
Checking the user in almost all use cases
I have a web application that has Users that belong to Companies. A User can only belong to 1 Company at a time and they can manage their own company information. I'm using java spring and I'm ...
1
vote
1
answer
5k
views
Design Pattern for accessing data over RestAPI calls
I am looking out for a general design strategy or pattern designing various components in my client application. Here are high level details:
The data is accessed my making a RestAPI call. The data ...
0
votes
1
answer
281
views
Sending multiple calls from angular application
I am working in Angular project which is connected to REST API. Here we have an endpoint to create and update room types. POST endpoint for create and PUT endpoint for update exiting room types.
Both ...
1
vote
1
answer
131
views
Should I use ROA or SOA for a distributed application and how could I implement REST If using ROA
For my final year project I'm looking to build a distributed version of a popular benchmarking client (this has already been done using various methods involving some form of existing frameworks), I ...
1
vote
3
answers
208
views
API Versioning when changing a single HTTP Method of an entity
When making a decision to version an API. If you are making a change to an entity but are only making changes to the one of the HTTP Methods.
For example POST /api/v1/customers accepts a list of ...
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, ...
-1
votes
1
answer
438
views
How to handle pagination in a stateless application having multiple components involved for the data?
This problem statement is around one UI component, 3 service components. The current design of the application is like:
UI makes request to Service-A to get data
Service-A first makes a call to ...
42
votes
1
answer
8k
views
How to design a REST API that can "prompt" the client about long-running operations?
Say you were to develop a REST API that provides access to a set of complex, long-running, operations.
The typical paradigm for an API like this (as I understand it) usually involves (the client) ...
0
votes
0
answers
248
views
REST API design: communicating order of inputs is important to the user (in POST request)
Let's say I have a REST endpoint where the order of inputs for a given field is important:
POST Request: api.myrestendpoint.com/evolution-timeline/
inputs: {'this_list_should_be_ordered' : [ 'reptiles'...
0
votes
0
answers
556
views
DRY(Don't repeat yourself) Principle and BFFs (Backend-for-Frontend)
We are about to plan our server architecture and we want to use the BFF strategy with node.js servers to serve multiple front-end apps.
However we also want to be able to scale easily (e.g. a new ...