It’s just data

Opal looks very promising


Opal is a Ruby to JavaScript compiler.  The team working on it are not only working to bring access to JavaScript libraries (like jquery) but also to replicate Ruby library interfaces.  Walking through a simple example...

This script defines two types of responses, HTML and JSON.

The HTML response define a simple table and a script.  The script is defined in Ruby, but is converted to JavaScript before sending to the browser.  The script itself issues three HTTP request and updates individual cells in the table when it gets responses.

Those requests produce JSON replies, depending on the individual field requested.  Both the client and server scripts in this example involve DOM traversal.  One uses JQuery style methods (find).  The other nokogiri (at and search).

An alternative to opal-jquery is opal-browser.  The latter provides a more Markaby/Nokogiri style interface to the DOM.

To run:

gem install wunderbar nokogumbo opal opal-jquery sourcify
ruby watch.rb --port=3030

If your web server is set up to handle CGI, you can drop this script directly into your document directory and run it.  If you do so, the requests will all be handled in parallel.

In my version of Back To The Future, I travel back to 1999 and nobody believes there are programming languages that “compile to JavaScript.”

Posted by Mark at

On your social article free of cost accessibility to Android phone. 4liker Official Website 4liker apk or simply this Facebook vehicle liker app.

Posted by sandra at

Great Information,it has lot for stuff which is informative.I will share the post with my friends.

Posted by Cheat Online Exam at

I am so happy to read this. This is the kind of manual that needs to be given and not the random misinformation that’s at the other blogs.

Posted by Marketing Research Assignments Help at

by visiting this site I found cool stuff here keep it up.

Posted by Project Management online Assistance at

Add your comment