[OSM-dev] The future of Potlatch

Dave Stubbs osm.list at randomjunk.co.uk
Fri May 2 10:25:50 BST 2008


On Thu, May 1, 2008 at 6:35 PM, Richard Fairhurst <richard at systemed.net>
wrote:

> [warning - long ponderous e-mail follows!]
>
> Hi all,
>
> A fairly weighty issue concerning the future of Potlatch has arisen,
> and I'm completely baffled as to what to do - so I thought I'd "ask the
> community" for thoughts and advice.
>
> CloudMade (Steve and Nick's VC-funded company set up to commercialise
> OSM data, www.cloudmade.com) wants to commission a new online Flash
> editor for OSM. It would, I believe, probably be written by developers
> from Stamen Design (www.stamen.com): some of you will remember that
> Stamen's Tom Carden wrote OSM's early Java editing applet, and they've
> also written a slippy map in Flash called Modest Maps.
>
> As you can imagine, this has taken me aback a bit.
>
> As I understand it, their main issue is a technical one. Potlatch is
> written in ActionScript 1, which is the same language as JavaScript,
> but for Flash. The latest version is ActionScript 3, which is much more
> like Java for Flash. The end user doesn't notice a difference, but the
> programming style is very different.
>
> CloudMade believes this is holding back the development of OSM: that if
> the editor were written in the latest version of the language, more
> Flash designers would come to work on it, resulting in a better editor.
> Steve cites OSM's move from pure Ruby to Ruby on Rails as an example of
> how a contemporary language encourages more people to contribute. And
> they're also worried that if I were run over by a bus then no-one would
> be able to speak ActionScript 1 and maintain Potlatch.
>
> I'm not so sure. I think people are beginning to contribute code to
> Potlatch; that as essentially JavaScript it's approachable enough; and
> that the problems of attracting developers is symptomatic of core OSM
> in general (as per http://trac.openstreetmap.org/log/sites/rails_port).
>
> I hope that Potlatch, as something maintained by an active community
> participant _for_ the community, has demonstrated a pretty rapid rate
> of improvement anyway. It's meant to be small and compact, of course,
> not a a bells-and-whistles editor like JOSM: nonetheless, in the last
> few months, for example: it's become the only editor yet to offer
> revert/history, gained very good relations support, background layers,
> flexible GPX import, etc. And there's a lot of stuff on the way, mostly
> focusing on usability - from a generic 'undo' and pop-up help panel to
> a new, super-user-friendly tagging panel with draggable POI icons and
> things like that. It's got faults, everything has, but it's come a long
> way in the last year. For what it's worth I think it's the best thing
> I've ever coded.
>
> For most purposes AS3 probably is a better language - except for the
> fairly major proviso there's no open-source player even in development.
> Indeed, if I were starting all over again I'd probably do it in AS3,
> and in a couple of years I may well migrate Potlatch to AS3 (or 4, or
> whatever) anyway. But right now it's more important to spend time
> improving usability for mappers, given that - like most people here - I
> do have a full-time job which isn't OSM (which isn't computer-related
> at all, in fact) and consequently time is not unlimited.
>
> So I really don't know what to do.
>
> Part of me thinks that the most important thing is that Potlatch is
> still available and users are offered the choice. Part of me thinks,
> well, if there's going to be a new Flash editor, there's no point in me
> doing any development on Potlatch from today forward. Part of me wants
> to say "well, screw you" and walk away. And part of me wants to take
> CloudMade up on its OSM Grants scheme (http://blog.cloudmade.com/) and
> say, ok then, I'll announce a medium-term feature freeze, take a few
> weeks' holiday, learn AS3 and recode it for a large amount of $$$. I'm
> utterly stumped and would welcome suggestions.
>
> Thanks for reading. :)
>

np :-)

OK, first up potlatch's code:

 - ActionScript 1 in my professional opinion sucks donkey balls
 - how on earth you kept sane while writing Potlatch with that kind of lead
weight I don't know, but Good Job!
 - there are occasions in the code where it could do with some redesign --
there's been lots of improvements along these lines made by yourself in the
lead up to 8 and onwards.
 - having it's own API is a bit of a maintenance nightmare -- IMHO it should
at least use rails models throughout to reduce the impact of this

When it comes to attracting developers there is a problem here: the learning
curve to start coding Potlatch is massive. You have to learn AS1, you have
to learn how flash works in weird ways, you have to learn to avoid Ming bugs
such as using "return" statements in the wrong place. And once you get into
it, you end up going round in circles tearing your hair out because you
missed one of those bugs or quirks. On top of all that you have to learn how
Potlatch itself works (which is the easy bit). I can understand this will
discourage many casual patches or contributions.

OTH I don't know much about AS3 so I can't say whether it's much better in
this regard, but from a quick scan of it, I'd say it was. I think the main
problem is the likely-hood of an opensource player being available for it.
AS3 means flash 9 and better only, and currently the os stuff is way off
that. I don't know whether that's likely to change any time soon. There is
an official adobe 32bit linux version that works very well though, which
will be good enough for most people.

Now if I was a company wanting to put money into improving an editor, I
would be very reluctant to invest in an AS1 codebase. I'd want something I
could easily support and allocate resources to, and with the quirky AS1
features, exclusive dynamic typing, and questionable OO credentials, I could
see why you wouldn't want to do it.

So basically here's what I think:

I would support any move to port/rewrite Potlatch to AS3. If you can get
money from CloudMade for doing it then all the better :-)

If you don't then I believe that Potlatch still has a place. We have a user
preferences API apparently, so there's no reason the Edit tab can't do
different things for different people, and actually provide a choice to
people. It could probably offer a default as the "most used".

Anyway, Potlatch is IMHO the best OSM editor available at the moment by a
wide margin. The only thing it doesn't do that I have to use JOSM for is the
positioning of pictures on my gps trace.
I particularly prefer potlatch's approach to handling relations :-P
I'd try to be optimistic and keep developing -- raise the bar for any new
editor as high as you can make it.

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20080502/e658ffe0/attachment.html>


More information about the dev mailing list