Open wtimme opened 6 years ago
I feel the same way! It's little weird. Actually, I put the prefix on purpose because those words are very common. I wanted to avoid conflict between names. However, the compiler doesn't seem to care about it. Therefore, I agree with your suggestion. This should be added to to-do.
Glad to hear!
What do you think about adding an OSM
prefix to the OverpassElement
subclasses, e. g. OSMNode
?
I plan on using these elements with both the Overpass API as well as the OSM REST API v0.6. Both APIs provide elements from OpenStreetMap, hence the prefix. This is what the renaming would look like:
OverpassElement
-> OSMElement
OverpassNode
-> OSMNode
OverpassWay
-> OSMWay
OverpassRelation
-> OSMRelation
What do you think?
As for the queries, I would leave the structure the way it is, since OverpassQuery
and its subclasses are solely used with the Overpass API. For consistency's sake, I was thinking about renaming the subclasses to indicate their parent class:
NodeQuery
-> NodeOverpassQuery
WayQuery
-> WayOverpassQuery
RelationQuery
-> RelationOverpassQuery
Writing these down like that makes me think if there was an easier way to have namespacing, because that's basically what part of this is about. We could achieve this by moving code to different projects, e. g. one for the models (shared between Overpass and the client for the OpenStreetMap API), one for the commication with Overpass and, if we were to have an OpenStreetMap API client in this project (cp. #21), a third project for the API client.
So, should we rename everything and group the classes by adding prefixes, or should we create dedicated projects to have "natural" namespaces? I'm not that experienced with this kind of framework decisions, so I'm happy about any feedback, thought and input. Thanks in advance!
Thank you and sorry for the late reply for this issue.
The prefix OSM
and renaming for query models of Overpass API look appropriate for this project!
In #21, we discussed whether we should split the project. I believe the way separating project is better. However this name change will fit for this project anyway.
Therefore I think it's good to go along with your way.
What do you think, @wtimme?
Since I'm using not only Overpass but also the OpenStreetMap API in my own app, I find the current elements naming scheme a bit misleading. What do you think about dropping the
Overpass
prefix for the classes, @holyturt? For example,OverpassNode
would be called justNode
.Looking forward to your feedback!