Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility with remoteStorage & Litewrite #9

Closed
jancborchardt opened this issue Apr 3, 2013 · 2 comments
Closed

compatibility with remoteStorage & Litewrite #9

jancborchardt opened this issue Apr 3, 2013 · 2 comments
Labels

Comments

@jancborchardt
Copy link
Member

As we’re working on this simple Notes app for ownCloud I thought it would be nice to have it syncable out to other apps, using remoteStorage. Especially because it’s modeled after Litewrite and because ownCloud can (hopefully soon again) be used as remoteStorage it would be great if the data could be shared.

What we do currently with the Notes app is just use a »Notes« folder in the Files app and save the notes in there as plain txt. This should ideally stay that way because it enables desktop syncing via the client.

Now I'm not sure if it makes sense at all to try to do that, also because Litewrite doesn't just use text. Locally we also use JSON for the Notes app, maybe that can be exposed/saved/synced. cc @Raydiation please comment on this, also cc @jorin-vogel

This is probably dependent on the remoteStorage / »Open Web Apps« app from owncloud-archive/apps#448 cc @michielbdejong @nilclass, and it working with ownCloud 5 or later.

Bernhard (@Raydiation) and I are about to port the Notes app to AngularJS in the js-cleanup branch: https://github.com/owncloud/notes/tree/js-cleanup

@michielbdejong
Copy link

well, you could just use the exact code of litewrite, including the documents module, and replace each privateClient.storeObject() call with a $.ajax('storeObject.php') call, or whatever it is the ownCloud app does.

you could even write a wrapper that switches between the remoteStorage BaseClient and the ownCloud ajax call.

@michielbdejong
Copy link

i actually found a different way: put litewrite into an ownCloud app, call:

remoteStorage.setBearerToken('')
remoteStorage.setStorageInfo({href: 'ajax/remotestorage.php/'});

and then add a handler ajax/remotestorage.php for handling the GETs, PUTs and DELETEs that remotestorage.js does. it will go with a cookie to the ajax handler on the same domain, so it won't need a bearer token.

this works, but requires an app publisher to do work specifically for publishing their app to oc, which is not ideal.

i just talked with @jancborchardt about this, and since remoteStorage support will hopefully be back in oc6, on the surface it seems that the way to go would be to just develop unhosted web apps instead of developing oc apps (whenever no server-side php code is needed). there are two problems with this though:

  1. remoteStorage support will not work on shared hosting because it basically requires opening up https on a port other than 443, so remoteStorage can never be the only go-to option for ownCloud.

  2. right now we have no way to make unhosted web apps appear iframed without oc-specific packaging. sometimes it is desirable to make apps appear iframed, for a more integral experience without too many tabs open.

i think it's important for our two developer communities to join forces in saving the web, so i want to solve both these problems. so we could try to develop a more generic "iframed javascript app" packaging format in the long run to overcome these two problems. i've been thinking about something like that (i have been calling it "apptorrent"), i'll develop those ideas a bit further specifically in the light of those two problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants