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.

JavaScript & Enterprise BED-Con 2014 Berlin German


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

JavaScript & Enterprise BED-Con 2014 Berlin German

  1. 1. Powerpoint Templates Powerpoint Templates JavaScript & EnterpriseJavaScript & EnterpriseJavaScript & EnterpriseJavaScript & Enterprise Adam Boczek @nativeAgile @codecentricAdam Boczek @nativeAgile @codecentricAdam Boczek @nativeAgile @codecentricAdam Boczek @nativeAgile @codecentric http://boczek.comhttp://boczek.comhttp://boczek.com http://Codecentric.dehttp://Codecentric.dehttp://Codecentric.de BEDBEDBEDBED----CON 2014 | 04.2014 Berlin |GermanyCON 2014 | 04.2014 Berlin |GermanyCON 2014 | 04.2014 Berlin |GermanyCON 2014 | 04.2014 Berlin |Germany
  2. 2. Powerpoint TemplatesEnterprise Applications Are Complex
  3. 3. Powerpoint TemplatesEnterprise Applications Are complex large software system platform designed to operate in a corporate environment complex, scalable, component- based, distributed and mission critical consists of a group of programs with shared business applications
  4. 4. Powerpoint TemplatesEnterprise is Fixed, it… has fixed environments has fixed processes has fixed roles & committees has fixed patterns & guidelines has fixed technology stacks has fixed tools has fixed “attitude” (closed minds and antagonists) with strong immune system
  5. 5. Powerpoint TemplatesEnterprise & JavaScript – motivation architect’s motivation: better, faster, cheaper, in quality complexity reduction, quest for simplicity idea one language for all, multi-paradigm promise (stakeholder’s motivation) faster time-to-market cost reduction cheaper evaluation of innovation
  6. 6. Powerpoint TemplatesManagementTalk Mr. Boczek, And you say we should lookat the JavaScript? Do youmean this trivial languagefor amateurs building fancyweb pages?This JavaScript we have almostdecided to switch-offin our intranet clients due to security issues? Are you serious?
  7. 7. Powerpoint TemplatesJavaScript IS Really Matured one of the world's most popular programming languages multi-paradigm: scripting, object- oriented (prototype-based), imperative, functional general-purpose, well suited to a large class of Web and non-Web- related applications stewardship over the language by ECMA committee
  8. 8. Powerpoint TemplatesJavaScript has “problems” with “java-” & “-Script” JavaScript is not a subset or less capable version of Java JS has a syntactic similarity to Java but that’s all JS is a different language as Java Script doesn’t mean simple, not a real programming language Script means compact and interpreted or JIT compiled
  9. 9. Powerpoint TemplatesJavaScript HAS Bad Reputation* the first versions of JS were weak e.g. without exception handling some of the implementations of JS were buggy embedded in buggy browsers poor quality of the language specification caused creation of bad resources (books, tutorials etc.) many people writing in JavaScript are not programmers, lacking training and discipline * the world's most misunderstood programming language
  10. 10. Powerpoint TemplatesJavaScript needs Professionals some concepts need deep dive understanding (e.g. prototypal inheritance, variable scope, …) design errors create a potential risks (e.g. ‘with’ statement, ASI) reputation of being strictly for the amateurs causes lack of architectural attention and reviews “everyone can do programming in JavaScript” is a misunderstanding
  11. 11. Powerpoint TemplatesJavaScript Lives in Version Chaos JS 1.0 (March 1996) in Netscape Navigator 2.0 until JS 1.2 (NN 4.05) formalized in the ECMAScript specification ECMA-262 and ISO/IEC 16262: ES1/ES2 (June 1997/June 1988), JS 1.3 ES3 (December 1999), JS 1.5 ES4 (Abandoned) ES5 (December 2009) ES5.1 (June 2011), JS 1.8.5 ES6 (Harmony)/ES7 (work in progress)
  12. 12. Powerpoint TemplatesIf you want to be sure, use this…
  13. 13. Powerpoint TemplatesGo For JavaScript in Enterprise if… you exactly know the advantages and disadvantages of JavaScript you can convince stakeholder that JS is a matured programming language, not a toy for amateurs you can get professional JS resources for your projects you have full control over the versions being used in your enterprise environment
  14. 14. Powerpoint TemplatesManagementTalk Ok, Mr. Boczek, It looksgood, I know nowwhat JavaScript is and what are cons and pros. But languageis an onlypart of the story. We at our enterprise have anorganized system. We have Frameworks.We have applicationprofiles. we have technology stacks.we have enterprise architecture. we have…
  15. 15. Powerpoint TemplatesEnterprise has Application Profiles
  16. 16. Powerpoint TemplatesJavaScript can be used All Over JavaScript is the scripting language for the web, however, JS can be used in many application scenarios and layers: presentation (frontend) business (backend/integration) persistence (storage) JS is not alone, it has powerful engines, plenty of supporting frameworks and very active community
  17. 17. Powerpoint TemplatesJavaScript runs not only in a Browser engines (with JIT), some examples Chakra (IE) SpiderMonkey (FireFox) SquirrelFish (Apple’s WebKit) V8 (Chrome, Node) Tamarin (Flash) Nashorn (Java SDK) some older interpreters Rhino JScript
  18. 18. Powerpoint TemplatesManagementTalk ok, Mr. Boczek, Understood, let's start with a commontopic. our softwareis being used in various scenarios, insideour offices but also outsideat customer site. We are using it using various devices in various environments. Whatcanyou offerAS A SOLUTIONFOR OUR UI?
  19. 19. Powerpoint TemplatesJavaScript in Presentation layer browser is used as the engine browser runs a pure client-side framework (some examples): AngularJS Ember.js Backbone.js challenges & issues browser compatibility many too many, pace of development security and intellectual property
  20. 20. Powerpoint TemplatesJavaScript in Browser Compatibilityissues
  21. 21. Powerpoint TemplatesJavaScript Frontend Frameworks
  22. 22. Powerpoint TemplatesJavaScript frontend Frameworks security & Intellectualproperty Issues even concatenated and minified the JS code runs in the browser on the client-side, which must be accepted everyone have access and can try to misuse the code (change, sell etc.) source code must not contain any sensible information the whole responsibility for the security and correctness of the data and processes lies at the backend-side
  23. 23. Powerpoint TemplatesGo for JavaScript in the Presentation if… you can accept compatibility issues or specify fixed client environment you have clarified UX functional requirements to be able to evaluate and choose proper framework (e.g. SPA/multi-page, fat-client-behavior) you have clarified non-functional requirements like performance to be able to evaluate and choose proper framework (e.g. size of a page, behavior in slow networks, off-line)
  24. 24. Powerpoint TemplatesManagementTalk MR. Boczek, Great, I haven’t expected anythingelse. JavaScript equals frontendto me. But our organizationarenotbuild of web- Clients only.WE do business, lots of business. And this mean lots of applicationservers with backend functionality.Whataboutthis?
  25. 25. Powerpoint TemplatesJavaScript in the Business Layer backend JS software platforms already available: Node.js other like Vert.x, JXCore (Node fork) very easy way to build a server that exposes e.g. RESTful services challenges & issues acceptance still low no established ESB/MOM solutions pub/sub messaging available (e.g. Faye) actually Node.js is the standard
  26. 26. Powerpoint TemplatesNode.js is the Standard for JavaScript in the Backend not a JavaScript framework highly customizable server engine based on Google V8 JS engine processes in a event loop, ready to accept and respond to requests promise in scalability: event- driven asynchronous IO supported by excellent frameworks Express.js, Restify.js, Hapi.js. supported by the cloud providers
  27. 27. Powerpoint TemplatesGo for JavaScript in the Backend Layer If… your application has a web-profile with REST/JSON client-server communication your application scenario does not define complex non-functional requirements (e.g. dist. transact.) your application does not require complex integration scenarios you can accept Node.js as the backend server for your solution
  28. 28. Powerpoint TemplatesManagementTalk It’s going to be moreinteresting as I thought, Mr. Boczek. So we can use JavaScript in Frontendand our backend systems. But I’m pretty sure the persistence won’tbe an easy case for you. We have our sql & DBMS. Whatabout this?
  29. 29. Powerpoint TemplatesJavaScript in the Persistence layer native support for JSON in the relational DBs is not only a wish: PostgreSQL 9.2 contains JSON_datatype planned for Oracle Database 12c JSON-oriented queries in DB2 some of the DBMS use JSON native already (NoSQL) MongoDB (BSON), CouchDB important to support not only JSON type but also queries over it
  30. 30. Powerpoint TemplatesGo for JavaScript in the persistence Layer if… you can introduce new type of DBMS e.g. a document oriented database like MongoDB in your organization your data is strong non-structured e.g. CMS your existing DBMS supports JSON types and queries natively (parsing or storing as text is not an option)
  31. 31. Powerpoint TemplatesManagementTalk Very nice Mr. Boczek but all the stuff to evaluatewill be very expensive. I can’t just simply order a anenvironmentwith servers for yournode.js, Mongodb and angular& co. It’s a dream, I won’tget Budget for this and even so we would have to wait weeks!
  32. 32. Powerpoint TemplatesFast evaluation with Mean Stack M E A N
  33. 33. Powerpoint TemplatesYou build your POC with Mean
  34. 34. Powerpoint Templatesyou pack your Mean in the Cloud
  35. 35. Powerpoint TemplatesManagementTalk Notbad, MR. Boczek, NotBad. SO youare able to develop our functionalrequirements using JavaScript-based frameworks. interesting… however whatabout qualityrequirements? whatabout performance, scalability,security, evolutionetc., Etc…?
  36. 36. Powerpoint TemplatesQuality attributeshave enormous influence on the architecture Performance and Scalability Availability and Resilience Evolution Security Accessibility Internationalization Location Regulation Usability Common for all software projects however some of them might be quite specific in case of JavaScript-based solutions e.g. regulation
  37. 37. Powerpoint TemplatesManagementTalk Mr. Boczek, ok, it might be that JavaScript and the frameworks around it are matured andcan deliver the business value we need, but whatabout our Development? Youdo notexpect we will use a Notepad,do you? Our enterprise is big anhas big focus onquality,codequality!
  38. 38. Powerpoint TemplatesJavaScript And the Development Process matured development environments IntelliJ, Eclipse, VisualStudio development tools in browser (F12) quality assurance tools JSLint, JSHint project structure, modules CommonJS (Node.js), AMD (RequireJS) testing frameworks & environments jasmine (BDD), qunit (TDD), mocha, sinon.js, chaijs, phantomJS, slimerJS, casperJS, karma, nock etc.
  39. 39. Powerpoint TemplatesManagementTalk MR. Boczek, oK, Ok, So we can develop, we can test, But whatabout our deployment pipeline? we have bunch of processes we have to carry out. And we plan to go for continuous delivery, can yousupport this?And Whatabout process automation?
  40. 40. Powerpoint TemplatesJavaScript in the deployment process you can automate everything push, unit test, build & artifact, integration test, deploy very good toolbox package management (npm, bower) task runners (grunt with 2.5k plugins) quality assurance & testing building and optimizing concatenating and minifing documentation easy integration with the existing tools and processes
  41. 41. Powerpoint Templatesgo for JavaScript in the development und deployment processes if… you can accept quite big numbers of different tools/plugins you have to configure and maintain but actually there is not “if” development and deployment processes are very good supported by the JavaScript tools
  42. 42. Powerpoint TemplatesManagementTalk Wow, Mr. Boczek, I see thatJavaScript andits eco- System canbe a big thing for our enterprise. Let’s includeit into our new it-strategy for the Upcoming years! Thank you!