"Improving OpenStreetMap" on the wiki - and my own ideas

Andy Allan gravitystorm at gmail.com
Sun Feb 26 13:06:03 GMT 2012


Hi All,

I found this link on twitter, and I'm surprised there's no
conversation here on the development list.

http://wiki.openstreetmap.org/wiki/Improving_OpenStreetMap

... which although the title of the page has an almost infinitely
large scope, means mostly working on the rails port. When you get past
some of the flamebait and trolling, there's a few good ideas on this
page. I'm especially keen to hear that Tom McW is interested in
exploring javascript for editors - I'd love to see even something
comparable to halcyon in order to replace the data overlay, and if
it's possible to make a JS-based editor, there'll probably be good
stuff we can re-use in the rails port itself.

I've got my own long list of (rather more prosaic) things that I'd
like to try with the rails port, so I'll share them here.

1) Find a better name for the project! The fact that it's the result
of porting the ruby version of the website to rails in 200x is only of
historical interest. We current have "openstreetmap-website" but given
that it's both a website, and an API, and a bunch of other stuff too,
I think it could have a catchier name.
2) Move to haml for the views. I much prefer it to erb, but I don't
know what other people think. If we stick with erb, I think many of
the views can be cleaned up to be more easily readable during
development
3) Fat models, skinny controllers. It's a convention in many rails
projects to make the controllers as slim as possible, and move more
logic into the models. See e.g.
http://therailsway.com/2007/6/1/railsconf-recap-skinny-controllers/
and related discussions
4) Change the way that we do authorization. I've been using
declartive_auth gem in some other projects, and quite enjoying it. At
the moment our authorization is buried all over the place (e.g.
https://github.com/openstreetmap/openstreetmap-website/blob/master/app/controllers/user_controller.rb#L415
) and I think it would be good to clear things up.
5) Move to an authentication gem, like devise. All the
resend-email-conformation-token stuff that we have is, nowadays, a
problem that's solved by other people.
6) Move osm-entity handling to lib, or even into a separate gem. I
find myself copying + pasting big chunks of node/way/relation + map
call code into other rails projects (e.g. snapshot-server) - so it's
useful, but the rails port isn't exactly a great starting place for
hacking on something different!
7) Undelete api call. I'll just mention it in passing, but we still need one!
8) Look again at the test suite. I don't see many tests being written,
just mainly keeping the same test suite updated for underlying rails
changes. I'm not sure what's at the root cause of this, but I suspect
it's not because we have perfectly comprehensive test coverage!

Now as for when I'll get around to doing any of this myself... :-) Has
anyone got their own list of things-they-might-do-eventually to share
too?

Cheers,
Andy



More information about the rails-dev mailing list