views:

921

answers:

17

I'm building an app that authors would (hopefully) use to help them, uh.. author things.

Think of it like a wiki but just for one person, but cooler. I wish to make it as accessible as possible to my (potential) adoring masses, and so I'm thinking about making it a web-app.

It certainly doesn't have to be, there is no integration with other sites, no social features. It involve typing information into forms however, so for rapid construction the web would probably be the best.

However, I don't really want to host it myself. I couldn't afford it for one, but it's mostly that people who use this may not want their data stored elsewhere. This is private information about what they are writing and I wouldn't expect them to trust me with it, and so I'm thinking about making it a thick-client app.

And therein lies the problem, how to make a application that focuses mainly on form data entry available easily to potential users (yay web apps) but also offline so they know they are in full control of their data (yay thick-client apps).

I see the following solutions:

  1. Build it as a thick-client Java app and run a cutdown version on the net as an applet that people can play with before downloading the full thing.
  2. Build it as a Flex app for online and an Air app for offline (same source different build scripts basically).
  3. Build it as a standard web-app (HTML, JS etc) but have a downloadable version that somehow runs the site totally on their computer. It wouldn't touch the net at all.

Ignoring 1 and 2 (I'm looking into them separately), I think 3 would involve:

  • Packaging up an install that contains a tiny webserver that has my code on it, ready to run.
  • Remapping the DB from something like mySQL to something like SQLite.
  • Creating some kind of convience app that ran the server and opened your browser to the right location, possibly using something like Prism to hide the whole broswer thing.

So, have you ever done something like this before?

If so, what problems did you encounter?

Finally, is there another solution I haven't thought of?'

(also, Joyent Slingshot was a suggestion on another question, but it's RoR (which I have no experience in) and I'm 99% sure it doesn't run under linux, so It's not right for me.)

+2  A: 

We are using something similar to your third option to test our websites locally. Works just fine.

Our packaged webserver is not small enough to accomplish what you need, but then again we've not been trying to keep it small either. If you can package your webserver code into a small enough package I don't see why this approach would'nt work.

Gene
+3  A: 

There is an additional option, and that is to use the new HTML5 offline application features, namely the Application Cache, Client-Side Databases, and Local Storage APIs.

Currently I believe that Safari is the only shipping browser to support any of these, and i believe it only supports the client side databases and local storage parts. The webkit nightlies support all of these features, the firefox nightlies support many of them (maybe all now?)

[Edit (olliej): Correction, Firefox 3 supports the Application cache, but alas not the client side DB]

olliej
+1  A: 

Have you checked into google gears?

Daren Thomas
A: 

My suggestion, as you pointed above, is to use a Wiki system to solve your problem. Now the question could be: Wich one?

You can use Trac, it is very simple and you can customize its GUI. But, if you prefer something more advanced please use MoinMoin. I used it for years, and IMO it is a very good and strong wiki system.

Depiste wich wiki you will choose, forget to write your web-app from scratch. According to yor question the best approach is to pick something that works and customize/modify it to fit your needs.

Gravstar
I didn't say it's a wiki system, I said it's *like* a wiki system, and I really only meant in spirit (as in it achieves the same goal). I phrased it that way because a wiki is as close as I can think to what I'm trying to achieve and I don't want to go to the hassle of explaining my product :-)
SCdF
+5  A: 

Google Gears is used to offer a few of the google apps offline (Google Reader, Gmail, Docs and more).

What is Google Gears?

Gears is an open source browser extension that lets developers create web applications that can run offline. Gears provides three key features:

  • A local server, to cache and serve application resources (HTML, JavaScript, images, etc.) without needing to contact a server
  • A database, to store and access data from within the browser
  • A worker thread pool, to make web applications more responsive

by performing expensive operations in the background

Gears is currently an early-access developers' release. It is not yet intended for use by real users in production applications at this time.

If you're a developer interested in using Gears with your application, visit the Gears Developer Page.

If you wish to install Gears on your computer, visit the Gears Home Page. Please note, however, that Gears is not yet intended for general use.

But as you read it's still in early stages.

Davy Landman
Google Gears is just Google's attempt at a proprietary extension to rival SilverLight and Flex, html5 provides much of the same functionality only without the vendor lock in we've been trying to escape for years. Yes I realise that not all browsers support html5 yet, but they will (except maybe IE)
olliej
Some hunting indicates that Safari 3.1 supports client side databases (although chrome apparently turned it off in favour of gears), Firefox supports the Application Cache -- I presume the nightlies of each support everything.
olliej
You missed the 'G' off the start of the Google Gears link :-)
Simon Howard
A: 

