Hi all:
This time I am scratching my head on how to implement the following:
(and don't worry the spaces before and after parantheses)
###
(define-class class-1 ()
( slot-1
slot-2
slot-3 ))
(define-class class-2 ( class-1 )
( slot-4
slot-5 ))
(define-relation class-1-to-class-2
class-1 *
class-2 0..1 )
(define-acl class-1-acl
class-1 '((modify '((user :in (frgo user-group-1))
(group :in (user-group-1 user-group-2))))
(read '((user :in (user-group-2))))))
(define-group user-group-1
:class :normal-user)
(define-group user-group-2
:class :super-user)
(define-user frgo
:full-name "Frank Goenninger"
:mail-address ·····@not-really.org"
:groups '(user-group-1 user-group-3))
###
The aim is to come up with a way for a "simple user" (as in "I don't
know how to program, let alone Lisp") to define a data model that is
then used as the basis for an application.
Clearly this is a DSL to be implemented using some macrology. So,
that's basically clear. What I am thinking about is if I should use a
CLOS-based approach to do it or not. I have been looking into the
ContextL (by Pascal Costanza) implementation and could imagine to
duplicate elements of it - and even using ContextL for the ACL (Access
Control Lists) stuff.
Another approach would be to go the same route as Cells (by Kenny
Tilton) and avoid CLOS but rely on macros entirely to do it.
Adding to this is the fact that I will be using Cells to model
dependencies between data containers ...
Also, I see that there is a two-stage process for the application to
come to life:
Phase 1: Data Model Definition & Publication
- Define data model using DSL
- Launch a "generator" that "runs" the data model definition and
generates a database as well as a runtime Lisp compiled file to be
loaded into an image.
Phase 2: Run Application
- Start the application's base image
- Load the generated data model compiled file
- Start accepting user interaction
Am I somehow on the right track or I am "confusing myself" here? Any
examples out there?
TIA!!
Frank
--
Frank Goenninger
http://web.mac.com/frgo/
frgo(at)mac(dot)com
"Don't ask me! I haven't been reading comp.lang.lisp long enough to
really know ..."