Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

My apologies in advance if this is not a good forum for this question; pointers to others happily accepted.

On the off chance it matters, I'm not going to commercialize this idea or anything; if anything in here is interesting to you, use it as you see fit.

My basic problem is this: My favorite place to do non-code writing (essays, fiction, etc) is on my Android phone when I'm traveling. Said traveling often causes the phone to lose all signal/web connection. I would like a system that auto-syncs with the phone in some fashion, can be written in a fairly wiki-ish style (i.e. links are supported but I don't have to actually type out also be edited easily at a regular computer when needed. I'd prefer the editing on the phone be as close to plain text as possible, because fine manipulation like that required to set something to bold or whatever is a pain; I'd rather just be able to type things out.

Nice-to-have is the ability for other people to collaborate on documents. Very-nice-to-have is authentication so that some documents can be private, without having to get into the auth quagmire myself.

There really doesn't seem to be any such thing out there.

The two options I've thought of for implementing this:

  1. Now that there exists a proper 2-way sync dropbox app ( https://play.google.com/store/apps/details?id=com.ttxapps.dropsync ), I could just use a plain-text editor on the phone and have a simple web app that presents the text via a wiki markup library of some kind out of the relevant dropbox folder. Advantages: Dead simple. Disadvantages: No easy auth or collaboration.

  2. I could use Google Docs, and have a not-so-simple Web app that pulls documents from there, treats them as wiki text, maybe does some cashing, and presents them as a coherent-ish web site(s). Advantages: If I can get the auth to pass through properly, auth and collaboration are free. Disadvantages: Much more complex, and this is just a one-off personal project.

I'm curious as to whether I've missed anything, any other easier ways to solve this problem. I'm actually a little surprised that no-one seems to have thought of backing a wiki on Google Docs; there's the Google app wiki stuff, but that pretty much requires a browser AFAICT, whereas there are several Google Doc apps on pretty much everything with offline sync options.

share|improve this question
    
actually I have the same idea with dropbox, but it never goes out of personal use. Collaboration, I think it's not quite a problem, since dropbox has "share folder" function as well. –  Hoàng Long May 7 '12 at 10:07
    
Ah, I hadn't thought of appropriating dropbox's share for this (which is bizarre because I use that all the time). Thanks. –  rlpowell May 7 '12 at 19:31
    
I'd try and see how well tiddlywiki works but I don't know about authentication really. –  phant0m May 26 '12 at 9:16

2 Answers 2

This sounds like something that could be done in HTML5 with a little server-sided code.

The fundamentals of the webapp could be stored on the phone via the cache manifest.

Assuming you're just typing, and there's not too much to store, you could use localStorage to store document data on the phone in the background. In addition, the phone can attempt to save changes to the server periodically, or when you leave the page.

A periodic asynchronous javascript request could try polling the server to see if there have been any changes in the last few minutes, and ask the user if they want to update these changes. If you're expecting quicker updates, consider using WebSockets instead of xmlhttprequests.

Authentication would be a little more difficult if you plan on incorporating offline work, but it's very possible. In addition, this scheme would require a webhost that allows writing files on a server (most will do that, but it usually costs extra). There may be a way to push text documents to Google Docs, though I've never heard of such a thing.

Hope that has inspired you!

share|improve this answer
    
I definitely hadn't thought of that option! What I'm worried about there is the case where I want to edit a particular document that I haven't previously edited on that device, and I'm offline. This has come up before, when trying various google docs apps. The other issue is if I finish up editing and go to do something else when I'm still offline. Since I'm not in the app when I get back online, things never get synced with the changes I made. I don't think HTML5 can really solve these issue, especially the second one. –  rlpowell May 7 '12 at 19:31

I had the similar needs on Note PC (in my case) to record my text on offline situation so that I created the tool (Please visit http://sourceforge.net/projects/jjjuli/ If you are interestd in). I don't have mobile-gear so that I am not sure how the Juli fits your needs, however, there looks like 'git'(one of major revision control system) on android. So, if the following configuration is OK for you, 'Juli' may work for your needs:

  • text input on android
  • file sync with server by 'git'
  • Juli is installed at server to generate HTML.
    • Juli requires Ruby platform.
  • you can browse the genrated static HTML files remotely.
  • If the generated HTML can be pushed back to mobile or mobile can run Ruby so juli is installed on mobile, you can browse HTML at your mobile directly.

There looks like 'git' on android as:

https://play.google.com/store/apps/details?id=com.madgag.agit&hl=en

share|improve this answer
    
Hi. +1 Great answer! Also, I wanted to thank you for following the community guidelines by disclosing your affiliation to your product when linking to it. Welcome to Programmers! :) –  jmort253 May 27 '12 at 3:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.