1

We're developing a big project for our company, and they asked us to use Angular even though none of the devs have any considerable experience with it. The back-end is C#/.NET Core with ABP.

My expertise is back-end, and when I had to work with front, there was an adage to try to limit the number of requests or trips around the system.

So, when designing a new page, by following this adage, I thought about creating a new method in the back-end to return every info needed for this new page in one single request. So I would return all info for the current resource, plus any associated info, like the options presented in each drop-down.

The alternative is to have each component in the page have its own responsibility. This could mean the front making up to 20 requests per form on our system.

Which alternative would be more advisable, and why?

8
  • The answer to that question would depend on what you're optimizing for. What is more important to you, modularity / separation of responsibilities or high performance? If you had to pick one, which? Dec 10 '19 at 19:07
  • Our system doesn't have any concurrence problems... There'll be few users online. So I guess the best focus would be maintainability. Dec 10 '19 at 19:10
  • modularity / separation of responsibilities Dec 10 '19 at 19:10
  • 2
    Also, it's not an either/or choice. You can choose to be highly-modular and optimize for performance only when you need to. Your choice could be somewhere in between complete modularity and single request. You can make different choices for each page. Dec 10 '19 at 19:13
  • 2
    Why would you deny yourself the opportunity to make the optimal choice on a case-by-case basis for your specific needs? Dec 10 '19 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.