iluwatar / iluwatar/java-design-patterns
Asynchronous Page pattern
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 94.7k
- Forks
- 27.4k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 10
Description
Description:
The Asynchronous Page Design Pattern allows for the decoupling of long-running tasks from the main flow of a web page, providing a more responsive and interactive user experience. This pattern is particularly useful for web applications where certain operations, like data retrieval or processing, can take a significant amount of time and would otherwise block the user interface.
Main elements of the pattern:
- Client-Side Asynchronous Call: Initiate an asynchronous request from the client side using JavaScript (AJAX, Fetch API, etc.).
- Server-Side Processing: Handle the asynchronous request on the server side, processing the task in a non-blocking manner.
- Polling or Callback Mechanism: Update the client with the status of the request, either through polling, long-polling, or server-sent events.
- User Feedback: Provide immediate feedback to the user, indicating that the request is being processed, and update the UI once the processing is complete.
References:
Acceptance Criteria:
- Implement a client-side example demonstrating the initiation of an asynchronous request and handling the response.
- Develop a server-side component that processes the asynchronous request in a non-blocking manner and communicates the status back to the client.
- Provide clear documentation and usage instructions, including code comments and a README file explaining how to run and test the implementation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files, tests, or entry points are named. Start by reviewing the repository contribution guidelines and the linked Asynchronous Page pattern reference, then locate the appropriate pattern structure. Done means a runnable client/server example, non-blocking status updates, usage documentation, and a README covering how to run and test it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript
- Domain
- backend, frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100