?
Solved

request to iss from jquery

Posted on 2014-09-03
5
Medium Priority
?
191 Views
Last Modified: 2014-09-04
I have page which has a grid section.
User can select one record from it and its details loads up in the details section

Now under details section information comes from three tables.
I am using Jquery ajax method to load the information in the form of json.

my question is, as I need information from three tables then
1. should I make one request and get the big bulky object in return.
2. should I make multiple request and get multiple response but smaller in sizes.
0
Comment
Question by:yadavdep
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 1000 total points
ID: 40301016
Save server bandwidth and resoruces doing one request

{
    table1: [results request 1]
    table2: [results request 2]
    table3: [results request 3]
}

Open in new window

0
 
LVL 40

Assisted Solution

by:Gurvinder Pal Singh
Gurvinder Pal Singh earned 1000 total points
ID: 40301045
Depends on the size and type of the individual responses.

If the response size is relatively small (less than 100 KB) in total and response time is less than 10 sec, then one response is best.

However, if three individual queries on database you have fired are heavy/slow then it makes sense to call them one by one. You can show waiting indicator to manage the user experience or ensure that it is not too bad.
0
 

Author Comment

by:yadavdep
ID: 40302922
my problem is that in one of the table I have memo field and user can copy and paste any amount of data in it.
So the request size can vary.

but I also think doing a separate request would be better
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 40303212
<<my problem is that in one of the table I have memo field and user can copy and paste any amount of data in it.>>
In that case, unless you can stream data from your server, don't fetch everything in one go.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 40303257
separate requests :
- slow dow, the proces
- consume bandwith
- slow down server (more request)

if you want to increase user experience choose another method
choosing a solution because it's easiest is not a right choice IMHO
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question