SlideShare a Scribd company logo
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary.
Kraken.JS Training
Aeshan Wijetunge
March/ 27/ 2015 NTU IEEE
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary.
Introduction
2
● Kraken builds upon the expressJS framework
● includes many things out-of-the-box that enterprises
require of a modern web application
● Such as
○ Security
○ i8n
○ dustJS templates
○ … and more
● You will learn to use Yeoman to generate skeleton-code
● Lab Exercise: create a Task Manager kraken app
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary.
Kraken modules
Makara - Internationalization
Lusca - Security
Adaro - dustJS
Kappa - NPM Proxy
3
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 4
a Javascript template engine which compiles *.dust
templates into javascript which can be rendered on either the
server or...the client
More details available here
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 5
Kraken separates content from dust-templates using property-files. Makara
combines these bundles with dust-templates to produce localized pages for
each locale.
This allows for:
{index.dust} + locales/US/en/index.properties = /US/en/index.js.gz
Content : Enter Makara
● Internationalization with language-specific content bundles
● template reuse: 1 template to many localized content bundles
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 6
● Grunt is a build tool for javascript
● Kraken uses grunt to build js-views from templates (for production)
● Makara expects en_US to be the default language of any kraken app
● if you use localised content, you must to have a content bundle in the
locale/US/en folder
This convention helps avoid grunt build failures later on.
Caveat : Grunt, {dustjs} and the makara
fallback
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 7
Create a simple kraken.js application to create & manage your tasks.
● Store data in a session
● You may wish to refer to these online resources while developing it
○ http://krakenjs.com/#getting-started
○ https://github.com/krakenjs/makara
○ https://github.com/krakenjs/generator-kraken
○ ...and more can be found via Google
Lab: Task Manager
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 8
A very useful code-generation tool for developers looking increase their productivity and not
have to copy & paste the basic structure of the app.
Yeoman : bootstrapping app development
Install yeoman via npm
[sudo] npm install -g yo generator-kraken bower grunt-cli
Why you should use it...
● Eliminates the dull & repetitive steps needed to code an app from scratch
● Allows the developer to rapidly setup the app-skeleton following conventions
● Can be used from the command-line
● We’ll be using this tool a lot in the labs
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 9
As we’re not going to be developing a production-grade application in this lab, we’re going to
disable certain features which might make development troublesome.
Pre-Lab setup
Disable lusca here
Why you should do so for this lab...
● HTTP POSTS will encounter _csrf missing errors
● 403 Forbidden errors may occur
Please have it enabled should you deploy it online
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 10
Lets try it out in creating our task-manager
Lab: Use Yeoman to generate the basics
Create the app-skeleton
yo kraken TaskManager
select the following options when prompted
● DustJS
● LESS
● RequireJS
● Bower
then
cd TaskManager
Generate a controller for handling tasks (this should generate models/dust/content)
yo kraken:controller tasks
More details here
Start the app
npm install
npm start
View the page
localhost:8000/
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 11
We want to add tasks to our app and do so we need to extend our app.
Lab: add some functionality
More details here
Add a new route for create on controller
example
Add a simple form to index.dust for task creation
example
Start the app
npm start
View the page
localhost:8000/tasks/
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 12
We want to list the newly added task:
Lab: list the added tasks
More details here
Modify the controller-route to load the tasks from req.session
example here
Modify the index.dust to loop through the tasks
example
Start the app
npm start
View the page
localhost:8000/tasks/
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 13
Try to extend your application to use the Restful expressJS service you
created earlier.
(Optional) Lab: use your expressJS service
Replace the task-creation controller code with a Rest-client call
© 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 14
This is an open-source framework which extends already popular expressJS.
● Documentation & APIs are just a google away
● Big user community online
● Most answers are already on stack-overflow
● Use debuggers like node-inspector or IDEs to troubleshoot issues
Conclusion
Thanks for attending!

More Related Content

What's hot

Meet with Meteor
Meet with MeteorMeet with Meteor
Meet with Meteor
Tahmina Khatoon
 
Fluent 2018: When third parties stop being polite... and start getting real
Fluent 2018: When third parties stop being polite... and start getting realFluent 2018: When third parties stop being polite... and start getting real
Fluent 2018: When third parties stop being polite... and start getting real
Akamai Developers & Admins
 
Learn Angular 9/8 In Easy Steps
Learn Angular 9/8 In Easy Steps Learn Angular 9/8 In Easy Steps
Learn Angular 9/8 In Easy Steps
Ahmed Bouchefra
 
