Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion web application framework
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adrian Kubala  
View profile  
 More options Nov 10 2003, 4:15 pm
Newsgroups: comp.lang.scheme, comp.lang.lisp
From: Adrian Kubala <adr...@sixfingeredman.net>
Date: Mon, 10 Nov 2003 14:41:14 -0600
Local: Mon, Nov 10 2003 3:41 pm
Subject: Re: web application framework

On Mon, 10 Nov 2003, Noel Welsh wrote:
> WebIt! is that "lowest-level layer" (and a bit of the middle layer).
> For example, it sounds like you want to write code like:

> (define name-form
>   (form
>     (name "Foo")
>     (field (name "Name") (type 'text) (content "Enter your name here"))
>     (button (name "Submit")))

> That could be a valid WebIt! document and you'd then write a WebIt!
> transformation to turn it into HTML.  You could also write:

At this level I don't see what great advantage WebIt! provides over a
handful of format-string functions. And if I needed to write AST->AST
transformations, why not do it with macros? I will concede that maybe all
the macros and functions I'd write would end up re-implementing WebIt!, or
maybe there's some emergent benefits to the collective WebIt! system that
I don't see yet.

But since you asked I'd like to at least write code like this, which is
analagous to what I do in PHP (just less verbose):

;;;;;
(def-form name-form
  (row-field-group
    [field name
           :label "Name"
           :checker (lambda (v)
                      (if (= (string-length v) 0)
                          "~a must not be blank."))]
    [button submit
            :label "Submit"
            :action (lambda (form context)
                       (context=>form context form)
                       (let ((model (new-name-model)))
                         (and (validate-form form context)
                              (form=>model form model)
                              (save-model model)
                              (add-form-message form "Success!"))))]))
(process-form name-form)
(render-form name-form)
;;;;;

But I'm hoping that I'll discover some completely new ways to do things.

> You could use SISC and write bindings for the Java toolkits that do
> what you want.  This is less work and has been done succesfully in
> industry.  See e.g. "Scheme in the Real World" at
> http://www.lshift.net/news.280903lispconference.html

That's a good idea I hadn't considered, thanks.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.