JavaScript                   por debaixo dos panos                         ecossistema e linguagem na perspectiva da JVM  ...
www.gonow.com.br                         www.caelum.com.br                             Text                            git...
quê?Saturday, May 14, 2011
O DesenvolvedorSaturday, May 14, 2011
O ClienteSaturday, May 14, 2011
O processo de deploySaturday, May 14, 2011
HomologaçãoSaturday, May 14, 2011
Sem pacote RPM?Saturday, May 14, 2011
Pacotes fáceis de FazerSaturday, May 14, 2011
Deploy SimplesSaturday, May 14, 2011
Um ZipãoSaturday, May 14, 2011
à prova de         sobrinhoSaturday, May 14, 2011
Java!Saturday, May 14, 2011
Java?Saturday, May 14, 2011
porquê?Saturday, May 14, 2011
não é node.jsSaturday, May 14, 2011
node.jsSaturday, May 14, 2011
Saturday, May 14, 2011
node.js tem                          potencialSaturday, May 14, 2011
MASSaturday, May 14, 2011
node.js não é                         bala de prataSaturday, May 14, 2011
100% async não é pra                             qualquer umSaturday, May 14, 2011
“mais de um            jeito de fazer”                         Consultor SêniorSaturday, May 14, 2011
ringojsSaturday, May 14, 2011
10 anos de idade!Saturday, May 14, 2011
“Ringo takes a pragmatical                 and non-dogmatic stance on                  things like I/O paradigms.”Saturday...
DTSTTCPW                         Faça a coisa mais simples                         possível com potencial de              ...
(QUASE) NADASaturday, May 14, 2011
como?Saturday, May 14, 2011
reutilizando a rodaSaturday, May 14, 2011
➜   rhino1_7R3   java -jar js.jar                         Rhino 1.7 release 3 2011 05 10                         js> date ...
Qualquer biblioteca                          java já existenteSaturday, May 14, 2011
in-process cache?                         distributed cache?                              roll your own?Saturday, May 14, ...
EHCACHESaturday, May 14, 2011
Agendamento de                             Tarefas?Saturday, May 14, 2011
QuartzSaturday, May 14, 2011
Busca textual?Saturday, May 14, 2011
Lucene / SolrSaturday, May 14, 2011
E muito mais!Saturday, May 14, 2011
um problemaSaturday, May 14, 2011
Rhino é lentoSaturday, May 14, 2011
porquê?Saturday, May 14, 2011
Saturday, May 14, 2011
Saturday, May 14, 2011
Não é V8Saturday, May 14, 2011
mehSaturday, May 14, 2011
VMSaturday, May 14, 2011
Vantagens                              e                         DesvantagensSaturday, May 14, 2011
poor’s man computer?Saturday, May 14, 2011
KISSSaturday, May 14, 2011
e o JavaScript?Saturday, May 14, 2011
como otimizar?Saturday, May 14, 2011
1       function Carro(nome, cor) {                 2           this.nome = nome;                 3           this.cor = c...
1       function Carro(nome, cor) {                 2           this.nome = nome;                 3           this.cor = c...
1 function MotorV8(){                    2     this.liga = function(){                    3         print("ligando...");  ...
7 function Carro(nome, cor) {                 8     this.nome = nome;                 9     this.cor = cor;               ...
19 var x = new Carro("trovão azul", "azul (duh)");                20                21 for(var i = 0; i< 10000; i++){     ...
19 var x = new Carro("trovão azul", "azul (duh)");                20                21 for(var i = 0; i< 10000; i++){     ...
inline de métodosSaturday, May 14, 2011
19 var x = new Carro("trovão azul", "azul (duh)");                20                21 for(var i = 0; i< 10000; i++){     ...
ReplaySaturday, May 14, 2011
1 function MotorV8(){                    2      this.liga = function(){                    3          print("ligando...");...
7 function Carro(nome, cor) {                 8           this.nome = nome;                 9           this.cor = cor;   ...
19 var x = new Carro("trovão azul", "azul (duh)");                20                21 for(var i = 0; i< 10000; i++){     ...
problemas?Saturday, May 14, 2011
#failSaturday, May 14, 2011
JVMSaturday, May 14, 2011
feita pensando em uma                           linguagem                        (começa com J)Saturday, May 14, 2011
precisa de classesSaturday, May 14, 2011
function Carro                               ===                           class CarroSaturday, May 14, 2011
JVM                         no máximo 256 opcodesSaturday, May 14, 2011
simplesSaturday, May 14, 2011
Saturday, May 14, 2011
ldcSaturday, May 14, 2011
ldc   #9Saturday, May 14, 2011
ldc   #9   // “Hello World”Saturday, May 14, 2011
ldc         #9   // “Hello World”                         getstaticSaturday, May 14, 2011
ldc         #9    // “Hello World”                         getstatic   #15Saturday, May 14, 2011
ldc         #9   // “Hello World”                         getstatic   #15 // System.outSaturday, May 14, 2011
ldc         #9   // “Hello World”                         getstatic   #15 // System.out                         swapSaturd...
ldc             #9   // “Hello World”                         getstatic       #15 // System.out                         sw...
ldc             #9    // “Hello World”                         getstatic       #15 // System.out                         s...
ldc             #9    // “Hello World”                         getstatic       #15 // System.out                         s...
ldc             #9    // “Hello World”                         getstatic       #15 // System.out                         s...
ZOMGSaturday, May 14, 2011
Estrutura de Invocação                         invokestaticSaturday, May 14, 2011
Estrutura de Invocação                         invokestatic                         ASaturday, May 14, 2011
Estrutura de Invocação                         invokestatic                         ASaturday, May 14, 2011
Estrutura de Invocação                         invokestatic                         A       BSaturday, May 14, 2011
Estrutura de Invocação                        invokevirtualSaturday, May 14, 2011
Estrutura de Invocação                        invokevirtual                         ASaturday, May 14, 2011
Estrutura de Invocação                        invokevirtual                         ASaturday, May 14, 2011
Estrutura de Invocação                        invokevirtual                         A       BSaturday, May 14, 2011
Estrutura de Invocação                        invokevirtual                         A       B                             ...
Estrutura de Invocação                        invokevirtual                         A       B                             ...
Estrutura de Invocação                       invokeinterfaceSaturday, May 14, 2011
Estrutura de Invocação                       invokeinterface                         ASaturday, May 14, 2011
Estrutura de Invocação                       invokeinterface                         ASaturday, May 14, 2011
Estrutura de Invocação                       invokeinterface                         A                             I swear...
Estrutura de Invocação                       invokeinterface                         A                             I swear...
Estrutura de Invocação                       invokeinterface                         A                             I swear...
Estrutura de Invocação                       invokeinterface                         A                             I swear...
Estrutura de Invocação                       invokeinterface                           A                                  ...
e o JavaScript?Saturday, May 14, 2011
Saturday, May 14, 2011
functionSaturday, May 14, 2011
function                         identifierSaturday, May 14, 2011
function                               identifier                         formal parameter listSaturday, May 14, 2011
function                               identifier                         formal parameter list                            ...
formal parameter list                            function bodySaturday, May 14, 2011
Saturday, May 14, 2011
n body                   function body   function body                   function body   function body                   f...
JavaScript                                ===                         um monte de blocos                            execut...
perfeito para                          otimizaçãoSaturday, May 14, 2011
como resolver?Saturday, May 14, 2011
JDK7                         (prevista pra 7/7)Saturday, May 14, 2011
invokedynamicSaturday, May 14, 2011
invokedynamicSaturday, May 14, 2011
invokedynamic                         ASaturday, May 14, 2011
invokedynamic                         A                                             CSaturday, May 14, 2011
invokedynamic                         A                                             D                                     ...
invokedynamic                         A                                             D                                     ...
invokedynamic                         A                                             D                                     ...
invokedynamic                         A                                             D                                     ...
invokedynamic                         A                                             D                                     ...
invokedynamic                         A                                             D                                     ...
invokedynamic                         A                                             D                                     ...
invokedynamic                         A                                             D                                     ...
mega-alphaSaturday, May 14, 2011
dyn.js                         100% invokedynamic js implSaturday, May 14, 2011
em breveSaturday, May 14, 2011
“Anyway, I know only one                programming language worse                than C and that is JavaScript”          ...
Saturday, May 14, 2011
?Saturday, May 14, 2011
Obrigado!Saturday, May 14, 2011
Upcoming SlideShare
Loading in …5
×

JavaScript por debaixo dos panos

2,360 views

Published on

ecossistema e linguagem na perspectiva da JVM

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,360
On SlideShare
0
From Embeds
0
Number of Embeds
33
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

JavaScript por debaixo dos panos

  1. 1. JavaScript por debaixo dos panos ecossistema e linguagem na perspectiva da JVM @qmx http://blog.qmx.me/Saturday, May 14, 2011
  2. 2. www.gonow.com.br www.caelum.com.br Text gitshelf.comSaturday, May 14, 2011
  3. 3. quê?Saturday, May 14, 2011
  4. 4. O DesenvolvedorSaturday, May 14, 2011
  5. 5. O ClienteSaturday, May 14, 2011
  6. 6. O processo de deploySaturday, May 14, 2011
  7. 7. HomologaçãoSaturday, May 14, 2011
  8. 8. Sem pacote RPM?Saturday, May 14, 2011
  9. 9. Pacotes fáceis de FazerSaturday, May 14, 2011
  10. 10. Deploy SimplesSaturday, May 14, 2011
  11. 11. Um ZipãoSaturday, May 14, 2011
  12. 12. à prova de sobrinhoSaturday, May 14, 2011
  13. 13. Java!Saturday, May 14, 2011
  14. 14. Java?Saturday, May 14, 2011
  15. 15. porquê?Saturday, May 14, 2011
  16. 16. não é node.jsSaturday, May 14, 2011
  17. 17. node.jsSaturday, May 14, 2011
  18. 18. Saturday, May 14, 2011
  19. 19. node.js tem potencialSaturday, May 14, 2011
  20. 20. MASSaturday, May 14, 2011
  21. 21. node.js não é bala de prataSaturday, May 14, 2011
  22. 22. 100% async não é pra qualquer umSaturday, May 14, 2011
  23. 23. “mais de um jeito de fazer” Consultor SêniorSaturday, May 14, 2011
  24. 24. ringojsSaturday, May 14, 2011
  25. 25. 10 anos de idade!Saturday, May 14, 2011
  26. 26. “Ringo takes a pragmatical and non-dogmatic stance on things like I/O paradigms.”Saturday, May 14, 2011
  27. 27. DTSTTCPW Faça a coisa mais simples possível com potencial de funcionarSaturday, May 14, 2011
  28. 28. (QUASE) NADASaturday, May 14, 2011
  29. 29. como?Saturday, May 14, 2011
  30. 30. reutilizando a rodaSaturday, May 14, 2011
  31. 31. ➜ rhino1_7R3 java -jar js.jar Rhino 1.7 release 3 2011 05 10 js> date = new java.util.Date(); Thu May 12 11:12:24 BRT 2011Saturday, May 14, 2011
  32. 32. Qualquer biblioteca java já existenteSaturday, May 14, 2011
  33. 33. in-process cache? distributed cache? roll your own?Saturday, May 14, 2011
  34. 34. EHCACHESaturday, May 14, 2011
  35. 35. Agendamento de Tarefas?Saturday, May 14, 2011
  36. 36. QuartzSaturday, May 14, 2011
  37. 37. Busca textual?Saturday, May 14, 2011
  38. 38. Lucene / SolrSaturday, May 14, 2011
  39. 39. E muito mais!Saturday, May 14, 2011
  40. 40. um problemaSaturday, May 14, 2011
  41. 41. Rhino é lentoSaturday, May 14, 2011
  42. 42. porquê?Saturday, May 14, 2011
  43. 43. Saturday, May 14, 2011
  44. 44. Saturday, May 14, 2011
  45. 45. Não é V8Saturday, May 14, 2011
  46. 46. mehSaturday, May 14, 2011
  47. 47. VMSaturday, May 14, 2011
  48. 48. Vantagens e DesvantagensSaturday, May 14, 2011
  49. 49. poor’s man computer?Saturday, May 14, 2011
  50. 50. KISSSaturday, May 14, 2011
  51. 51. e o JavaScript?Saturday, May 14, 2011
  52. 52. como otimizar?Saturday, May 14, 2011
  53. 53. 1 function Carro(nome, cor) { 2 this.nome = nome; 3 this.cor = cor; 4 this.anda = function(){ 5 print("andando"); 6 } 7 } 8 9 var x = new Carro("trovão azul", "azul (duh)"); 10 x.anda();Saturday, May 14, 2011
  54. 54. 1 function Carro(nome, cor) { 2 this.nome = nome; 3 this.cor = cor; 4 this.anda = function(){ 5 print("andando"); 6 } 7 } 8 9 var x = new Carro("trovão azul", "azul (duh)"); 10 x.anda();Saturday, May 14, 2011
  55. 55. 1 function MotorV8(){ 2 this.liga = function(){ 3 print("ligando..."); 4 } 5 }Saturday, May 14, 2011
  56. 56. 7 function Carro(nome, cor) { 8 this.nome = nome; 9 this.cor = cor; 10 this.motor = new MotorV8(); 11 this.anda = function(){ 12 print("andando"); 13 } 14 this.liga = function(){ 15 this.motor.liga(); 16 } 17 }Saturday, May 14, 2011
  57. 57. 19 var x = new Carro("trovão azul", "azul (duh)"); 20 21 for(var i = 0; i< 10000; i++){ 22 x.liga(); 23 }Saturday, May 14, 2011
  58. 58. 19 var x = new Carro("trovão azul", "azul (duh)"); 20 21 for(var i = 0; i< 10000; i++){ 22 x.liga(); 23 }Saturday, May 14, 2011
  59. 59. inline de métodosSaturday, May 14, 2011
  60. 60. 19 var x = new Carro("trovão azul", "azul (duh)"); 20 21 for(var i = 0; i< 10000; i++){ 22 print(“ligando...”); 23 }Saturday, May 14, 2011
  61. 61. ReplaySaturday, May 14, 2011
  62. 62. 1 function MotorV8(){ 2 this.liga = function(){ 3 print("ligando..."); 4 } 5 }Saturday, May 14, 2011
  63. 63. 7 function Carro(nome, cor) { 8 this.nome = nome; 9 this.cor = cor; 10 this.motor = new MotorV8(); 11 this.anda = function(){ 12 print("andando"); 13 } 14 this.liga = function(){ 15 this.motor.liga(); 16 } 17 }Saturday, May 14, 2011
  64. 64. 19 var x = new Carro("trovão azul", "azul (duh)"); 20 21 for(var i = 0; i< 10000; i++){ 22 print(“ligando...”); 23 }Saturday, May 14, 2011
  65. 65. problemas?Saturday, May 14, 2011
  66. 66. #failSaturday, May 14, 2011
  67. 67. JVMSaturday, May 14, 2011
  68. 68. feita pensando em uma linguagem (começa com J)Saturday, May 14, 2011
  69. 69. precisa de classesSaturday, May 14, 2011
  70. 70. function Carro === class CarroSaturday, May 14, 2011
  71. 71. JVM no máximo 256 opcodesSaturday, May 14, 2011
  72. 72. simplesSaturday, May 14, 2011
  73. 73. Saturday, May 14, 2011
  74. 74. ldcSaturday, May 14, 2011
  75. 75. ldc #9Saturday, May 14, 2011
  76. 76. ldc #9 // “Hello World”Saturday, May 14, 2011
  77. 77. ldc #9 // “Hello World” getstaticSaturday, May 14, 2011
  78. 78. ldc #9 // “Hello World” getstatic #15Saturday, May 14, 2011
  79. 79. ldc #9 // “Hello World” getstatic #15 // System.outSaturday, May 14, 2011
  80. 80. ldc #9 // “Hello World” getstatic #15 // System.out swapSaturday, May 14, 2011
  81. 81. ldc #9 // “Hello World” getstatic #15 // System.out swap invokevirtualSaturday, May 14, 2011
  82. 82. ldc #9 // “Hello World” getstatic #15 // System.out swap invokevirtual #21Saturday, May 14, 2011
  83. 83. ldc #9 // “Hello World” getstatic #15 // System.out swap invokevirtual #21 // PrintWriter.println()Saturday, May 14, 2011
  84. 84. ldc #9 // “Hello World” getstatic #15 // System.out swap invokevirtual #21 // PrintWriter.println() returnSaturday, May 14, 2011
  85. 85. ZOMGSaturday, May 14, 2011
  86. 86. Estrutura de Invocação invokestaticSaturday, May 14, 2011
  87. 87. Estrutura de Invocação invokestatic ASaturday, May 14, 2011
  88. 88. Estrutura de Invocação invokestatic ASaturday, May 14, 2011
  89. 89. Estrutura de Invocação invokestatic A BSaturday, May 14, 2011
  90. 90. Estrutura de Invocação invokevirtualSaturday, May 14, 2011
  91. 91. Estrutura de Invocação invokevirtual ASaturday, May 14, 2011
  92. 92. Estrutura de Invocação invokevirtual ASaturday, May 14, 2011
  93. 93. Estrutura de Invocação invokevirtual A BSaturday, May 14, 2011
  94. 94. Estrutura de Invocação invokevirtual A B CSaturday, May 14, 2011
  95. 95. Estrutura de Invocação invokevirtual A B CSaturday, May 14, 2011
  96. 96. Estrutura de Invocação invokeinterfaceSaturday, May 14, 2011
  97. 97. Estrutura de Invocação invokeinterface ASaturday, May 14, 2011
  98. 98. Estrutura de Invocação invokeinterface ASaturday, May 14, 2011
  99. 99. Estrutura de Invocação invokeinterface A I swear I am BSaturday, May 14, 2011
  100. 100. Estrutura de Invocação invokeinterface A I swear I am B CSaturday, May 14, 2011
  101. 101. Estrutura de Invocação invokeinterface A I swear I am B CSaturday, May 14, 2011
  102. 102. Estrutura de Invocação invokeinterface A I swear I am B CSaturday, May 14, 2011
  103. 103. Estrutura de Invocação invokeinterface A I swear I am B He is D (LIAR) CSaturday, May 14, 2011
  104. 104. e o JavaScript?Saturday, May 14, 2011
  105. 105. Saturday, May 14, 2011
  106. 106. functionSaturday, May 14, 2011
  107. 107. function identifierSaturday, May 14, 2011
  108. 108. function identifier formal parameter listSaturday, May 14, 2011
  109. 109. function identifier formal parameter list function bodySaturday, May 14, 2011
  110. 110. formal parameter list function bodySaturday, May 14, 2011
  111. 111. Saturday, May 14, 2011
  112. 112. n body function body function body function body function body function body function body function body function body function body functioSaturday, May 14, 2011
  113. 113. JavaScript === um monte de blocos executáveisSaturday, May 14, 2011
  114. 114. perfeito para otimizaçãoSaturday, May 14, 2011
  115. 115. como resolver?Saturday, May 14, 2011
  116. 116. JDK7 (prevista pra 7/7)Saturday, May 14, 2011
  117. 117. invokedynamicSaturday, May 14, 2011
  118. 118. invokedynamicSaturday, May 14, 2011
  119. 119. invokedynamic ASaturday, May 14, 2011
  120. 120. invokedynamic A CSaturday, May 14, 2011
  121. 121. invokedynamic A D CSaturday, May 14, 2011
  122. 122. invokedynamic A D CSaturday, May 14, 2011
  123. 123. invokedynamic A D CSaturday, May 14, 2011
  124. 124. invokedynamic A D CSaturday, May 14, 2011
  125. 125. invokedynamic A D C ?Saturday, May 14, 2011
  126. 126. invokedynamic A D C ?Saturday, May 14, 2011
  127. 127. invokedynamic A D C ?Saturday, May 14, 2011
  128. 128. invokedynamic A D C ?Saturday, May 14, 2011
  129. 129. mega-alphaSaturday, May 14, 2011
  130. 130. dyn.js 100% invokedynamic js implSaturday, May 14, 2011
  131. 131. em breveSaturday, May 14, 2011
  132. 132. “Anyway, I know only one programming language worse than C and that is JavaScript” Robert CaillauSaturday, May 14, 2011
  133. 133. Saturday, May 14, 2011
  134. 134. ?Saturday, May 14, 2011
  135. 135. Obrigado!Saturday, May 14, 2011

×