Webpack and angularjs
Webpack and angularjsWebpack and angularjs
Webpack and angularjs
Nir Kaufman
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
Atlogys Technical Consulting
 
Talk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG BéninTalk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG Bénin
Ezéchiel Amen AGBLA
 
Magento PWA Studio extensibility
Magento PWA Studio extensibilityMagento PWA Studio extensibility
Magento PWA Studio extensibility
Lars Roettig
 
Angular 2 in-1
Angular 2 in-1 Angular 2 in-1
Angular 2 in-1
GlobalLogic Ukraine
 
Vue.js Use Cases
Vue.js Use CasesVue.js Use Cases
Vue.js Use Cases
GlobalLogic Ukraine
 
React 101
React 101React 101
React 101
AndryRajohnson
 
Java and services code lab spring boot and spring data using mongo db
Java and services code lab spring boot and spring data using mongo dbJava and services code lab spring boot and spring data using mongo db
Java and services code lab spring boot and spring data using mongo db
Staples
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
dvcrn
 
Angular 9 New features
Angular 9 New featuresAngular 9 New features
Angular 9 New features
Ahmed Bouchefra
 
Is React reactive?
Is React reactive?Is React reactive?
Is React reactive?
Maurice De Beijer [MVP]
 
The productive developer guide to React
The productive developer guide to ReactThe productive developer guide to React
The productive developer guide to React
Maurice De Beijer [MVP]
 
Meteor.js
Meteor.jsMeteor.js
Building High Availability Application with Docker
Building High Availability Application with DockerBuilding High Availability Application with Docker
Building High Availability Application with Docker
nevalla
 
Getting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLIGetting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLI
Jim Lynch
 
Wicket And Swing From One Codebase
Wicket And Swing From One CodebaseWicket And Swing From One Codebase
Wicket And Swing From One Codebase
jcompagner
 
WordCamp Athens 2017 - Building an E-commerce Progressive Web App with React ...
WordCamp Athens 2017 - Building an E-commerce Progressive Web App with React ...WordCamp Athens 2017 - Building an E-commerce Progressive Web App with React ...
WordCamp Athens 2017 - Building an E-commerce Progressive Web App with React ...
Alexandra Anghel
 

What's hot (20)

Meet with Meteor
Meet with MeteorMeet with Meteor
Meet with Meteor
 
Fluent 2018: When third parties stop being polite... and start getting real
Fluent 2018: When third parties stop being polite... and start getting realFluent 2018: When third parties stop being polite... and start getting real
Fluent 2018: When third parties stop being polite... and start getting real
 
Learn Angular 9/8 In Easy Steps
Learn Angular 9/8 In Easy Steps Learn Angular 9/8 In Easy Steps
Learn Angular 9/8 In Easy Steps
 
Webpack and angularjs
Webpack and angularjsWebpack and angularjs
Webpack and angularjs
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
 
Talk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG BéninTalk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG Bénin
 
Magento PWA Studio extensibility
Magento PWA Studio extensibilityMagento PWA Studio extensibility
Magento PWA Studio extensibility
 
Angular 2 in-1
Angular 2 in-1 Angular 2 in-1
Angular 2 in-1
 
Vue.js Use Cases
Vue.js Use CasesVue.js Use Cases
Vue.js Use Cases
 
React 101
React 101React 101
React 101
 
Java and services code lab spring boot and spring data using mongo db
Java and services code lab spring boot and spring data using mongo dbJava and services code lab spring boot and spring data using mongo db
Java and services code lab spring boot and spring data using mongo db
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Angular 9 New features
Angular 9 New featuresAngular 9 New features
Angular 9 New features
 
Is React reactive?
Is React reactive?Is React reactive?
Is React reactive?
 
The productive developer guide to React
The productive developer guide to ReactThe productive developer guide to React
The productive developer guide to React
 
Meteor.js
Meteor.jsMeteor.js
Meteor.js
 
Building High Availability Application with Docker
Building High Availability Application with DockerBuilding High Availability Application with Docker
Building High Availability Application with Docker
 
Getting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLIGetting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLI
 
Wicket And Swing From One Codebase
Wicket And Swing From One CodebaseWicket And Swing From One Codebase
Wicket And Swing From One Codebase
 
WordCamp Athens 2017 - Building an E-commerce Progressive Web App with React ...
WordCamp Athens 2017 - Building an E-commerce Progressive Web App with React ...WordCamp Athens 2017 - Building an E-commerce Progressive Web App with React ...
WordCamp Athens 2017 - Building an E-commerce Progressive Web App with React ...
 

