You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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? :-)
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...)
Activity
karussell commentedon Aug 27, 2017
You mean a route is a list of paths?
michaz commentedon Aug 27, 2017
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.
karussell commentedon Aug 27, 2017
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..."
michaz commentedon Aug 27, 2017
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.
karussell commentedon Aug 27, 2017
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.
michaz commentedon Aug 27, 2017
But if PathWrapper is a data transfer object (it is!), that specifically means it doesn't wrap anything.
karussell commentedon Aug 27, 2017
Sure. What is your suggestion to call it?
michaz commentedon Aug 28, 2017
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? :-)
karussell commentedon Apr 12, 2018
Now it could be time to resurrect this ;)
easbar commentedon Feb 7, 2019
I agree that
PathWrapperis misleading because it does not wrap aPath.Pathis the the temporary thing we use during calculations,PathWrapperis the thing contained in theGHResponse. Maybe call itCalculatedRoute?RouteResponse?ResponsePath?Route?RouteDTO?PathDTO?I think I would prefer
ResponsePath. UsingRoutein any combination might lead to more confusion (whats the difference between a route and a path...) and so farPathis used in most classes (PathDetails/Merger/Simplification...)Update ios_compatibility branch to graphhopper 1.0 release state. (#2383