Your SlideShare is downloading. ×
RingoJS
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,117
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. RingoJSFinJUG talk byOleg Podsechin15.01.2013
  • 2. Overview started by Hannes Wallnöfer successor to Helma, HelmaNG o been in development for 13+ years runs on the JVM uses Mozilla Rhino conforms to CommonJS
  • 3. CommonJS Modules/1.0, Modules/1.1 JSGI Binary Filesystem System Unit Testing
  • 4. Features  hot reloading of modules  profiler  debugger  sandboxing  runs anywhere Java runs  within a webapp container  standalone process
  • 5. Install & Rungit clone git://github.com/ringo/ringojs.gitant update jarbin/ringo
  • 6. Hello World>> Hello WorldHello World
  • 7. Hello World, Take Twonew require(ringo/httpserver).Server({ app: function() { return {status: 200, headers: {}, body: [Hello World]}; } }).start();
  • 8. Multithreaded JS// run "test" in "threads" parallel threads a total of "count" timesfunction parallel(test, count, threads) {  var pool = new      java.util.concurrent.Executors.newFixedThreadPool(threads);  functio n runnable(f) {     return new java.lang.Runnable({ run: function() {       try { f(); } catch(e) { }     }});  }  for(var i = 0; i < count; i ++)     pool.execute(runnable(test));}
  • 9. RingoJS libraries search GitHub for ringo-ringo-admin install  user/repo use rp and packages.ringojs.orgrp install name
  • 10. Examples of RingoJS libraries stick ringo-modulr ringo-storable  ringo-filestore, ringo-hibernate ringo-mongodb ringo-mail
  • 11. Stick Examplevar {Application} = require("stick");     var app = Application();     app.configure("error", "notfound",  "route"); var response =  require(ringo/jsgi/response);     app.get("/", function(req) {    return response.html("Hello"); });   
  • 12. Community #ringojs on Freenode IRC #ringojs & @ringojs on Twitter http://github.com/ringo
  • 13. Use Cases & Benefits standalone to extend an existing Java webapp plugin architecture for existing application code reuse between server and browser less context switching more compact code, faster prototyping
  • 14. Extras Common Node Nashorn Node.jar Vert.x
  • 15. @olegpodsechingithub.com/olegp

×