Viewers also liked

Cooking with jQuery
Cooking with jQueryCooking with jQuery
Cooking with jQuery
mikehostetler
 
PHPBootcamp - Zend Framework
PHPBootcamp - Zend FrameworkPHPBootcamp - Zend Framework
PHPBootcamp - Zend Framework
thomasw
 
Stack Overflow Austin - jQuery for Developers
Stack Overflow Austin - jQuery for DevelopersStack Overflow Austin - jQuery for Developers
Stack Overflow Austin - jQuery for DevelopersJonathan Sharp
 
Zend Framework Components for non-framework Development
Zend Framework Components for non-framework DevelopmentZend Framework Components for non-framework Development
Zend Framework Components for non-framework Development
Shahar Evron
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
shereefsakr
 
Facebook Development with Zend Framework
Facebook Development with Zend FrameworkFacebook Development with Zend Framework
Facebook Development with Zend Framework
Brett Harris
 
Zend Framework Getting Started For I5
Zend Framework Getting Started For I5Zend Framework Getting Started For I5
Zend Framework Getting Started For I5
ZendCon
 
Big Data loves JS
Big Data loves JSBig Data loves JS
Big Data loves JS
Dominiek ter Heide
 
Application of nodejs in epsilon mobile
Application of nodejs in epsilon mobileApplication of nodejs in epsilon mobile
Application of nodejs in epsilon mobileTony Vo
 
Beginning Jquery In Drupal Theming
Beginning Jquery In Drupal ThemingBeginning Jquery In Drupal Theming
Beginning Jquery In Drupal Theming
Rob Knight
 
jQuery Presentation to Rails Developers
jQuery Presentation to Rails DevelopersjQuery Presentation to Rails Developers
jQuery Presentation to Rails Developers
Yehuda Katz
 
Node lt
Node ltNode lt
Node lt
snodar
 
Intro to Laravel 4 : By Chris Moore
Intro to Laravel 4 : By Chris Moore Intro to Laravel 4 : By Chris Moore
Intro to Laravel 4 : By Chris Moore
kareerme
 
Starting with Node.js
Starting with Node.jsStarting with Node.js
Starting with Node.js
Jitendra Zaa
 
Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8
Michelangelo van Dam
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
Aeshan Wijetunge
 
Devdays Seattle jQuery Intro for Developers
Devdays Seattle jQuery Intro for DevelopersDevdays Seattle jQuery Intro for Developers
Devdays Seattle jQuery Intro for Developers
cody lindley
 
Laravel 4 package development
Laravel 4 package developmentLaravel 4 package development
Laravel 4 package development
Tihomir Opačić
 
expressjs-cleancontroller-160427080619
expressjs-cleancontroller-160427080619expressjs-cleancontroller-160427080619
expressjs-cleancontroller-160427080619Roman Sachenko
 

Viewers also liked (20)

Cooking with jQuery
Cooking with jQueryCooking with jQuery
Cooking with jQuery
 
PHPBootcamp - Zend Framework
PHPBootcamp - Zend FrameworkPHPBootcamp - Zend Framework
PHPBootcamp - Zend Framework
 
Stack Overflow Austin - jQuery for Developers
Stack Overflow Austin - jQuery for DevelopersStack Overflow Austin - jQuery for Developers
Stack Overflow Austin - jQuery for Developers
 
Zend Framework Components for non-framework Development
Zend Framework Components for non-framework DevelopmentZend Framework Components for non-framework Development
Zend Framework Components for non-framework Development
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
Facebook Development with Zend Framework
Facebook Development with Zend FrameworkFacebook Development with Zend Framework
Facebook Development with Zend Framework
 
Zend Framework Getting Started For I5
Zend Framework Getting Started For I5Zend Framework Getting Started For I5
Zend Framework Getting Started For I5
 
Big Data loves JS
Big Data loves JSBig Data loves JS
Big Data loves JS
 
Application of nodejs in epsilon mobile
Application of nodejs in epsilon mobileApplication of nodejs in epsilon mobile
Application of nodejs in epsilon mobile
 
Beginning Jquery In Drupal Theming
Beginning Jquery In Drupal ThemingBeginning Jquery In Drupal Theming
Beginning Jquery In Drupal Theming
 
jQuery Presentation to Rails Developers
jQuery Presentation to Rails DevelopersjQuery Presentation to Rails Developers
jQuery Presentation to Rails Developers
 
