Giter Site home page Giter Site logo

Comments (3)

TimMoore avatar TimMoore commented on May 25, 2024 1

Here's what I'm thinking now... would love to hear others' thoughts on this.

  • Keep the API response type names simple nouns (like they are now) Item, User, etc.
  • API request types reflect the domain language: use the type of request that you're making such as UserRegistration, ItemListing, etc.
  • Persistence types should use the language of Lagom's API: ItemEntity, ItemState, ItemCommand, ItemEvent
  • PItemState as it exists now is an anomaly, as it is just a wrapper for Optional<PItem>. Is there any reason we can't make the ItemEntity extend PersistentEntity<ItemCommand, ItemEvent, Optional<ItemState>> directly (like UserEntity does)?

from online-auction-java.

TimMoore avatar TimMoore commented on May 25, 2024

Java doesn't provide a great way to deal with naming conflicts. In Scala you can use relative package names, or import with an alias, but in Java if you have a name conflict between two classes that you need to use in the same file, your only choice is to use a fully-qualified name to distinguish between them. Since it is commonly the case that you need to convert between internal representations and external representations, these conflicts do happen in practice.

I think that's the reason why the "P" prefix was used originally in this project. Maybe that isn't the clearest convention, but I think that having a different name, not just a different package, is a good idea for this reason.

from online-auction-java.

TimMoore avatar TimMoore commented on May 25, 2024

Related: #15 ... sounds like @ignasi35 and I share some thoughts.

from online-auction-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.