Re: instant Lisp web application publishing



I see two potential problems:

- flow of control. A web app is not just a bunch of dynamic pages; it
has to maintain some state (on session, db etc.) AND follow a certain
flow of control (e,g. first log in the user, then show page x, than
page y etc.). Making every function callable with any arguments, in
any order, is going to be messy IMHO.

- debuggability/easeness of coding: (Lisp) people usually work with
emacs + slime or some other kind of IDE which makes some things easier
(e.g. compile or eval arbitrary forms with a keystroke, inspect
objects etc...) this would not be present in a web-only development
cycle.

That said, your idea is less crazy than it seems ;) but perhaps I'd
organize things in a more layered fashion:

- at the core, some "essential" functions and macros such as db
access, html rendering (maybe widgets library too), state/flow of
control management.
- on top, an "environment" layer consisting of web-based debugger,
inspector and editor (not the size of a web-emacs of course - that
alone would require decades!)
- at user level, a web-development centered, dummy-friendly, lisp-
based hyphenated-word-named DSL which allows to code most common
webapps in itself (and of course allows experts to use the full power
of Lisp if they want)

of course, all of this is HUGE. But, things can start small and grow
with time... the idea of a wiki-style webapp builder entices me
(click. "this action/view is not defined. You can create it now, just
type the code here...").

Btw, I'm currently wasting my little spare time on yet another web
framework (which sucks much more than those we have now, but it's
MINE! my treasssure...), and maybe someday it will see the light of
day... and, in the Design (= dreaming) Phase which precedes
Implementation (= hitting the reality wall) Phase, I vaguely
contemplated an idea like yours... but that bitchy rational side of my
brain quickly dismissed it.

So... good luck with your project, if you manage to release something
I'll be happy to give advice (and maybe hack on it, if I have time...)

cheers,
Alessio "doesn't have a nickname" Stalla

Alex Mizrahi ha scritto:

Catchy title, ye?

I've got idea to implement something like that about 1.5 years ago, but
actually tried to implement it this New Year (yes, I was actually coding in
New Year's night, I'm kinda freak).

So, what this actually is:

* it has sort of global database of a special kind -- a triple store, that
is a list of triples:

(subject predicate object).

or in Object Oriented terminology: (object property-name propert-value).

People who follow modern trends already know that it is related to RDF,
heart of Semantic Web, or Web 3.0 as some people call it.

But we do not want buzzwords here, for practical purposes it's just a very
flexible database that can be easily mapped into OOP terminology (so you
work with database like you do with CLOS objects), but it also has very
powerful query language -- comparable to SQL, but more of Prolog style.

(it's also possible to have some database schema (i.e. RDFS) and
inferencing, but I didn't bother to deal with it so far)

* Lisp functions (and macros) are stored in this database and are persisted
in this way.

* it provides web access to (some of) this function. i.e. you call:

http://example.com/myfunction

and myfunction is called to generate page dynamically. If you call

http://example.com/add?a=1&b=2

function add will be called with parameters a and b.

(of course these are only examples, it can be a bit more complex to validate
variables etc).

* people can create and edit functions via web, and create new pages

* people can edit database via web (certainly editing functionality can be
provided via functions published).

And that's actually all. With such functionality it's possible to create
dynamic web sites of arbitrary complexity with just web browser.
And it's also possible to create new "frameworks" and instantly share them
with other people.
For example, one can publish macros that will make certain kind of DB
queries in easier way and do automatical formatting.
Other people can create, for example, Visual Programming Framework that will
allow others to make pages w/o Lisp programming.

I think at this point attentive reader would say: "That's nice, but it would
be chaotic. What's about security?".
Yes, this stuff needs access control for functions and data, and a lot of
security. Possibly private databases too.
I haven't implemented this stuff yet, but i believe it's possible. For now I
assume it will be used by sane people only (Lisp programmers are sane,
right?), so I'm leaving security stuff for future.

And at this point should be a link to try the beast in action. But
unfortunately there is no -- I haven't deployed it yet.
It's not actually an vapourware -- I've actually implemented it and tried in
action by New Year, but it needs to be polished a little (at least) and
deployed on a server, and I postponed it since that time.

Actually I hope to recieve some feedback that will motivate me to finally
deploy the thing -- more feedback I'll recieve, more likely deployment will
happen :).
If I'll get no feedback, I'll freeze this project for indefinite time, I
have some other stuff to do too..

Also I don't have a good candidate server to deploy it too. I'm considering
deploying it to vmware virtual machine on my friend's machine which is
generally available to internets -- but i'm not sure if my friend will like
this idea :), and machine is not in datacenter so it doesn't have 100%
uptime.
So if somebody has server resources to donate and is not scared by insecure
beast running in vmware (I believe even if it will be totally hacked only
virtual machine will be lost, but there's always subtle chance to skrew
whole thing..) -- I'd be very grateful.

As for implementation details, it's based on ABCL-web and is very simple --
DB access and web engine are already implemented as part of ABCL-web (and
they are simple too), so the "publishing platform" is just a thin layer on
top of this. I know some people will consider ABCL-web a bad platform -- but
if it's already deployed and works, who cares? :)

Of course, the way it works now is just like a conceptual prototype -- it
has little practical usage, other than prototyping some stuff maybe. But I
believe it can evolve into something really useful and cool. And it seems to
be a good demonstration of Lisp -- "code is data" and macros are used. There
are many things it can evolve into:

* Lisp webapp easy hosting and development
* Lisp webapp development/deployment/management platform (this assumes
there is no central server but people install the thing on their own servers
and manage them)
* Semantic Web application wiki (this assumes it should have some easy
programming interface -- macros for simplicity, HTML templates, visual
designers etc)
* a global database for everything (same as above + massive data hosting)

And I'm not sure what is best way... My original idea was a "global database
for everything", but I've found it too ambitious :), so I think it can solve
some utilitary needs too.
I'd be very glad to here what people think would be the most useful thing --
for Lisp community and for mankind :).

with best regards, Alex 'killer_storm' Mizrahi.
.



Relevant Pages

  • Re: Using SQl to store aspx pages and memory problems
    ... The solution I was looking at would be to create some specific server side ... I want the data to be saved in the page so I thought that a asp.net control ... the original design and one that ensures that future system changes will not ... > database isn't some sort of magic pixie dust that solves all problems. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: The right database for the job?
    ... Note that "many updates ... > the programmer that have to fix somebody elses code and/or database ... > devices under its control, it connects to a central "DB server" program ...
    (comp.databases)
  • instant Lisp web application publishing
    ... flexible database that can be easily mapped into OOP terminology (so you ... Lisp functions are stored in this database and are persisted ... deploy the thing -- more feedback I'll recieve, more likely deployment will ... Also I don't have a good candidate server to deploy it too. ...
    (comp.lang.lisp)
  • Re: Recordset.AddNew and the recordset objects data retaining
    ... consider doing this on a server in order to ... de-couple you solution from the client PC configuration / resources. ... I can't even control the machine that these jobs are run. ... >> It seems to me your real liability is the round trip database time. ...
    (microsoft.public.data.ado)
  • Re: File permissions reverting to old state after reboot.
    ... One of the shared directories contains a Quickbooks database ... control over the QB database. ... What protects your server from anyone getting into it and screwing up ...
    (alt.os.linux.suse)