simsalabim/sisyphus

localStorage alternatives

Closed this issue · 1 comments

Hello.
I came with one idea.
What about alternative ways of saving data ? For example, what about to push all data to some user defined php script ? Like :

$('form').sisyphus({
    remote_storage : 'http://127.0.0.1/save_data.php'
});

I think it will be great, let me know your opinion ...

Hi @GuriK, I think such changes would have made the plugin more difficult to use whereas the goal is to keep it as simple as possible.

In fact we can send data to remote script and save it in arbitrary way. How do you plan to restore that data being retrieved from remote storage without knowing the format? Apparently, our data should be stored not in arbitrary way but in predefined conventional format - so it's not some user defined script anymore, but strictly conventional thing.

If server-side code is conventional there's no reason to do it in several variations and it should be a part of plugin. To make it being the part of plugin we should have at least conventional access to the database on the server-side (to store and retrieve data).

Thus, we should write this as a plugin for our used framework. If we're talking about php-world, there are too many, and also there're ppl who don't use frameworks and conventions at all (the code above 'http://127.0.0.1/save_data.php' doesn't seem to use any framework). It's more reasonable to make an integration with Rails, probably one day I'll bethink of it if I have enough spare time.