★ wanayoo — archive 1999 https://github.com/iluwatar/java-design-patterns/pull/608Nouvelle recherche | Portail wanayoo
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

#348 Data Transfer Object design pattern #608

Merged
merged 12 commits into from Aug 17, 2017
Merged

Conversation

@gopinath-langote
Copy link
Contributor

@gopinath-langote gopinath-langote commented Aug 11, 2017

Basic version of Data transfer object pattern implementation.

Copy link
Owner

@iluwatar iluwatar left a comment

The project file for the class diagram is missing (.ucls)

<packaging>pom</packaging>
<modules>
<module>../data-transfer-object</module>
</modules>

This comment has been minimized.

@iluwatar

iluwatar Aug 12, 2017
Owner

Why is Data Bus pattern affected? Should this change be reverted?

This comment has been minimized.

@gopinath-langote

gopinath-langote Aug 13, 2017 •
Author Contributor

@iluwatar 👍 . I reverted back. Thanks

customers.add(customerOne);
customers.add(customerTwo);

CustomerResource customerResource = new CustomerResource(customers);

This comment has been minimized.

@iluwatar

iluwatar Aug 12, 2017
Owner

This is customer server data initialization, right? Could we move to static block in CustomerResource class?

This comment has been minimized.

@gopinath-langote

gopinath-langote Aug 13, 2017 •
Author Contributor

@iluwatar Yes, we can. But the unit tests for the CustomerResource class will not be pure. As the class itself is having some initial data. Don't you think the unit tests will be more confusing one?

}

private static void printCustomerDetails(List<CustomerDto> allCustomers) {
allCustomers.forEach(customer -> System.out.println(customer.getFirstName()));

This comment has been minimized.

@iluwatar

iluwatar Aug 12, 2017
Owner

Don't use System.println, instead add and use a logger as in other examples.

This comment has been minimized.

@gopinath-langote

gopinath-langote Aug 13, 2017 •
Author Contributor

@iluwatar 👍 Ok. Make sense. Did the same.
Thanks.

public class CustomerDto {
private String id;
private String firstName;
private String lastName;

This comment has been minimized.

@iluwatar

iluwatar Aug 12, 2017
Owner

This looks like immutable class. The private members should be declared final.

This comment has been minimized.

@gopinath-langote

gopinath-langote Aug 13, 2017 •
Author Contributor

@iluwatar : Done. Thanks.

@gopinath-langote
Copy link
Contributor Author

@gopinath-langote gopinath-langote commented Aug 14, 2017

@iluwatar : Added missing class diagram.

Thanks.

@iluwatar
Copy link
Owner

@iluwatar iluwatar commented Aug 17, 2017

@gopinath-langote looks good now. Thanks for the contribution! 👍

@iluwatar iluwatar merged commit e367e48 into iluwatar:master Aug 17, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
kspalaiologos pushed a commit to kspalaiologos/java-design-patterns that referenced this pull request Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.