Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8532129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:38:35+00:00 2026-06-11T09:38:35+00:00

I am building a MVC javascript application which has most of the logic on

  • 0

I am building a MVC javascript application which has most of the logic on the frontend, leaving the backend with the API only, with the modals on the frontend.

However, I think there are some design and performance problems. Considering the following case with a RESTful backend:

  1. User issues GET / for the first HTML page including the Javascript application.
  2. The page loads up the Javascript application, issuing GET /api/articles?limit=30 to pull the first 30 articles in JSON, which will be rendered to the browser by Javascript application.
  3. For each of the article, there are comments with it. So each article will individually make an ajax request GET /api/article/<article_id>/comments to fetch the associated comments also to be rendered also.

As such, there are already more than 30 requests for a single page visit, which induces a lot of HTTP overheads and it does not seem correct.

Can somebody recommend the correct way to do it? Am I designing something wrong? Is RESTful backend useful in this case? What are some other suggestions of communication architecture between a JavaScript-heavy frontend and a backend API?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:38:37+00:00Added an answer on June 11, 2026 at 9:38 am

    Not sure what framework you are working with for your backend but the backend would query all your articles and also include (for example) the latest 3 comments per article.

    Your JSON returned by /api/articles?limit=30 could look like this:

    [
        {
            title: "Article Title",
            comments : [
                {
                   comment: "Hi",
                   author: "Me"
                }
            ]
        }
    ]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a MVC application which has a heavy client side scripting using Knockout,JQuery
I'm building an MVC application which uses Windows Authentication. I want to handle a
I am building an MVC 3 application which uses the standard Model validation attributes
I'm building a .NET MVC application which will be deployed on a Windows 2003
The MVC application that I am building has a portion of the page (implemented
I am building an MVC 3 application with an IIS 7.5 backend. On my
I'm building a RESTful web api with asp.net mvc, which returns pure json data.
I'm building a mvc application which will communicate with flash via AMF, anybody knows
I'm building a MVC application which is a bit more complex than what I
I am building an MVC application in which I am reading a list of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.