[parenscript-devel] Sharing code between client and server?

Axel Rauschmayer axel at rauschma.de
Wed Feb 3 14:06:33 UTC 2010


>> - Do I use the Parenscript constructs on the server? Not having CLOS
>> seems a shame.
> 
> You need to hide any CL-but-not-PS functionality under macros. Red
> Daly's Suave project (http://common-lisp.net/project/suave/) includes
> a CLOS for Parenscript though.


The Suave sub-project PSOS does two things that I think should become part of Parenscript:
- The same way of object-orientation works on the server and the client (in my experience, code overlap does happen, mainly in helper methods and the structure of the data).
- Instances maintain the correct instance-of relationship when transferred between client and server.

But, it does seem to introduce generic functions which would go against the goal of Parenscript to produce code that is close to what one would hand-code in JavaScript. Instead, I would favor generic functions that are specialized on the first argument only and then translated to JavaScript's flavor of object-orientation (maybe with the addition of class-based inheritance; but that can be borrowed from jQuery or Dojo).

Does this make sense? I am applying the experiences I have had with GWT to Parenscript, but that might not be the way to go.

Axel

-- 
Axel.Rauschmayer at ifi.lmu.de
http://www.pst.ifi.lmu.de/~rauschma/







More information about the parenscript-devel mailing list