Also, I think the moin moin wiki software has a desktop version that includes its own webserver. This stuff is easy in python, since batteries are included.

You might want to check out how they do it?

Daren Thomas
A: 

You could make a dedicated client using Webkit or Firefox's backbone. Some games use that solution for UI for example.

Or you could make a little webserver (I have a little webserver in Lua that I use for similar purposes, just a few megas with libaries and all). However if you take this route the biggest issue to consider is you don't want your webserver to depend on environmental variables, you want it to be totally autonomous. You should try to isolate all variables t o a config file and be done with it (bundle style)

Or you could use a Java client application to display the webpage

Or GoogleGears, but that's the same (almost) as Flex+Air. so choose Flex+Air if that's what you are familiar with

Robert Gould
A: 

You didn't specify a language but I looked at Karigell a few years ago. It's Python web framework, similar to Django or TurboGears, but it doesn't have the overhead of those frameworks.

From my messing around with it, it seems like it would work for your purposes. It has a built-in web server (though you can use pretty much any server you want) and you can use any database that Python supports.

Plus, Python works well with Linux. :)

crystalattice
A: 

If you made the app a regular web app heavily reliant on client-side technologies (using DHTML and the likes of Google Gears to store data offline as already suggested) so once opened, there wasn't much interaction with the server, you could probably host the thing on a basic shared hosting account which wouldn't cost that much. That might be your easiest starting point as you wouldn't have to worry about all the issues with desktop apps such as compatibility with different operating systems, packaging up an install etc, yet you wouldn't need massive server resources behind it either.

Luke Bennett
A: 

You can use HTML, JS and whatever else in Adobe AIR and you'll have plenty of options of saving data locally, too.

Nouveau
Thanks, but I'm looking into AIR separately to this conversation so I'm really looking for thoughts on option 3.
SCdF
+6  A: 

I think you should look at tiddlywiki for inspiration.

It's a wiki written in JavaScript entirely self-contained in a single html file. You load it into your browser as a file:/// URL, so there is no need for a server.

I use it as a personal wiki to keep notes on various subjects.

camh
A: 

in java world you could use jetty for a server, implement web app using your favorite framework and use hsqldb as a database - it lives entirely in your container (jetty). you can deploy preview app on the web and package downloadable offline version.

miceuz
A: 

There's a portable distribution of Apache/MySQL/PHP (to place on USB keys):

http://portableapps.com/apps/development/xampp

This should be easily adapted to your needs.

Joeri Sebrechts
+2  A: 

I think AIR is the way to go..

A: 

You could also consider using XULRunner or Prism

They're the opensource technology that FireFox, Thunderbird and Joost are built on, and allows you to develop apps in XML and javascript essentially against the same rich api that FireFox itself has. And of course this is cross platform too, so it'd work on Mac/Linux/Windows...

Check here for more info: https://developer.mozilla.org/en/XULRunner

Brad Parks
A: 

I was thinking of doing something like this myself. My plan was to write app using django and write script that starts django's testing server and opens default browser on specified port. My plan was to use SQLite...

Also, it would be nice to pack it into one package, so users without django installed can run app without any dependecies...

+1  A: 

Some pointers for solution 3:

  • for the GUI part, ExtJS seems really nice.

  • for the storage part, there is a nice javascript library that abstracts different storage backends: PersistJS.

Supported backends for PersistJS:

  1. flash: Flash 8 persistent storage.
  2. gears: Google Gears-based persistent storage.
  3. localstorage: HTML5 draft storage.
  4. whatwg_db: HTML5 draft database storage.
  5. globalstorage: HTML5 draft storage (old spec).
  6. ie: Internet Explorer userdata behaviors.
  7. cookie: Cookie-based persistent storage.
elhoim