Skip to content

Rename PathWrapper #1147

Closed
Closed

Description

@michaz

I think the data types of the request and the response should be named concisely for what they are.
PathWrapper doesn't wrap a path, it is a path.

Except if we think it is a route, because we always say we calculate routes, not paths.

Activity

  1. karussell commented on Aug 27, 2017

    @karussell
    Member

    You mean a route is a list of paths?

  2. michaz commented on Aug 27, 2017

    @michaz
    MemberAuthor

    No, what makes you think that? A PathWrapper is also not a list of paths. I think a path and a route are the same.

  3. karussell commented on Aug 27, 2017

    @karussell
    Member

    What is the difference of a path and a route in your opinion? Or why do you think: "Except if we think it is a route..."

  4. michaz commented on Aug 27, 2017

    @michaz
    MemberAuthor

    I meant: Maybe we should rename it to Route, not to Path, because Route is the word we are using everywhere else. But at least to Path.

  5. karussell commented on Aug 27, 2017

    @karussell
    Member

    There is already a Path class and I think the problem is probably that the PathWrapper class is also like a data transfer object that can and should be avoided somehow.

  6. michaz commented on Aug 27, 2017

    @michaz
    MemberAuthor

    But if PathWrapper is a data transfer object (it is!), that specifically means it doesn't wrap anything.

  7. karussell commented on Aug 27, 2017

    @karussell
    Member

    Sure. What is your suggestion to call it?

  8. michaz commented on Aug 28, 2017

    @michaz
    MemberAuthor

    Wait until after the client+dropwizard PRs, because then would be a good time to move all the API data transfer objects to their own package. Then we see them all together in one place, and can decide on the perfect data type names? :-)

  9. karussell commented on Apr 12, 2018

    @karussell
    Member

    Now it could be time to resurrect this ;)

  10. self-assigned this
    on Apr 12, 2018
  11. easbar commented on Feb 7, 2019

    @easbar
    Member

    I agree that PathWrapper is misleading because it does not wrap a Path. Path is the the temporary thing we use during calculations, PathWrapper is the thing contained in the GHResponse. Maybe call it CalculatedRoute ? RouteResponse ? ResponsePath ? Route ? RouteDTO ? PathDTO ?

    I think I would prefer ResponsePath. Using Route in any combination might lead to more confusion (whats the difference between a route and a path...) and so far Path is used in most classes (PathDetails/Merger/Simplification...)

  12. added a commit that references this issue on Sep 28, 2021
    e99b2e0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions