[OSM-talk] syj: preview of a web site to store routes, need your opinions :)

David Earl david at frankieandshadow.com
Tue Jul 27 18:11:09 BST 2010


On 27/07/2010 17:18, arno wrote:
> Le mardi 27 juillet 2010, à 15:45:46 +0100, David a écrit :
>> How do I get a URL of my route to share with someone? Presumably it
>> is just the URL in the address bar after a save, but a "give me a
>> URL" button or some such would be handy.
>
> I'm not sure a button is the right way (I don't want to clutter the interface
> too much), but I need to give an easy way to get route url.

Given you don't like the idea of incrementally saving the route, how 
about replacing Save with a button which says "Give me the URL" (or 
whatever) which has the effect of Saving and then popping up an overlay 
which provides you with the URL (and maybe offers to email it to you). 
Doesn't require an extra button then to get the info needed.

>> I think the need to login (or rather, create an account) is
>> EXTREMELY offputting. It's the biggest single reason putting people
>> off a website in general. I don't see why you need it - can't you
>> store IDs and/or names without? (Or even encode the route in a URL).
>> Like bit.ly for example.
...
>
> The main reason a login is needed is to prevents spam or database attack. What
> happens when some random scripts send 10 http posts a second ?

You just don't allow it. Check the size is reasonable for the time taken 
(you can record when they started in the session). Maybe enforce a 
maximum overall size.

You could also check that the same IP isn't sending reasonable size 
requests at too frequent intervals and block that IP (record the IP with 
the database entry) if it does.

Apart from that, why do you care if it is a robot, so long as it isn't 
overloading you?


>> Do you need a "Save" at all? Why not save it live as they do it, so
>> all you have to do is harvest the URL at the point you are ready.
>
> I'm a big fan of live saving on desktop applications, but don't like it for
> web pages: it induces a lot of http requests

Well one for every click or drag, but that's hardly a lot unless it's a 
robot doing it.

> and you need to try to "guess"
> when the user is inactive (because I don't want to save dozens of times when
> user drag and drops).

I don't think you need to know this. All you need to do is append a 
point with an Ajax request each time they add one. If they go away, so 
be it. Why not save with each click or drop? It's not a complicated 
request or a lot of data.

The danger of not doing it this way is that people will press the back 
button expecting it to undo the last point added, and end up discarding 
everything they've done.

David




More information about the talk mailing list