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.

Kraken js at paypal

17,206 views

Published on

An presentation on how and why KrakenJS was built, as well as an overview of many useful features of what makes Kraken different from other frameworks.

Published in: Technology
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • How we discovered the real reason nice guys don't get laid, and a simple "fix" that allows you to gain the upper hand with a girl... without changing your personality or pretending to be someone you're not. learn more...  http://t.cn/AiurDrZp
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Earn a 6-Figure Side-Income Online... Signup for the free training HERE ▲▲▲ http://ishbv.com/j1r2c/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Earn $90/day Working Online. You won't get rich, but it is going to make you some money! ●●● http://ishbv.com/ezpayjobs/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Kraken js at paypal

  1. 1. In the Enterprise By Lenny Markus @LennyMarkus
  2. 2.  Teams stopped waterfall process  Started agile with Lean UX  Quick iterations; experience design early White Board CodeUsers PayPal: Circa 2012
  3. 3.  Using CSS, JavaScript and Templates (in the wrong way…) (Written in Java…) Embracing the right technologies
  4. 4.  Replaced JSP with dust.js templating  Node.js for mock applications Speeding up the process
  5. 5. Speeding up the process… Idea  Prototype in hours This combo was fast!
  6. 6. “Node.js is not enterprise”  It’s a toy language  Not scalable  Insecure  Slow  Blah  Blah  Blah  Blah
  7. 7. Project Kraken  Bringing Node.Js into PayPal  Focused on Web/Mobile Applications  Emphasize developer velocity  Replace our Java UI technology stack
  8. 8. If you're having trouble getting sign-off on new technology, then try to pilot it vs. the old. Pilot projects are harmless
  9. 9. • Identify Project • Begin integrating Node with infrastructure January • Initial infrastructure offering ready • Started development on pilot March • Node Pilot surpassed Java • Java put on hold June The pilot timeline
  10. 10. Pilot Results – Lines of Code Node Java 7,403 18,68 3
  11. 11. Pilot Results – Files Node Java 84 255
  12. 12. /** If you’re reading this, that means you have been put in charge of my previous project. I am so, so sorry for you. God speed. */ // Houston, // we have a problem // TODO: make this work // Magic. Do not touch. //Catching exceptions // is for communists /* ALL YOUR BASE ARE BELONG TO US */ Pilot Results – Comments Node Java 626 10,31 0
  13. 13. Pilot Results – Developers Node Java 2 12
  14. 14. We proved it works! Node Java
  15. 15. Node frameworks at scale Needed to support thousands of devs
  16. 16. Node frameworks at scale 190+ Countries
  17. 17. Kraken.js Lusca Kappa Localizr Internationalization Application Framework Application Security NPM Proxy Generator-Kraken Yeoman Generator Meddleware Config driven middleware
  18. 18. Kraken.js – A node.JS web application framework
  19. 19. Kraken.js express + + +  PayPal’s Home-grown Node.JS framework  Supports for globalization  Out-of-the-box security  Robust configuration  Scalable
  20. 20. Generator-kraken A yeoman generator that allows you to quickly create scaffolding for kraken applications.• `yo kraken` • Application • Pages • Controllers • Content Bundles • Tests • Models $ yo kraken myApp ,'""`. hh / _ _ |(@)(@)| Release the Kraken! ) __ ( /,'))((`. (( (( )) )) ` `)(' /' Tell me a bit about your application: ? Description: A test application ? Author: @LennyMarkus ? Template library? Dust ? Front end package manager ? Bower ? CSS preprocessor library? LESS ? JavaScript library? RequireJS
  21. 21. Nothing but express. var express = require(‘express’), kraken = require(‘kraken-js’); var app = module.exports = express(); app.use(kraken()); app.on('start', function () { console.log('Application ready to serve requests.'); }); Kraken.js
  22. 22. Chaos => Order
  23. 23. Clean, maintainable layout. index Content Kraken.js
  24. 24. var dbHost; if (process.env.NODE_ENV === ‘production’) { dbHost = “myinstance.12.us-1.rds.amazonaws.com”; } else { dbHost = “localhost”; } db.connect(dbHost);
  25. 25. { "port":80, "express":{ "views":"path:./myViews" } } { "port":8080, "express":{ "views":"path:./experimentation" } } NODE_ENV=production Environment-aware configuration Kraken.js NODE_ENV=development
  26. 26. { “port”:80, “foo”:”bar”, “color”:”red”, “db”:{ “host”:”localhost”, “port”:”3306” } } config.json { “port”:80, “foo”:”bar”, “color”:”red”, “db”:{ “host”:”myinstance.12.us-1.rds.amazonaws.com”, “port”:”3306” } } development.json { “db”:{ “host”:”localhost”, } }
  27. 27. var dbHost = config.get(“db:host”); db.connect(dbHost);
  28. 28. Meddleware
  29. 29. Config driven middleware  Middleware setup is not hardcoded  External to codebase!  Can be toggled / ordered / configured.
  30. 30. “middleware”: { “authentication”:{ "enabled": false } config.json “middleware”: { “authentication”:{ "priority": 100, "enabled": true, "module": { "name": “passport" } } development.json
  31. 31. Lusca • Enables Platform for Privacy Preferences Project (P3P) headers. • Enables X-FRAME-OPTIONS headers to help prevent Clickjacking. • Enables Content Security Policy (CSP) headers. • Enables Cross Site Request Forgery (CSRF) headers. Enables out-of-the-box security according to industry (and PayPal's ) best practices. This is done as middleware, so that all your requests/responses are automatically secured.
  32. 32. Localizr– Internationalization (i18n) • Load content bundles from a specific location • Can localize templates on-the-fly • Content stored in properties files An extension for dust.js templates that enables localization / internationalization data to be loaded, and decorated on top of a template.
  33. 33. Localizr– Internationalization (i18n) index.title=PayPal for Merchants index.callToAction=Enroll now! index.greeting=Welcome {user} # A list index.ccList[0]=Visa index.ccList[1]=Mastercard index.ccList[2]=Discover # A map index.states[AL]=Alabama index.states[AK]=Alaska index.states[AZ]=Arizona index.states[CA]=California index.title=PayPal pour commerçants index.callToAction= Inscrivez-vous! index.greeting=Bonjour {user} # A list index.ccList[0]=Visa index.ccList[1]=CIBC # A map index.states[ON]=Ontario index.states[AB]=Alberta index.states[MB]=Manitoba index.states[QC]=Quebec locales/US/en/index.properties locales/CA/fr/index.properties
  34. 34. Kappa– Your very own NPM
  35. 35. Kappa– Your very own NPM NPMJS.or g npm.intranet .company.co m { "dependencies": { "express": "~3.4.0", “privateMod”: “1.0.0” } }
  36. 36. Best Practices
  37. 37. Custom Infrastructure We all have some. Always aim to use standard conventions in your Node.js code.
  38. 38. Culture Clash – OSS vs. Closed  Stop "not written here" syndrome  Versions often times aren't >= 1.0  Collect knowledge from community  GitHub exposes sacred code
  39. 39. Hiccups found along the way…
  40. 40. KrakenJS. Released! @LennyMarkus lmarkus@paypal.com

×