[plt-scheme] Embedding scheme in web pages

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Mon Jan 22 12:16:15 EST 2007

--- Brent Fulgham <bfulg at pacbell.net> wrote:

> Noel,
 What do you view as being the 'right' way to build such
> web sites?  

Hire Untyped.  :-D

For small projects it doesn't really matter. For static
sites I like WebIt, as it has exposed me to some new ideas
and is very compact.  Anything reasonable would do (a core
requirement for reasonableness parameterisation; textual
inclusion doesn't cut it).  As Eli said, HTML lacks
abstraction, which you want in a sizable project.  Also,
the actual HTML soon becomes a relatively small part
compared to the code.
So what about large projects?  I can sketch out what we're
doing at Untyped:

MVC is the basic architecture.

The model involves validation, and shipping data to and
from the data store, in our case a relational DB. 
Validation is just code, though you can capture common
patterns in libraries.  The data <-> DB mapping is fairly
standard.  Our implementation, supporting Postgres and
SQLite is here:


We are missing some features:

  - relations between data
  - richer type declarations
  - better query language

Adding relations implying worrying about caching and so on.
 It's a lot of work but onthing new.  Ditto for richer type
declarations.  Query languages were done in the 90s
(basically, comprehensions over DBs) but we have a slight
wrinkle as we want to talk about domain objects, rather
than DB constructs most of the time.  So we want to say:

  SELECT users WHERE type = 'programmer

rather than

  SELECT name, type, email FROM users WHERE type =

Note that we don't expect to use SQL syntax; I'm just using
it here to illustrate a point in a way I hope most will

The other half of the system boils down to solving the
problem of communication between components.  Flapjax has
demonstrated that FRP is a good way of developing client
side components.  We intend to use FRP on the server side,
where we can get away with some significant simplifications
as data arrives synchronously.  If you read the work in
Haskell (e.g. "FRP Continued") you'll see that synchronous
FRP boils down to store passing style; add mutable state
and it just disappears.  So a library is only needed to
make the system easier to use.

So, that's the plan.  We're about 1/2 way there.


Email: noelwelsh <at> yahoo <dot> com   noel <at> untyped <dot> com
AIM: noelhwelsh
Blogs: http://monospaced.blogspot.com/  http://www.untyped.com/untyping/

Never Miss an Email
Stay connected with Yahoo! Mail on your mobile.  Get started!

Posted on the users mailing list.