Your SlideShare is downloading. ×
LiveWire<br />Your IP address is <br /><SERVER>write(request.ip)</SERVER> <br />
Browser only&no I/O<br />
The dawn of I/0<br />
V8<br />
myElement.onclick = function () { <br />varelem = this;<br />setTimeout( function () { <br />    }, 3000);<br />};<br />
$.ajax({ <br />url: url, <br />dataType: 'json', <br />  data: data, <br />  success: function () {}<br />}); <br />
Just get out there and use it<br />You may be working at a different level than you’re used to<br />
Using node.js<br />varfs = require("fs");<br />fs.readFile(file,function(err,data) {<br />  // do something<br />});<br />
var http = require('http');<br />http.createServer(function (request, response) {<br />  response.writeHead(200, {<br />  ...
var http = require('http'); <br />varg = http.createClient(80, 'www.google.com'); <br />var request = g.request('GET', '/'...
CoffeeScript<br />“The mental model that you use to write CoffeeScript is identical to how you'd write the equivalent Java...
(app.get "/projects/:id$", (req, res) -><br />db.getDocreq.params.id, (err, doc) -><br />        if not doc<br />res.send ...
TestingPackage managementBuilds<br />
vows.describe('Zero').addBatch({ <br />    'When dividing by zero': { <br />      topic: function () { return 2/0 },    <b...
Kyuri (gherkin)<br />Feature: Two bananas<br />Scenario:<br />  Given I have one banana<br />  When I receive one banana<b...
nodeunit<br />exports.testTrue = function(test) { <br />test.expect(true); <br />test.ok(true, ”should be true"); <br />te...
“Once you work out the social aspects of a problem, the technical <br />stuff is usually pretty straightforward.”<br />Isa...
package.json<br />{ <br />    "name":”pk",<br />    "version": "0.0.1",<br />    "dependencies": {<br />        "coffee-sc...
Cake&Jake<br />
Composition<br />Arrows<br />http://www.cs.umd.edu/projects/PL/arrowlets<br />Reactive Extensions<br />http://bit.ly/bmBeR...
http://github.com/ry/node/wiki/modules<br />Already over 500 modules<br />
JavaScript Sprachraum
JavaScript Sprachraum
Upcoming SlideShare
Loading in...5
×

JavaScript Sprachraum

761

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

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

No notes for slide

Transcript of "JavaScript Sprachraum"

  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8.
  9. 9.
  10. 10.
  11. 11. LiveWire<br />Your IP address is <br /><SERVER>write(request.ip)</SERVER> <br />
  12. 12.
  13. 13.
  14. 14. Browser only&no I/O<br />
  15. 15.
  16. 16.
  17. 17. The dawn of I/0<br />
  18. 18.
  19. 19.
  20. 20.
  21. 21. V8<br />
  22. 22.
  23. 23.
  24. 24. myElement.onclick = function () { <br />varelem = this;<br />setTimeout( function () { <br /> }, 3000);<br />};<br />
  25. 25. $.ajax({ <br />url: url, <br />dataType: 'json', <br /> data: data, <br /> success: function () {}<br />}); <br />
  26. 26.
  27. 27.
  28. 28. Just get out there and use it<br />You may be working at a different level than you’re used to<br />
  29. 29.
  30. 30.
  31. 31. Using node.js<br />varfs = require("fs");<br />fs.readFile(file,function(err,data) {<br /> // do something<br />});<br />
  32. 32. var http = require('http');<br />http.createServer(function (request, response) {<br /> response.writeHead(200, {<br /> 'Content-Type': 'text/plain'}); <br />response.end('Hello World ');<br />}).listen(8124); <br />
  33. 33. var http = require('http'); <br />varg = http.createClient(80, 'www.google.com'); <br />var request = g.request('GET', '/', {<br /> 'host': 'www.google.com'}); <br />request.end(); <br />request.on('response', function (response) {<br /> // do something with the response<br />}); <br />
  34. 34.
  35. 35. CoffeeScript<br />“The mental model that you use to write CoffeeScript is identical to how you'd write the equivalent JavaScript”<br />Jeremy Ashkenas<br />
  36. 36. (app.get "/projects/:id$", (req, res) -><br />db.getDocreq.params.id, (err, doc) -><br /> if not doc<br />res.send 404<br /> return<br />res.render "project.jade”)<br />
  37. 37. TestingPackage managementBuilds<br />
  38. 38.
  39. 39. vows.describe('Zero').addBatch({ <br /> 'When dividing by zero': { <br /> topic: function () { return 2/0 }, <br /> 'we get Infinity': function (t) { <br />assert.equal (t, Infinity); } <br /> }<br />}).run();<br />
  40. 40.
  41. 41. Kyuri (gherkin)<br />Feature: Two bananas<br />Scenario:<br /> Given I have one banana<br /> When I receive one banana<br /> Then I should have two bananas<br />
  42. 42. nodeunit<br />exports.testTrue = function(test) { <br />test.expect(true); <br />test.ok(true, ”should be true"); <br />test.done(); <br />}; <br />
  43. 43.
  44. 44. “Once you work out the social aspects of a problem, the technical <br />stuff is usually pretty straightforward.”<br />Isaac Schlueter<br />
  45. 45. package.json<br />{ <br /> "name":”pk",<br /> "version": "0.0.1",<br /> "dependencies": {<br /> "coffee-script": "0.9.2",<br /> "vows": "0.5.1",<br /> "hamljs": "0.4.5", <br /> "express": "1.0.0",<br /> "less": "1.0.32”<br /> } <br />}<br />
  46. 46.
  47. 47. Cake&Jake<br />
  48. 48. Composition<br />Arrows<br />http://www.cs.umd.edu/projects/PL/arrowlets<br />Reactive Extensions<br />http://bit.ly/bmBeRV<br />
  49. 49. http://github.com/ry/node/wiki/modules<br />Already over 500 modules<br />

×