Rev, CGI, net-savvy apps and the future! (was Re: Execution from web-?possible)

Andre Garzia soapdog at mac.com
Wed Apr 21 12:36:26 EDT 2004


On Apr 21, 2004, at 7:55 AM, Marian Petrides wrote:

> That's fantastic.  It exactly what I was looking for:  distribute a 
> "key" stack that then allows the user access to the actual content in 
> non-standalone stacks over the web. Cool.
>
> Many thanks!!
>
> Marian
>


Marian et al,


I was away from the list for a couple days so I could not take part on 
the joyfull discussions about Rev and CGI. What we can do in Rev is 
amazing, from simple CGI to full net-savvy desktop apps. To give you 
all some links to dabble and some code to be inspired, I'll summarize 
some links here and talk about the future.


There are many ways for one to create CGIs in Rev. CGIs are nothing but 
command-line executable files that will take input from standard input 
and pipe answers to standard output. It's like processing text, nothing 
more. There are some rules of course and that (for HTTP) can be better 
understood by reading HTTP Made Easy, it's a vey simple and direct info 
on HTTP and implementing it. (at www.jmarshall.com/easy/http/) After 
understanding that, you guess that you can do cool stuff in Rev. You 
can do your CGI by hand, from the scratch, you must install the 
Metacard Engine for your server architecture, set the correct 
permissions, and then is just plain cgi building. But you might not 
want to reinvent the wheel, so you've got some cool options.

First is Rodney's LibCGI which is an amazing piece of code. It's to be 
used with APACHE server, and it will make your life easier. It will 
take enviroment variables that apache sets and put in a nice array so 
that your app can access it easily. It will also sport some primitives 
for sending and acquiring data from/to the server. It's simple and 
elegant. it's home is http://rodney.weblogs.com/libcgi   by the way, 
look that Rodney uses Manila for his weblog, and Manila is the Best CMS 
EVER!!!!! (man, I am just a Userland fan)

You can also opt for using my own ServerWorkz Plataform which is a 
self-contained solution. It's a HTTP server, a development framework 
and suite of utilities. It has simple primitives like LibCGI for 
sending and receiving data and some high level functions for templating 
and action triggering. This plataform makes any stack web-savvy, it's a 
simple button you place on backscript, and a suite on the front. it has 
very cool features like an automatic way to convert cards to HTML 
(field based ones, for simple dbs) and you can call a handler like this 
http://myserver.com/myStack/myButtton/mouseUp  and it will send for 
mouseUp handler... nice thing. I will not keep talking about my 
creations here, you're all invited to look and fiddle with it at 
http://home.soapdog.org:8081/

Keep in mind this LibCGI is apache based so it's able to answer 
multiple connections and to be used in a heavy stress enviroment. 
ServerWorkz will answer only one connection at a time (I think) and was 
not stress tested (it survived 1700 hits in 5 hours, so I think it's 
good)

This is enought for CGI... let's talk about the future, or, net-savvy 
desktop apps. meaning non-browser-based netApps. To get you started on 
the topic, please read "Beyond the Browser" from Richard Gaskin of 
Fourth World (http://www.fourthworld.com/embassy/articles/netapps.html) 
This reading changed my whole programming paradigm,  it's like the 
felling when you read your first book on your own and discover that 
there's a brand new world out there. As you concluded, the best way, is 
to create a distributable splash screen that will load a stack from 
remote, you can see this working by using the revNET pluggin. It's 
exactly that, take a look 
http://www.fourthworld.net/revnet/Go_RevNet.rev

This technique is a very powerfull one, it allows you to always deliver 
up-to-date software and to be in control. But after loading from 
remote, what happens? how do my software can comunicate with it's 
friends. ServerWorkz can serve as lingua franca, there's a simple chat 
app that will use ServerWorkz as net protocol. You can check the IPC 
group too LibIPC is a great initiativa (IPC = Interprogram 
comunication), the group is on yahoo!groups. It's not just a matter of 
building software that executes from serverspace, we should make them 
all talk and interact, we should be creating something like a netApp 
space. With public services available. That could be a nice tech demo 
for us, and with revZeroConf, discovering services is pretty easy.

Since the interest in this topic, I'll assemble some utilities I have 
here and make them public. I hope we can summon some sinergy here and 
advance our plataform forward!

Cheers
Andre

-- 
Andre Alves Garzia ð 2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org



More information about the use-livecode mailing list