on-rev example: 'globals.cgi' conversion

François Chaplais francois.chaplais at mines-paristech.fr
Sat Apr 18 16:29:01 EDT 2009


Le 18 avr. 09 à 10:33, Andre.Bisseret a écrit :

>
> Le 18 avr. 09 à 06:03, Phil Davis a écrit :
>
>> A quick on-rev example:
>> Just to get started, I converted my 'globals' CGI script to an on- 
>> rev web page:
>>
>>  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>>  <HTML>
>>  <HEAD LANG="en">
>>  <TITLE><?rev  put the short date && the long time  ?></TITLE>
>>  </HEAD>
>>  <BODY>
>>
>>  <p>Server Globals</p>
>>  <div style="padding-left: 12px">
>>  <?rev
>>  put the long seconds into tStart
>>  put the keys of $_SERVER into tList
>>  sort lines of tList
>>  repeat for each line gVar in tList
>>    put gVar && "=" && $_SERVER[gVar] & "<br>"
>>  end repeat
>>  put "version,processor,systemVersion,platform,environment" into  
>> tExtras
>>  replace comma with cr in tExtras
>>  repeat for each line tLine in tExtras
>>    put "the" && tLine into tLine2
>>    put tLine2 && "=" && value(tLine2) & "<br>"
>>  end repeat
>>  ?>
>>  </div>
>>  <p><?rev  put "This page of code executed in" && the long seconds -
>>  tStart && "secs."  ?> </p>
>>
>>  </BODY>
>>  </HTML>
>>
>> And here's what it looks like in the browser:
>> http://phildavis.on-rev.com/globals/index.irev
>>
>>
>> I love being able to reuse my Rev know-how this way!
>> -- 
>> Phil Davis
>>
> Bonjour,
> Clicking on the URL I get the following lines
> Being rather naive about web programming, I must confess, I am still  
> "in the dark" ;-))
> Was it really what you expected one discovers?
>
> I was expecting something like a beautiful web page ;--))
> Naive indeed as you may notice ;-)))
>
> Best regards from Grenoble
> André
> -------------------------
> Server Globals
> DOCUMENT_ROOT = /home/phildavi/public_html
> GATEWAY_INTERFACE = CGI/1.1
> HTTP_ACCEPT = text/html,application/xhtml+xml,application/ 
> xml;q=0.9,*/*;q=0.8
> HTTP_ACCEPT_CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.7
> HTTP_ACCEPT_ENCODING = gzip,deflate
> HTTP_ACCEPT_LANGUAGE = fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
> HTTP_CONNECTION = keep-alive
> HTTP_HOST = phildavis.on-rev.com
> HTTP_USER_AGENT = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5;  
> fr; rv:1.9.0.8) Gecko/2009032608 Firefox/3.0.8
> PATH_TRANSLATED = /home/phildavi/public_html/globals/index.irev
> QUERY_STRING =
> REMOTE_ADDR = 82.122.7.167
> REMOTE_PORT = 49201
> REQUEST_METHOD = GET
> REQUEST_URI = /globals/index.irev
> SERVER_ADDR = 74.54.153.72
> SERVER_ADMIN = webmaster at phildavis.on-rev.com
> SERVER_NAME = phildavis.on-rev.com
> SERVER_PORT = 80
> SERVER_PROTOCOL = HTTP/1.1
> SERVER_SIGNATURE =
> Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5  
> mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635  
> Server at phildavis.on-rev.com Port 80
>
> SERVER_SOFTWARE = Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e- 
> fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/ 
> 5.0.2.2635
> the version = 3.5.0-dp-6
> the processor = unknown
> the systemVersion = unknown
> the platform = linux
> the environment = server
>
> This page of code executed in 0.00021 secs.
> -----------------------
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

I agree with Andre. To the average web user, what is displayed is  
pretty awful, and, even to a person with little rev experience such as  
me, the actual rev script is shorter and simpler to understand than to  
web output. This is not meant to be aggressive towards Phil, but I  
hope the engineers at the mothership will come up with some examples  
more convincing than that. Hey, 499 bucks is the price of a juicy  
Enterprise edition!
Really, there must be a way to make this good looking, no?

No hard feelings, really

François






More information about the use-livecode mailing list