LiveTalk = ECMA script
Moderator: Klaus
LiveTalk = ECMA script
Tighter integration of the RunRev language with the browser's DOM –even better, develop a Stack browser that also supports browsing regular websites.
I ought to be able to do the following:
<script language="runrev">
--- DOM-manipulation RunRev script
put the first form of this document into theForm
send submit to form TheForm
</script>
Even better. Maintain the card metaphor.
<script language="runrev">
send "mouseUp" to button "submit" of card "form" of stack "http://www.mysite.com/card.rev"
</script>
I think that would be an instant success, especially if the scripting language becomes open source...JavaScript has so many problems, zillions of people would embraze RunRev in a year or two, because:
- It's so much easier.
- The whole script engine is controlled by a single vendor/organization --in this case, it is goodness.
- Integrated IDE in the browser that is 10 times better than say Firebug
- Scriptable (customizable) browsing
I ought to be able to do the following:
<script language="runrev">
--- DOM-manipulation RunRev script
put the first form of this document into theForm
send submit to form TheForm
</script>
Even better. Maintain the card metaphor.
<script language="runrev">
send "mouseUp" to button "submit" of card "form" of stack "http://www.mysite.com/card.rev"
</script>
I think that would be an instant success, especially if the scripting language becomes open source...JavaScript has so many problems, zillions of people would embraze RunRev in a year or two, because:
- It's so much easier.
- The whole script engine is controlled by a single vendor/organization --in this case, it is goodness.
- Integrated IDE in the browser that is 10 times better than say Firebug
- Scriptable (customizable) browsing
Last edited by ooper on Sun Oct 03, 2010 10:50 pm, edited 1 time in total.
Re: Replace Javascript with RevTalk
I would like that very much, too, especially since I am writing a program that encrypts data which later needs to be decrypted by a Javascript.
Regards
Regards
Re: Replace Javascript with RevTalk
You'll probably want to check out on-rev hosting (http://www.on-rev.com). That's exactly what it does. The server scripting engine hasn't been released for general-purpose server installation yet, but if you have a site hosted on the on-rev servers you can just write the scripts in rev instead of <insert another default scripting language here> and you're done.
Re: Replace Javascript with RevTalk
Thanks for the pointer. I have already had a look at the on-rev offer, but find it a bit expensive compared to my current server hosting arrangement (without traffic limit at an affordable price). But the possibility to write the web page code in RevTalk is very tempting, especially if I compare the ease of RevTalk to the clumsy brittleness of Javascript.
Re: Replace Javascript with RevTalk
Somewhere on the map to the future is the plan to release a revTalk server engine for use on servers other than on-rev. I couldn't say how far off that is, but I know it's something that others have been after as well.
Re: Replace Javascript with RevTalk
That I would find rather thrilling, and be willing to pay for that, too 

-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace Javascript with RevTalk
Does your host allow compiled CGIs? If so, you should be able to run the Rev runtime engine to drive CGIs, and with that you have the merge function.ukimiku wrote:Thanks for the pointer. I have already had a look at the on-rev offer, but find it a bit expensive compared to my current server hosting arrangement (without traffic limit at an affordable price). But the possibility to write the web page code in RevTalk is very tempting, especially if I compare the ease of RevTalk to the clumsy brittleness of Javascript.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Replace Javascript with RevTalk
I don't know whether my host allows compiled CGIs. I have been using a couple of Pearl CGI scripts but they were uploaded as plain text. I have never tried compiled CGI's. Could you please elaborate on a few lines about the possibility to "drive" CGIs via the Rev Runtime engine? How would I benefit from the "merge function"? Sorry for all the questions, this is quite new terrain for me.
Regards,
Regards,
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace Javascript with RevTalk
To use the Rev runtime engine on your server as a CGI, just copy it to your server and set the permissions to executable. Details available here:
http://www.hyperactivesw.com/cgitutorial/
Once you have the CGI in place, you can do all sorts of common CGI tasks, where you send data to it using either GET or PUT and return the result. You can call your CGI from a web page or even from a stack if you like.
The merge function opens up all sorts of different options, not just for server work but for a lot of common tasks in desktop apps too. Merge simply lets you put placeholders in any arbitrary text -- such as in web pages -- and those commands are executed as though called using the value function, e.g.:
If that was in a text file named "template.htm", our CGI can use it like this:
That's useful enough, but it still requires that you call the CGI directly, and that the CGI knows where the template is that it's supposed to use.
When you write enough of these that you're looking for a simple way to pass templates to your CGI, we can explore how to use mod_rewrite on your server to do just that.
The revJournal blog is driven by this combination, using the v3 CGI engine, a small CGI file that passes the ".irv" requests through the merge function, and a mod_rewrite directive to automatically pass those requests to the CGI:
http://www.revjournal.com/blog.irv
http://www.hyperactivesw.com/cgitutorial/
Once you have the CGI in place, you can do all sorts of common CGI tasks, where you send data to it using either GET or PUT and return the result. You can call your CGI from a web page or even from a stack if you like.
The merge function opens up all sorts of different options, not just for server work but for a lot of common tasks in desktop apps too. Merge simply lets you put placeholders in any arbitrary text -- such as in web pages -- and those commands are executed as though called using the value function, e.g.:
Code: Select all
Today is [[the long date]]
Code: Select all
# rev -ui
on startup
put url ("file:template.htm") into tData
put merge(tData) into tData
put "Content-Type: text/plain" & cr & cr
put tData
end startup
When you write enough of these that you're looking for a simple way to pass templates to your CGI, we can explore how to use mod_rewrite on your server to do just that.
The revJournal blog is driven by this combination, using the v3 CGI engine, a small CGI file that passes the ".irv" requests through the merge function, and a mod_rewrite directive to automatically pass those requests to the CGI:
http://www.revjournal.com/blog.irv
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Replace Javascript with RevTalk
Richard,
thanks a lot for taking the time to explain. The documentation you linked to appears to be well written and comprehensive. I already feel the urge to try this out. Now I must determine whether my server allows for compiled CGIs. Exciting...
I get now what "merge" does. Quite practical!
Do you happen to know any web hosters that would allow the Runtime engine to be invoked as a skripting engine?
Regards,
thanks a lot for taking the time to explain. The documentation you linked to appears to be well written and comprehensive. I already feel the urge to try this out. Now I must determine whether my server allows for compiled CGIs. Exciting...

