java-design-patterns icon indicating copy to clipboard operation
java-design-patterns copied to clipboard

Two Step View pattern

Open iluwatar opened this issue 4 years ago • 10 comments

Description:

The Two Step View design pattern is used to separate the process of generating dynamic web content into two distinct phases: data preparation and data presentation. This separation allows for more modular, maintainable, and testable code. The pattern is particularly useful for web applications with complex presentation logic, where it can help to simplify the development and maintenance of views.

Main Elements of the Pattern:

  1. Data Preparation Phase: In this phase, the raw data is collected and processed into a form that is suitable for rendering. This usually involves gathering data from various sources, performing necessary computations, and organizing it into a structured format.
  2. Presentation Phase: This phase takes the prepared data and applies a template to generate the final HTML or other output formats. The template defines how the data should be displayed, separating the concerns of data structure and visual presentation.

References:

Acceptance Criteria:

  1. Implement the Two Step View pattern by creating a distinct data preparation phase and a presentation phase in the web application.
  2. Ensure that the data preparation logic is separated from the presentation logic to promote modularity and maintainability.
  3. Provide unit tests to verify the correctness of both the data preparation and presentation phases, ensuring that they work correctly independently and together.

iluwatar avatar Jul 07 '20 18:07 iluwatar

Can I take this issue

maheshsv avatar Jul 13 '20 17:07 maheshsv

To work on

maheshsv avatar Jul 13 '20 17:07 maheshsv

Ok @maheshsv

iluwatar avatar Jul 14 '20 12:07 iluwatar

@maheshsv are you still working on this?

iluwatar avatar Oct 24 '21 14:10 iluwatar

This issue is free for taking again.

iluwatar avatar Nov 28 '21 07:11 iluwatar

Hi, I would like to work on this issue. Could you assign it to me?

steph88ss avatar Oct 13 '22 00:10 steph88ss

Ok @steph88ss

iluwatar avatar Oct 13 '22 17:10 iluwatar

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 28 '22 12:11 stale[bot]

@steph88ss, hopefully you can address the review comments and we can complete this issue?

iluwatar avatar Dec 03 '22 17:12 iluwatar

This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 01 '23 20:02 stale[bot]