[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Experimental controller/routes support in HTTP egg.
From: |
Ed Watkeys |
Subject: |
[Chicken-users] Experimental controller/routes support in HTTP egg. |
Date: |
Sun, 24 Jul 2005 23:12:28 -0400 |
Hi,
A week or two ago, I sent a message about a Ruby on Rails like routes
core I had been working on. Well, I've added support in the HTTP egg.
Enclosed is an archive with the modified egg with an example script.
There are a few problems, but I think it's at the point where people
can see the value of this feature, and perhaps get hooked enough to
help out.
Known problems:
* Http:link-to doesn't always choose the optimal route. I need to
make it search the entire list for the route that produces the
shortest query string.
* Query string parameters are not symbol-ified the way path elements
are.
* Error handling seems screwed up, but I don't know if it's any worse
than the stock http-server error handling.
Approach:
I spliced a check into get/post-handler to see if the URL is
compatible with any registered routes, and if so, a compatible
controller is invoked if one can be found. That's the only procedure
I changed. I added some other glue procedures to http-server.scm,
added an updated version of the source file I released a couple weeks
as http-controller.scm, and updated http.setup so that the new file
will build as part of the HTTP egg.
To do:
* Create some procedures and/or syntax to simplify the writing of
controller procedures.
Regards,
Ed
--
Transmogrify, LLC * <http://xmog.com/>
http-with-controller.tgz
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Chicken-users] Experimental controller/routes support in HTTP egg.,
Ed Watkeys <=