Express yourself
Express yourselfExpress yourself
Express yourself
 
Node lt
Node ltNode lt
Node lt
 
Intro to Laravel 4 : By Chris Moore
Intro to Laravel 4 : By Chris Moore Intro to Laravel 4 : By Chris Moore
Intro to Laravel 4 : By Chris Moore
 
Starting with Node.js
Starting with Node.jsStarting with Node.js
Starting with Node.js
 
Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
Devdays Seattle jQuery Intro for Developers
Devdays Seattle jQuery Intro for DevelopersDevdays Seattle jQuery Intro for Developers
Devdays Seattle jQuery Intro for Developers
 
Laravel 4 package development
Laravel 4 package developmentLaravel 4 package development
Laravel 4 package development
 
expressjs-cleancontroller-160427080619
expressjs-cleancontroller-160427080619expressjs-cleancontroller-160427080619
expressjs-cleancontroller-160427080619
 

Similar to Kraken.js Lab Primer

Node.js primer for ITE students
Node.js primer for ITE studentsNode.js primer for ITE students
Node.js primer for ITE students
Quhan Arunasalam
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
Suresh Patidar
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
Concetto Labs
 
Set up a Development Environment in 5 Minutes
Set up a Development Environment in 5 MinutesSet up a Development Environment in 5 Minutes
Set up a Development Environment in 5 Minutes
Akamai Developers & Admins
 
How to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-SpaHow to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-Spa
RapidValue
 
M365 global developer bootcamp 2019 PA
M365 global developer bootcamp 2019  PAM365 global developer bootcamp 2019  PA
M365 global developer bootcamp 2019 PA
Thomas Daly
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
Mark Myers
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
Mbakaya Kwatukha
 
M365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx VersionM365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx Version
Thomas Daly
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
Vlad Fedosov
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JSFestUA
 
Kickstarting Node.js Projects with Yeoman
Kickstarting Node.js Projects with YeomanKickstarting Node.js Projects with Yeoman
Kickstarting Node.js Projects with Yeoman
Patrick Buergin
 
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring BootBuilding APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
Guilherme Pereira Silva
 
Electron - Build cross platform desktop apps
Electron - Build cross platform desktop appsElectron - Build cross platform desktop apps
Electron - Build cross platform desktop apps
Priyaranjan Mohanty
 
Microservices development at scale
Microservices development at scaleMicroservices development at scale
Microservices development at scale
Vishal Banthia
 
DCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application PackagesDCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application Packages
Docker, Inc.
 
How to build a website that works without internet using angular, service wor...
How to build a website that works without internet using angular, service wor...How to build a website that works without internet using angular, service wor...
How to build a website that works without internet using angular, service wor...
Tomiwa Ademidun
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
kloia
 
Production Experience: Some Insights from Using Vercel and Next.js for Over 3...
Production Experience: Some Insights from Using Vercel and Next.js for Over 3...Production Experience: Some Insights from Using Vercel and Next.js for Over 3...
Production Experience: Some Insights from Using Vercel and Next.js for Over 3...
KosukeMatano1
 
Angular4 getting started
Angular4 getting startedAngular4 getting started
Angular4 getting started
TejinderMakkar
 

Similar to Kraken.js Lab Primer (20)

Node.js primer for ITE students
Node.js primer for ITE studentsNode.js primer for ITE students
Node.js primer for ITE students
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
 
Set up a Development Environment in 5 Minutes
Set up a Development Environment in 5 MinutesSet up a Development Environment in 5 Minutes
Set up a Development Environment in 5 Minutes
 
How to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-SpaHow to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-Spa
 
M365 global developer bootcamp 2019 PA
M365 global developer bootcamp 2019  PAM365 global developer bootcamp 2019  PA
M365 global developer bootcamp 2019 PA
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
M365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx VersionM365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx Version
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Kickstarting Node.js Projects with Yeoman
Kickstarting Node.js Projects with YeomanKickstarting Node.js Projects with Yeoman
Kickstarting Node.js Projects with Yeoman
 
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring BootBuilding APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
 
Electron - Build cross platform desktop apps
Electron - Build cross platform desktop appsElectron - Build cross platform desktop apps
Electron - Build cross platform desktop apps
 
Microservices development at scale
Microservices development at scaleMicroservices development at scale
Microservices development at scale
 
DCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application PackagesDCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application Packages
 
