The approach I took with Well is somewhat similar.
The client keeps track of the current working location (either a
directory, file, location inside a file or an application) and command
history and you can also write commands in pure javascript. (The
client tries to run a command as javascript first, then passes it on
to the server if it can't find a matching function.) Well (the client
or the server) doesn't really have a concept of an environment beyond
the OS's default environment on the server (maybe I should change
that), however the client has 'contexts' which are objects with
properties/methods associated with the current location, managed by
whatever app is responsible for handling the current location. Aside
from dynamic changes to the current context, all of this survives
server restarts and page reloads because of being stored in either
sessionStorage or (for data about the location) the hash fragment.
The server behaves pretty much like a normal web server, and I've
tried to stick to a RESTful architecture. The web server does have
sessions (and hence a server state), which are mainly used for
authentication at the moment. Right now, sessions are stored in plain
text on the hard drive --- obviously not good, but it means they also
survive server restarts. I imagine there might be apps that make use
of sessions, particularly for managing multi-client interactions (e.g.
games, chat), but for single-client cases, I think sessionStorage,
etc. work best.
I hope all that made sense!
I think minimal servers (whose sole functions are to send out the
client app + provide a shared database) will become very important in
the future, so I find jsshell very interesting. Unfortunately, the
Well server certainly ain't minimal, largely because I'm also trying
to keep compatibility with existing programs and systems.
On May 27, 3:50 am, Ian Bicking <
i...@colorstudy.com> wrote:
> Cool to see what people are up to. I thought I'd continue with
> introductions and just give a quick overview of something I've hacked on
> some, JSShell (
https://github.com/ianb/jsshell)
>
> JSShell I guess might be different than some of the other tools in its
> minimal server interaction. The server component does very little except
> execute commands (basic signature: cwd, env, arglist) --
https://github.com/ianb/jsshell/blob/master/server.coffee#L19-L46. It