Skip to content

Conversation

@krzykrucz
Copy link
Contributor

@krzykrucz krzykrucz commented May 15, 2019

I replaced tuples in domain models with domain types, because tuples are names not included in a ubiquitous language.

In my opinion, tuples should only be used as a business workflow output, when the objects returned can't be grouped together as another business object.

I'd be glad with any comments you'll have regarding the names I chose.

@pilloPl
Copy link
Member

pilloPl commented May 16, 2019

Thanks!

@pilloPl
Copy link
Member

pilloPl commented Jul 14, 2019

Hi, @krzykrucz - any plans on this minor remarks? :)

@krzykrucz
Copy link
Contributor Author

Hi @pilloPl, have you made any comments on the changes? I don't see any...

private EntityModel<Checkout> resourceWithLinkToCheckoutSelf(UUID patronId, Tuple2<BookId, Instant> checkout) {
return new EntityModel<>(new Checkout(checkout._1.getBookId(), checkout._2), linkTo(methodOn(PatronProfileController.class).findCheckout(patronId, checkout._1.getBookId())).withSelfRel());
@Value
private class Hold {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a reason for Hold and Checkout to be a inner class with a reference to an outer class :) can we revert it?

import io.pillopl.library.lending.patron.model.PatronId;
import io.pillopl.library.lending.patronprofile.model.PatronProfiles;
import io.vavr.Predicates;
import io.vavr.Tuple2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert changes in imports? We decided not to use * in imports

@@ -1,17 +1,13 @@
package io.pillopl.library.lending.patronprofile.model;

import io.pillopl.library.catalogue.BookId;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert changes in imports? In all of the files?

@pilloPl
Copy link
Member

pilloPl commented Jul 14, 2019

Wow, I have commented but have not submitted. Facepalm. So sorry :)

@krzykrucz
Copy link
Contributor Author

No problem 😄 I'll make corrections

Copy link
Member

@pilloPl pilloPl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pilloPl pilloPl merged commit 0518590 into ddd-by-examples:master Jul 14, 2019
@pilloPl
Copy link
Member

pilloPl commented Jul 14, 2019

@krzykrucz seems like this broke one test:

shouldContainPatronProfileResourceWithCorrectHeadersAndLinksToCheckoutsAndHolds - io.pillopl.library.lending.patronprofile.web.PatronProfileControllerIT

Unfortunately I cannot investigate it right now

@krzykrucz
Copy link
Contributor Author

@pilloPl I'll take a look in the evening

@pilloPl
Copy link
Member

pilloPl commented Jul 15, 2019

Any progress with that?

@krzykrucz
Copy link
Contributor Author

I've just had a look at it. I could reproduce the error only by running the tests in maven (in IntelliJ they were green). And it turns out, I get this error even before my changes.

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.

2 participants