How to build a website that works without internet using angular, service wor...
How to build a website that works without internet using angular, service wor...How to build a website that works without internet using angular, service wor...
How to build a website that works without internet using angular, service wor...
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
Production Experience: Some Insights from Using Vercel and Next.js for Over 3...
Production Experience: Some Insights from Using Vercel and Next.js for Over 3...Production Experience: Some Insights from Using Vercel and Next.js for Over 3...
Production Experience: Some Insights from Using Vercel and Next.js for Over 3...
 
Angular4 getting started
Angular4 getting startedAngular4 getting started
Angular4 getting started
 

Recently uploaded

Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 

Recently uploaded (20)

Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 

Kraken.js Lab Primer

  • 1. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. Kraken.JS Training Aeshan Wijetunge March/ 27/ 2015 NTU IEEE
  • 2. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. Introduction 2 ● Kraken builds upon the expressJS framework ● includes many things out-of-the-box that enterprises require of a modern web application ● Such as ○ Security ○ i8n ○ dustJS templates ○ … and more ● You will learn to use Yeoman to generate skeleton-code ● Lab Exercise: create a Task Manager kraken app
  • 3. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. Kraken modules Makara - Internationalization Lusca - Security Adaro - dustJS Kappa - NPM Proxy 3
  • 4. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 4 a Javascript template engine which compiles *.dust templates into javascript which can be rendered on either the server or...the client More details available here
  • 5. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 5 Kraken separates content from dust-templates using property-files. Makara combines these bundles with dust-templates to produce localized pages for each locale. This allows for: {index.dust} + locales/US/en/index.properties = /US/en/index.js.gz Content : Enter Makara ● Internationalization with language-specific content bundles ● template reuse: 1 template to many localized content bundles
  • 6. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 6 ● Grunt is a build tool for javascript ● Kraken uses grunt to build js-views from templates (for production) ● Makara expects en_US to be the default language of any kraken app ● if you use localised content, you must to have a content bundle in the locale/US/en folder This convention helps avoid grunt build failures later on. Caveat : Grunt, {dustjs} and the makara fallback
  • 7. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 7 Create a simple kraken.js application to create & manage your tasks. ● Store data in a session ● You may wish to refer to these online resources while developing it ○ http://krakenjs.com/#getting-started ○ https://github.com/krakenjs/makara ○ https://github.com/krakenjs/generator-kraken ○ ...and more can be found via Google Lab: Task Manager
  • 8. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 8 A very useful code-generation tool for developers looking increase their productivity and not have to copy & paste the basic structure of the app. Yeoman : bootstrapping app development Install yeoman via npm [sudo] npm install -g yo generator-kraken bower grunt-cli Why you should use it... ● Eliminates the dull & repetitive steps needed to code an app from scratch ● Allows the developer to rapidly setup the app-skeleton following conventions ● Can be used from the command-line ● We’ll be using this tool a lot in the labs
  • 9. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 9 As we’re not going to be developing a production-grade application in this lab, we’re going to disable certain features which might make development troublesome. Pre-Lab setup Disable lusca here Why you should do so for this lab... ● HTTP POSTS will encounter _csrf missing errors ● 403 Forbidden errors may occur Please have it enabled should you deploy it online
  • 10. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 10 Lets try it out in creating our task-manager Lab: Use Yeoman to generate the basics Create the app-skeleton yo kraken TaskManager select the following options when prompted ● DustJS ● LESS ● RequireJS ● Bower then cd TaskManager Generate a controller for handling tasks (this should generate models/dust/content) yo kraken:controller tasks More details here Start the app npm install npm start View the page localhost:8000/
  • 11. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 11 We want to add tasks to our app and do so we need to extend our app. Lab: add some functionality More details here Add a new route for create on controller example Add a simple form to index.dust for task creation example Start the app npm start View the page localhost:8000/tasks/
  • 12. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 12 We want to list the newly added task: Lab: list the added tasks More details here Modify the controller-route to load the tasks from req.session example here Modify the index.dust to loop through the tasks example Start the app npm start View the page localhost:8000/tasks/
  • 13. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 13 Try to extend your application to use the Restful expressJS service you created earlier. (Optional) Lab: use your expressJS service Replace the task-creation controller code with a Rest-client call
  • 14. © 2015 PayPal Inc. All rights reserved. Confidential and proprietary. 14 This is an open-source framework which extends already popular expressJS. ● Documentation & APIs are just a google away ● Big user community online ● Most answers are already on stack-overflow ● Use debuggers like node-inspector or IDEs to troubleshoot issues Conclusion Thanks for attending!