There is something about 
JavaScript 
Mail: jonas.bandi@gmail.com 
Twitter: @jbandi
D 
Jonas Bandi 
5 Years ago I had no 
clue about JavaScript 
Today JavaScript pays my bills
My Journey into JavaScript Land
I went through the five 
stages of grief.
Denial
Fear
Repulsion
Curiosity
Most of the people writing in JavaScript are not programmers. 
They lack the training and discipline to write good programs. 
- Douglas Crockford, 2001 
A very large group of developers still thinks of JavaScript as a 
joke. 
- Davy Brion, 2011 
We strongly suggest to adopt JavaScript as a first class language. 
- ThoughtWorks Technology Radar, 2011 
The ecosystem around JavaScript as a serious application 
platform continues to evolve. 
- ThoughtWorks Technology Radar, January 2014 
Through 2014, improved JavaScript performance will begin to 
push HTML5 and the browser as a mainstream enterprise 
application development environment. 
- Gartner, October 2013
Two Worlds?
Any application that can be written in 
JavaScript, will eventually be written 
in JavaScript. 
- Atwood’s Law, 2007
We are slaves to JavaScript because 
people have simply started to accept 
its weirdness and flaws, much like a 
Stockholm Syndrome phenomenon. 
- Chris Richardson, 2013
The Language
The Bad Parts
18 Powerful Parts
GWT 
is 
a 
reasonable 
implementaDon 
of 
a 
poor 
architectural 
choice. 
GWT 
a$empts 
to 
hide 
many 
of 
the 
details 
of 
the 
web 
as 
a 
plaForm 
by 
creaDng 
desktop 
metaphors 
in 
Java 
and 
generaDng 
JavaScript 
code 
to 
implement 
them. 
First, 
in 
many 
ways, 
JavaScript 
is 
more 
powerful 
and 
expressive 
than 
Java, 
so 
we 
suspect 
that 
the 
generaDon 
is 
going 
in 
the 
wrong 
direcDon. 
h$p://www.ThoughtWorks 
Technology 
Radar, 
July 
2011 thoughtworks.com/radar
var add = function(first, second) { 
return first + second; 
}; 
var splitCall = function(first, func){ 
return function(second){ 
return func(first, second); 
} 
} 
var addOne = splitCall(1, add); 
addOne(22); // -> 23
JavaScript != Java
History 
• HyperCard 
for 
the 
browser 
Brendan 
Eich 
(ex 
CEO 
of 
Mozilla) 
• Make 
it 
look 
like 
Java! 
• Completed 
in 
10 
days 
h$p://javascriptjabber.com/124-­‐jsj-­‐the-­‐origin-­‐of-­‐javascript-­‐with-­‐brendan-­‐eich/
Language Constructs 
• Object 
• Class 
• Method 
• Constructor 
• Packages 
• Inheritance 
• Object 
• Function 
...everything else can 
be implemented
Closures
Elegant Parts
Ecosystem
Language 
Libraries / Frameworks 
dependency management 
Write Code 
Build Test 
Deploy 
IDE 
Toolset 
compile 
package Test-Frameworks
Language 
Libraries / Frameworks 
dependency management 
Write Code 
Build Test 
Deploy 
IDE 
Bower 
Toolset 
compile 
package Test-Frameworks
Toolset
Bower
Building
PROJECT BUILD 
Compile 
Package 
Develop 
(IDE) 
Build jar, war, 
assembly 
Backend 
(Java, .NET) 
Deploy Test 
… into a container 
(Tomcat, JBoss, IIS …) execute 
Linting 
Package 
Frontend 
(JavaScript) 
Develop 
(Editor, IDE) 
Minification, 
Concatenation, Revision 
Deploy Test 
copy to directory execute in browser
Testing
Dependency 
Management
Eco-Mess?
Frontend Libraries & Frameworks
Jake 
JavaScript build 
Tool similar to 
Rake or Make. 
Broccoli 
Bower 
Build Tools
Testing Tools 
Testem A test runner that makes 
Javascript unit testing fun.
ACTIVE ECOSYSTEM 
• 109 000 Node Packages on www.npmjs.org 
(Maven Central has 806'000 artifacts)
Big Momentum
JavaScript is the Language of the Web. 
Another software technology will come 
along and kill off the web. That judgement 
day will arrive very soon. 
-Forrester Research in 2000 
The Web has won!
HTML 5 
HTML5 explained: 
• Html is the structure 
• CSS is the colour and 
style 
• JavaScript is everything 
else 
Scott Hanselman: Angle Brackets, Curly Braces http://channel9.msdn.com/Events/Build/2012/3-027
It's everywhere! 
Nashorn
http://redmonk.com/dberkholz/2014/05/02/github-language-trends-and-the-fragmenting-landscape/
LARGE JAVASCRIPT APPLICATIONS 
? LoC 
? LoC 
? LoC
LARGE JAVASCRIPT APPLICATIONS 
400’000 LoC (2012) 
300’000 LoC (2012) 
200’000 LoC (2013)
Potential Sweet Spots
SPA Architecture 
View 
Model 
Controller 
"object model" 
Services 
Client Server 
clear boundary 
• Rich client 
programming model in 
the browser 
• Clear separation of 
concern between 
client and server
Sharing Logic between 
Client and Server 
• Full-Stack JavaScript 
www.meteor.com 
• Run JavaScript logic on 
traditional Java / .NET 
backend 
• Validation 
•Workflow / Scripting 
View 
Controller 
Client Server 
Business Logic "Code 
Repository" 
Model
Discussions?

There is something about JavaScript - Choose Forum 2014

  • 1.
    There is somethingabout JavaScript Mail: jonas.bandi@gmail.com Twitter: @jbandi
  • 2.
    D Jonas Bandi 5 Years ago I had no clue about JavaScript Today JavaScript pays my bills
  • 3.
    My Journey intoJavaScript Land
  • 4.
    I went throughthe five stages of grief.
  • 5.
  • 7.
  • 8.
  • 9.
  • 12.
    Most of thepeople writing in JavaScript are not programmers. They lack the training and discipline to write good programs. - Douglas Crockford, 2001 A very large group of developers still thinks of JavaScript as a joke. - Davy Brion, 2011 We strongly suggest to adopt JavaScript as a first class language. - ThoughtWorks Technology Radar, 2011 The ecosystem around JavaScript as a serious application platform continues to evolve. - ThoughtWorks Technology Radar, January 2014 Through 2014, improved JavaScript performance will begin to push HTML5 and the browser as a mainstream enterprise application development environment. - Gartner, October 2013
  • 13.
  • 14.
    Any application thatcan be written in JavaScript, will eventually be written in JavaScript. - Atwood’s Law, 2007
  • 15.
    We are slavesto JavaScript because people have simply started to accept its weirdness and flaws, much like a Stockholm Syndrome phenomenon. - Chris Richardson, 2013
  • 16.
  • 17.
  • 18.
  • 19.
    GWT is a reasonable implementaDon of a poor architectural choice. GWT a$empts to hide many of the details of the web as a plaForm by creaDng desktop metaphors in Java and generaDng JavaScript code to implement them. First, in many ways, JavaScript is more powerful and expressive than Java, so we suspect that the generaDon is going in the wrong direcDon. h$p://www.ThoughtWorks Technology Radar, July 2011 thoughtworks.com/radar
  • 20.
    var add =function(first, second) { return first + second; }; var splitCall = function(first, func){ return function(second){ return func(first, second); } } var addOne = splitCall(1, add); addOne(22); // -> 23
  • 21.
  • 22.
    History • HyperCard for the browser Brendan Eich (ex CEO of Mozilla) • Make it look like Java! • Completed in 10 days h$p://javascriptjabber.com/124-­‐jsj-­‐the-­‐origin-­‐of-­‐javascript-­‐with-­‐brendan-­‐eich/
  • 23.
    Language Constructs •Object • Class • Method • Constructor • Packages • Inheritance • Object • Function ...everything else can be implemented
  • 24.
  • 25.
  • 26.
  • 27.
    Language Libraries /Frameworks dependency management Write Code Build Test Deploy IDE Toolset compile package Test-Frameworks
  • 28.
    Language Libraries /Frameworks dependency management Write Code Build Test Deploy IDE Bower Toolset compile package Test-Frameworks
  • 29.
  • 31.
  • 32.
  • 33.
    PROJECT BUILD Compile Package Develop (IDE) Build jar, war, assembly Backend (Java, .NET) Deploy Test … into a container (Tomcat, JBoss, IIS …) execute Linting Package Frontend (JavaScript) Develop (Editor, IDE) Minification, Concatenation, Revision Deploy Test copy to directory execute in browser
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
    Jake JavaScript build Tool similar to Rake or Make. Broccoli Bower Build Tools
  • 39.
    Testing Tools TestemA test runner that makes Javascript unit testing fun.
  • 40.
    ACTIVE ECOSYSTEM •109 000 Node Packages on www.npmjs.org (Maven Central has 806'000 artifacts)
  • 42.
  • 43.
    JavaScript is theLanguage of the Web. Another software technology will come along and kill off the web. That judgement day will arrive very soon. -Forrester Research in 2000 The Web has won!
  • 44.
    HTML 5 HTML5explained: • Html is the structure • CSS is the colour and style • JavaScript is everything else Scott Hanselman: Angle Brackets, Curly Braces http://channel9.msdn.com/Events/Build/2012/3-027
  • 45.
  • 46.
  • 47.
  • 48.
    LARGE JAVASCRIPT APPLICATIONS 400’000 LoC (2012) 300’000 LoC (2012) 200’000 LoC (2013)
  • 49.
  • 50.
    SPA Architecture View Model Controller "object model" Services Client Server clear boundary • Rich client programming model in the browser • Clear separation of concern between client and server
  • 51.
    Sharing Logic between Client and Server • Full-Stack JavaScript www.meteor.com • Run JavaScript logic on traditional Java / .NET backend • Validation •Workflow / Scripting View Controller Client Server Business Logic "Code Repository" Model
  • 52.