Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of Design Patterns to improve code maintainability #16

Open
amadoran opened this issue Dec 27, 2022 · 0 comments
Open

Use of Design Patterns to improve code maintainability #16

amadoran opened this issue Dec 27, 2022 · 0 comments

Comments

@amadoran
Copy link

amadoran commented Dec 27, 2022

Adapter Pattern.
image
In this snippet of the code i found that if you want to send a message in a different way you should use this design pattern to transform the data and make it possible to use.
image

Singleton Pattern.
If we analyse the project the classes Book, MailServerInfo and Member are in the same package but they are just data for the database. In this case we could use just a single instance of an object to encapsulate this fields, that's why we use the singleton pattern.
image

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

No branches or pull requests

1 participant