ANN: revHTTPd next generation (please read, many many goodies inside)

Andre Garzia soapdog at mac.com
Mon Jan 19 12:19:42 EST 2004


Hi Folks,

Some might know my old project revHTTPd which is a web server made in 
revolution. Some might even notice a project called btnHTTPd which is a 
self contained web server in a button. Well, I just made a huge effort 
this month to deliver you all the next generation of HTTPd interfaces. 
My english is a little bad and there are no many news that I am afraid 
I deliver them in a fuzzy way. Let's go slowly now.

First the server is now a self contained button, you might add it to 
any project of yours by placing it on your stack. You configure it by 
it's custom properties and command it by sending messages to it.

The focus on this project is not to serve web pages but to connect 
Revolution to a Browser interface. Althought the server can serve local 
files, It's true marvels are what it can do to serve stacks as pages.

First we've got a cool URL mapping scheme that is like this:

/Stack								---> Send default_html to the stack.
/Stack/Message						---> Send message to the Stack
/Stack/Card/Message					---> Send message to card of stack.
/Stack/Card/Button/Message				---> Send message to button of card of 
stack (this is like a design decision, messages default to button if no 
object type is present)
/Stack/Card/ObjectType/ObjectName/Msg	---> Send msg to obj of card of 
stack like: /MainStack/1/field/email/clearText (would send "clearText" 
to field email)

This way I can for example access a URL a button like this 
http://home.soapdog.org:8081/quotes/2/button/refreshquotes/mouseUp, 
this would trigger the mouseUp of button adduote on card 2 of stack 
quotes. Pretty easy! Enought for URLs.

The server is now supporting the POST method and GET method, it will 
look for POST Data and look inside document request URL for GET data... 
it will map HTML/URL Field names to Revolution Field names, so if I 
access http://home.soapdog.org:8081/about?card=1 it will look for stack 
"about" and for a text field named card in it, if it find one it will 
fill it with "1", Thats automatic. It fills the fields before sending 
the message (so that you can proccess them). This way you can write 
whole web apps just by using our familiar ways of stacks, cards, fields 
and messages.

We created a Revolution Field to Web Engine called Inform. Inform can 
take any card of any stack and will parse it taking all fields and 
making a nice HTML form of it. It will fill the form with the currrent 
fields values, and since the server do the map back automatically, you 
can focus on the "processPost" message that is sent to your stack for 
the rest is taken care.

For you all to wonder, with this framework I was able to create a Blog 
engine in 10 lines, was able to create a Fotolog engine in also 10 
lines. I created a Instant Message in some 30 lines.

I want to stress test and demo this new server before releasing it this 
week, so if you're interested in it or plain curious, point you browser 
to http://home.soapdog.org:8081
I am leaving this server running here, fiddle with it leave feedback, 
see the runtime screenshots... inspect it the way you can, it's a nice 
job. Mind that my home connection is not the best one and the server is 
not failsafe yet... but you might like it...

Cheers


Andre Garzia ð 2003
imac2 ibook p100 e uma torradeira....


More information about the use-livecode mailing list