Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

There is something about JavaScript - Choose Forum 2014

1,724 views

Published on

Published in: Software

There is something about JavaScript - Choose Forum 2014

  1. 1. There is something about JavaScript Mail: jonas.bandi@gmail.com Twitter: @jbandi
  2. 2. D Jonas Bandi 5 Years ago I had no clue about JavaScript Today JavaScript pays my bills
  3. 3. My Journey into JavaScript Land
  4. 4. I went through the five stages of grief.
  5. 5. Denial
  6. 6. Fear
  7. 7. Repulsion
  8. 8. Curiosity
  9. 9. 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
  10. 10. Two Worlds?
  11. 11. Any application that can be written in JavaScript, will eventually be written in JavaScript. - Atwood’s Law, 2007
  12. 12. 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
  13. 13. The Language
  14. 14. The Bad Parts
  15. 15. 18 Powerful Parts
  16. 16. 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
  17. 17. 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
  18. 18. JavaScript != Java
  19. 19. 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/
  20. 20. Language Constructs • Object • Class • Method • Constructor • Packages • Inheritance • Object • Function ...everything else can be implemented
  21. 21. Closures
  22. 22. Elegant Parts
  23. 23. Ecosystem
  24. 24. Language Libraries / Frameworks dependency management Write Code Build Test Deploy IDE Toolset compile package Test-Frameworks
  25. 25. Language Libraries / Frameworks dependency management Write Code Build Test Deploy IDE Bower Toolset compile package Test-Frameworks
  26. 26. Toolset
  27. 27. Bower
  28. 28. Building
  29. 29. 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
  30. 30. Testing
  31. 31. Dependency Management
  32. 32. Eco-Mess?
  33. 33. Frontend Libraries & Frameworks
  34. 34. Jake JavaScript build Tool similar to Rake or Make. Broccoli Bower Build Tools
  35. 35. Testing Tools Testem A test runner that makes Javascript unit testing fun.
  36. 36. ACTIVE ECOSYSTEM • 109 000 Node Packages on www.npmjs.org (Maven Central has 806'000 artifacts)
  37. 37. Big Momentum
  38. 38. 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!
  39. 39. 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
  40. 40. It's everywhere! Nashorn
  41. 41. http://redmonk.com/dberkholz/2014/05/02/github-language-trends-and-the-fragmenting-landscape/
  42. 42. LARGE JAVASCRIPT APPLICATIONS ? LoC ? LoC ? LoC
  43. 43. LARGE JAVASCRIPT APPLICATIONS 400’000 LoC (2012) 300’000 LoC (2012) 200’000 LoC (2013)
  44. 44. Potential Sweet Spots
  45. 45. 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
  46. 46. 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
  47. 47. Discussions?

×