I get now what "merge" does. Quite practical!
Do you happen to know any web hosters that would allow the Runtime engine to be invoked as a skripting engine?
Regards,
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace Javascript with RevTalk
Glad that was helpful.ukimiku wrote:Richard,
thanks a lot for taking the time to explain. The documentation you linked to appears to be well written and comprehensive. I already feel the urge to try this out. Now I must determine whether my server allows for compiled CGIs. Exciting...
I get now what "merge" does. Quite practical!
Do you happen to know any web hosters that would allow the Runtime engine to be invoked as a skripting engine?
There are many hosts which will allow running compiled CGIs, but my favorite is Dreamhost.com. I like the ease and flexibility of their control panel and their solid Linux setup, and their rates are among the better hosts offering unlimited storage for good prices.
If after checking out your options you decide to go with Dreamhost, drop me an email and I can send you a promo code for free domain registration. They''ve given me a number of these, and I've passed a few along to some of my clients but I have a few leftover and am happy to share 'em with you if you like: ambassador@fourthworld.com
You might also consider On-Rev.com, RunRev's own hosting service. They're pricing is a bit different, currently available at one price for an unlimited duration (at least it was last time I checked; they may offer monthly or at least annual pricing now). One of the advantages of using On-Rev is that they offer real-time debugging for their scripts, and offer a version of the server engine not yet available elsewhere which has a few extra conveniences.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Replace Javascript with RevTalk
I noted on the improve- list that the version 4.0 engine can not "be used as a generic command line engine." So if you do happen to try loading the engine to handle CGI on a web server, you will need version 3.5 (or lower, I suppose). So the question is, is there a continuing source for that engine for people to download? (I see on the "all downloads" section of the main RunRev website that revStudio 2.7.4 for Windows or 2.6.1 for Mac are available still, apparently for different reasons though. I can't see a "latest version that supports CGI engine use" source anywhere.)FourthWorld wrote:To use the Rev runtime engine on your server as a CGI, just copy it to your server and set the permissions to executable.
I do really like on-Rev though - and I gather that there is meant to be a roadmap at least (if not an advertised timescale) for an on-Rev type "server" release which means that you can use the same syntax to build your pages inline (although I believe the real time debugger/tracer is not going to be available - which is understandable).
Re: Replace Javascript with RevTalk
Thanks for your tips!
I think I might give Dreamhost a try, and may switch to On-Rev with my domain some time soon.
Regards
I think I might give Dreamhost a try, and may switch to On-Rev with my domain some time soon.
Regards
Re: Replace Javascript with RevTalk
I am not sure whether the initial posting was unclear or the issue got sidetracked. If it was unclear I apologize. Let me try again.
I was referring to client-side scripting that runs INSIDE the browser as Javascript does, not embedded code that gets executed on the server (ie. CGI, such as ON-REV). I was suggesting a full integration of RevTalk and rev objects that manipulates the browser.
Rgds,
/Carl
I was referring to client-side scripting that runs INSIDE the browser as Javascript does, not embedded code that gets executed on the server (ie. CGI, such as ON-REV). I was suggesting a full integration of RevTalk and rev objects that manipulates the browser.
Rgds,
/Carl
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace Javascript with RevTalk
At the moment the only way to use RevTalk in the browser is with the RevWeb plugin:
http://revweb.runrev.com/
See the Web options in the Standalone Builder.
http://revweb.runrev.com/
See the Web options in the Standalone Builder.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn