Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

158
Visualizações
Loading multiple data objects from backend API - all at once or every data object in its own call?

Lets say i have a form that i use to edit a Customer. In addition to various input fields it will also have multiple drop down lists to set some fields (eg. Country, Category, Status...). Every drop down list will need a seperate lists that i need to get from the backend to populate. That means that if i want to edit a customer with my form, i need to load:

  • The Customer Object which will be edited
  • A list of countries
  • A list of categories
  • A list of different stattus types
  • ...

My question is: Should each of these things be loaded seperatly with its own backend API call, or should i write a API backend call that will combine all these things into a single object and use it to load my data?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

I think It's better use multiple API call in almost situation. After compare pros and cons as table below, I always choose Multiple API call for projects.

Credit to Andrew Corrigan and Amrit remind me some criterias.

Single API Multiple API
Network Less request Multiple request => Caching
UI Render Render data in nearly same time Render if any api response
Reuse FE component Need to call big API to take one array data Get what needed
Reusability API Low High
Single Responsibility No Yes
Flexible No Yes
about 4 years ago · Juan Pablo Isaza Relatório

0

Its an opinion based and scenario based , but in my suggestion i would prefer things be loaded separately with its own backend API because :

1.Single api will be heavy and UX will be badly impacted

2.User may  not change all field when form opens so only changing fields will be using api
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda