[josm-dev] Refactoring of the JOSM architecture vs. Plugins
frederik at remote.org
Mon Aug 18 21:24:54 BST 2008
>> Anything else is fine with me as long as you don't go overboard
>> "refactoring", i.e. change what needs to be changed and leave the rest
>> alone (no wholesale refactoring just to be compliant with what people
>> call "standard practice").
> This is not about some fancy ivory tower patterns and design fest. This
> is about bringing the current design to a point where we can even think
> about spatial indexing et al. There is just no way to do it without
> encapsulation thoughout the DataSet and OsmPrimitive hierarchy.
> Wholesale? I don't think so.
Given that you never simply change the coordinates of a node without
having a proper change command, it should be quite uncomplicated to have
that command change the node's index value as well when required. And
even if you found you had to encapsulate the node's lat/lon, this would
not mean that you'd have to encapsulate everything else or every other
object while you're at it. *If* you're willing to think about this
without prejudice. If, however, all you think when seeing JOSM code is
"Yuck, I wouldn't touch that", then don't say "There is just no way to
"Wholesale" means: "I'm going to refactor all this because it is not
written in the style I want to work with". I don't support that. First
think about what you want to do, then think what needs to be changed to
achieve that, then make the changes you need. ONLY the changes you need.
Not 100 other changes that you think someone else might also need at
some point in the future ("and while I'm here I'll also fix this and
> I don't see that NG or NG-2 would fly at this point.
I don't see why not. I'm astonished why everybody is so eager about
fussing around with a piece of software they think has the crappiest
design ever when they could instead contribute to a clean, new approach.
I'd rather have those people who are comfortable with the way JOSM is
written work with JOSM, and those who are not work with JOSM-NG, and I
have no doubt that if you'd invest in JOSM-NG the same time you're
willing to spent refactoring JOSM, then JOSM-NG would indeed fly. The
sheer rendering performance would make many people want to switch.
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the josm-dev