I have a website with a home page and a search text and button and 5-6 tabs. Based on the search text, there would be independent service calls (API calls to backend) for the tabs. Each tab would have different data. After clicking on search , I am planning to fetch data for one tab and load it in the UI and let the data for other tabs be loaded in the background.
I am planning to use Spring MVC for this task, but I am not sure if spring supports this kind of parallel service calls.
Are there any other frameworks that can do this?
Any pointers would be helpful.Answer1:
Spring MVC can do this. Because it can handle parallel Requests (It will not take care that they come from the same client).
The "problem" is to have the client to send this parallel requests (one for each tab).Answer2:
independent service calls (API calls to backend)</blockquote>
I guess, you are talking about Ajax requests (HTTP).
All Java EE web framework (and of course SpringFramework MVC) is based on <a href="http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServlet.html" rel="nofollow">HttpServlet</a> usage. You may also read <a href="https://www.jcp.org/en/jsr/detail?id=315" rel="nofollow">JSR-315 specification</a>.
What is important, that every servlet request is running in separate thread. Thread creation is carried out by servlet container (tomcat, GlassFish, Jetty, etc), so you are not required to do it manually.
So the answer definitely is yes.
Concerning other frameworks, please look to <a href="https://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#Java" rel="nofollow">the list in wiki</a>.
UPD. About client. Ajax requests are asynchronous by definition, so it's easy to implement parallel requests.
Small and quick example on how to make parallel calls on client (Jquery):