Skip to content

Application of Builder pattern for report creation#107

Open
Damian-Steiger wants to merge 1 commit intoAaronWard:masterfrom
Damian-Steiger:phase1_designPrinciples
Open

Application of Builder pattern for report creation#107
Damian-Steiger wants to merge 1 commit intoAaronWard:masterfrom
Damian-Steiger:phase1_designPrinciples

Conversation

@Damian-Steiger
Copy link
Copy Markdown

Covidify generates reports and each report may be different internally, since the number of graphs, countries of interest, and other fields can change. Given Covidify’s prevalence of report generation, and the nature of report objects, this flow was the perfect candidate for a builder pattern

Builder adds a layer of separation between the construction and representation of complex objects. Then it is easy to design different representations of the object while using the same construction process. In short, the builder pattern is helpful when building an object takes many steps, and the object can be represented in different ways. For example, building a house might use the method buildWall(), along with many other methods, however the number of walls per house will vary.

My reasons for the application of the builder pattern, as well as my reasons for my choice of implementation, are twofold; flexibility and organization.

…ve their own objects which are created and populated with a builder, allowing for the production of different reports using the same construction process. Now complex report objects can be indepent from their parts and their assembly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant