Monday, 12 November 2007

Update: Web programming frameworks

So I've been using Hunchentoot to develop a blogging application. Nothing spectacular. If anyone actually reads this and is interested, I can send you the source.

The best things about it so far:

  • SLIME. Oh man, this has got to be the most productive development environment ever
  • Very flexible/DIY
It doesn't get in my way at all which I like very much. I've been more or less following the LispCast Lisp Reddit episodes (only the source, I don't have enough time to watch the videos!)

One of the most painful points of Hunchentoot is that you cannot accept posted arguments like function arguments as you can with CherryPy. What I would really like to do is something like the following:

(defdynamicpage add-post ( (title string) (content string) &optional (tags list) )
...)

Right now, you have to write some mess like:

(defun add-post ()
(let ((title (hunchentoot:parameter "title")))
(when (empty-parameter-p title)
(hunchentoot:redirect "/"))
...

Where empty-parameter-p checks for null or zero length strings. I'm sure I can write some macro to handle it if I end up caring enough about it.

Also, using cl-who is probably not the smartest thing to do if you want a designer's help. I think the next step will be figuring out the best setup to allow a designer to do her work without requiring knowledge of Lisp.

3 comments:

Eric said...

Hey. This is Eric, the author of LispCast. For the Reddit Clone series, I do plan on implementing a macro that automatically binds function parameters to the http query parameters.

u.int.32.t said...

Lets see who gets there first! I bet on you :-)

Sohail Somani said...

I win, in a half-assed way :-)