[armedbear-devel] Web frameworks with ABCL (was Re: SBCL->ABCL migration questions)

Mark Evenson evenson at panix.com
Tue Aug 27 08:01:20 UTC 2013


On 8/26/13 6:24 PM, Rich Morin wrote:
> On Aug 26, 2013, at 05:26, Rudi Schlatte wrote:
>> Now that abcl has a mop implementation, a port is theoretically
>> possible.  In fact, porting the existing X-Windows backend should
>> not be too much work.  ...
>
> "theoretically possible" isn't too encouraging.  Maybe I should
> take a closer look at my goals and (still speculative) approach.
>
> The program uses McCLIM to provide a single, tabbed window.  I'd
> like to retain the back-end logic, but replace the front end with
> a JavaScript single page application, using D3.js, jQuery UI, etc.

[…]

> So, recasting the question, are there any web server libraries I
> should consider?  I'd like something pretty minimal (ala Rack or
> Sinatra); all I need to do is handle requests from a client and
> respond with appropriate data structures (eg, JSON, EDN).
>

I like building CL web apps with [RESTAS][] to map the URI space on top 
of Hunchentoot, using [Parenscript][] to glue together the necessary 
Javascript libraries.  RESTAS uses a similiar abstraction as Ruby on 
Rails' "routes" to quickly hook representations into the URIs your 
application serves.  I use Parenscript so that I don't make so many 
mistakes writing client closures, as the Parenscript compiler can only 
emit syntactically correct Javascript.  Usually, I end up creating 
semi-general macros to write the actual content with [CL-WHO][], as I 
find that I need to abstract the "content domain" in a per-application 
manner, which I end up refactoring over the course of the project, 
tweaking for expressive power vs. maintainability.  The trick about such 
apps always seems to lie in the separation of the content (per-MIME 
"Content-Type"), the presentation (CSS), and the logic (Parenscript 
wrapped Javascript).  While I like dealing with everything in s-exprs, 
there are many good reasons for using appropiate DSLs in other 
templating systems (like Sinatra), such as when one has a person helping 
out who is especially profficient at browser Javascript and/or CSS/HTML.

[RESTAS]: http://code.google.com/p/restas/
[Parenscript]: http://common-lisp.net/project/parenscript/
[CL-WHO]: http://weitz.de/cl-who/

>
> On a related front, I'd love to hear about any work in using EDN
> with Common Lisp:
>
>    https://github.com/edn-format/edn
>    https://github.com/edn-format/edn/wiki/Implementations

Given the list of implementations that you have cited--and knowing 
nothing about EDN--I would go for using CFFI to the C implementation, 
knowing that one could possibly use Jython or JRuby to orchestrate their 
implementations of EDN as a backup.

-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."



More information about the armedbear-devel mailing list