SlideShare a Scribd company logo
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Build a React App
#devnetcreate workshop
API Evangelist @CiscoDevNet
@SteveSfartz, stsfartz@cisco.com
Stève Sfartz
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• API Evangelist @CiscoDevNet - Europe
• REST & Microservices Architecture
• Cisco Spark API & Collaboration Endpoints xAPI
• hosted @CiscoROI: Paris Innovation Center
• node.js mainly, a bit of #golang
• France and all around Europe
• github: //ObjectIsAdvantag
/Cisco/DevNet/SteveSfartz
“vision without
execution is
hallucination”
stsfartz@cisco.com
@SteveSfartz
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Discover React development and Cisco Collaboration Endpoints
(CE9.2.1+) programmability.
• Throughout the workshop, you'll first learn to compute Meeting Room
Analytics from real-time events sent by Meeting Room Device’s
Camera.
• We'll then go through the code of a React App that shows a map of
DevNet Create 2018 location, and update it to display how many
developers are attending each workshop.
• Pre-requisites: you have 1 to 3 years of professional development
experienceand a laptop with a pre-configured Node.js v6+
development environment.
Build a React app
… that shows live activity at DevNet Create
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• React
• RoomKits
• xAPI
• Node.js
https://github.com/ObjectIsAdvantag/roomkit-react-map
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Pre-requisites
• Interacting with Room Series from code
• Creating a React Map
• static HTML
• static React
• injecting Data
• Live Map
Agenda
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Pre-requisites
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• https://github.com/CiscoDevNet/Create2018 - Stève Sfartz
• Check you have node v6+ installed on your laptop via node -v command,
OR install latest version of node on your machine from https://nodejs.org
• Extra command line tools: git client, npm, Firefox, postman
• Sign at https://developer.ciscospark.com with your Cisco Spark account
credentials
• Join the Space attached to the Workshop https://eurl.io/#BJC1Z--jM
Technical Requirements
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• node –v (nodejs.org), v6+, v8 preferred
• npm –v
• git -–version
• a code editor (Visual Studio Code, Atom...)
• Cisco Spark support space: https://eurl.io/#BJC1Z--jM
Pre-requites
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Interacting with Room Series
from code
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• http://cs.co/roomdevices
• Connect to RoomKitsWifi
• http://192.168.2.4/web/signin
• ssh with integrator role
> xstatus RoomAnalytics PeopleCount
• listen to events
> xfeedback register /Status/RoomAnalytics/PeopleCount
Meet a Room Kit
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• REST API (xml over http)
• https://github.com/CiscoDevNet/postman-xapi
• jsxapi
• https://github.com/ObjectIsAdvantag/xapi-samples/blob/master/jsxapi/7-
feedback-peoplecount.js
> JSXAPI_DEVICE_URL="ssh://192.168.2.4"
JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node 7-
feedback-peoplecount.js
Run from code
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• https://github.com/ObjectIsAdvantag/roomkit-collector
• edit device.json
• Run collector
> DEBUG=api*,collector* node server.js
• Run mock version
> cd api
> node mock.js
RoomKit Collector
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Connect to the RoomKit Sandbox
Sandbox
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
A bit of React
Crash course
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
About React
https://www.kirupa.com/react/introducing_react.htm
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Since it came out in 2013, React has also steadily found its way into
popular web sites and apps that you probably use.
• Besides Facebook and Instagram, some of the notable ones include
the BBC, Khan Academy, PayPal, Reddit, The New York Times,
Yahoo, and many more.
• https://github.com/facebook/react/wiki/Sites-Using-React
Facts
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Traditional Web Apps
(server side Web)
SPA
(Single Page Apps)
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
SPA
• In a single page application, the bulk
of your time will be spent keeping
your data in-sync with your UI
• Manipulating the DOM is really
REALLY slow.
• Working with HTML templates can be
a pain
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Automatic UI State Management
• Lightning-fast DOM Manipulation
• In-memory Virtual DOM
• APIs to Create Truly Composable Uis
• Visuals Defined Entirely in JavaScript
• no framework-specific templating command
React
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Developing for React
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Dealing with JS
• Babel JavaScript compiler
• Converting JSX
• Node.JS CI/CD toolchain
• Conversion at runtime
React Toolchain
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Conversion at Runtime
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Static conversation: CI/CD ToolChain
https://www.kirupa.com/react/setting_up_react_environment.htm
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Utility: create-react-app
> npm install -g create-react-app
> create-react-app helloworld
> cd helloworld
# for development
> npm start #
# for packaging
> npm run build
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Module bundler for Javascript applications
• Takes in various assets (JS, CSS, Fonts, Images, HTML…)
• Transforms, minifies and optimizes to serve one bundle to the
browser
• JS library with an extensible architecture (loaders & plugins)
• Builds a dependency graph from webpack.config.js
WebPack
https://github.com/webpack
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Your First App
https://www.kirupa.com/react/building_your_first_react_app.htm
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• The render method takes two arguments:
• The HTML-like elements (aka JSX) you wish to output
• The location in the DOM that React will render the JSX into
React Basics
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
React Components
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Component LifeCycle Methods
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Synthetic Events
Generic properties MouseEvent properties KeyBoardEvent properties
https://reactjs.org/docs/events.html
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Working with Redux
https://www.kirupa.com/react/using_redux_with_react.htm
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Share state with Redux store
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Learn React by Kirupa
• https://www.kirupa.com/react/using_redux_with_react.htm
• Fetching Data in React
• https://www.robinwieruch.de/react-fetching-data/
• Higher order components
• https://www.robinwieruch.de/gentle-introduction-higher-order-components/
Resources
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Creating a React Map
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
React Map Starter Kit
https://github.com/ObjectIsAdvantag/roomkit-react-map
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Live Map
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Postman collections for xAPI
• https://github.com/CiscoDevNet/postman-xapi
• Code samples, React tutos, RoomKit Map and Collector
• https://github.com/ObjectIsAdvantag
• Dev Center
• http://cs.co/roomdevices
• Twitter
• @SteveSfartz
Resources
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Thank you
stsfartz@cisco.com
twitter: @SteveSfartz
github: @ObjectIsAdvantag
Ad

Recommended

Introduction to Facebook React
Introduction to Facebook React
Mitch Chen
 
React/Redux
React/Redux
Durgesh Vaishnav
 
Thinking in react
Thinking in react
aashimadudeja
 
React js
React js
Alireza Akbari
 
React web development
React web development
Rully Ramanda
 
React + Redux Introduction
React + Redux Introduction
Nikolaus Graf
 
Introduction to Redux
Introduction to Redux
Ignacio Martín
 
React
React
중운 박
 
Introduction to react_js
Introduction to react_js
MicroPyramid .
 
Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022
Fabio Biondi
 
React JS and Redux
React JS and Redux
Glib Kechyn
 
React-JS.pptx
React-JS.pptx
AnmolPandita7
 
Redux training
Redux training
dasersoft
 
ReactJS presentation
ReactJS presentation
Thanh Tuong
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
React js programming concept
React js programming concept
Tariqul islam
 
Introduction to React
Introduction to React
Rob Quick
 
React hooks
React hooks
Assaf Gannon
 
React lecture
React lecture
Christoffer Noring
 
React js
React js
Rajesh Kolla
 
React js - The Core Concepts
React js - The Core Concepts
Divyang Bhambhani
 
Intro to React
Intro to React
Justin Reock
 
Reasons to use React Query
Reasons to use React Query
javaria javaid
 
React js use contexts and useContext hook
React js use contexts and useContext hook
Piyush Jamwal
 
React Hooks
React Hooks
Joao Marins
 
React js
React js
Oswald Campesato
 
React redux-tutoriel-1
React redux-tutoriel-1
Sem Koto
 
Introduction to React JS for beginners
Introduction to React JS for beginners
Varun Raj
 
Javascript Essentials - Cisco Live Barcelona 2019
Javascript Essentials - Cisco Live Barcelona 2019
Cisco DevNet
 
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Cisco DevNet
 

More Related Content

What's hot (20)

Introduction to react_js
Introduction to react_js
MicroPyramid .
 
Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022
Fabio Biondi
 
React JS and Redux
React JS and Redux
Glib Kechyn
 
React-JS.pptx
React-JS.pptx
AnmolPandita7
 
Redux training
Redux training
dasersoft
 
ReactJS presentation
ReactJS presentation
Thanh Tuong
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
React js programming concept
React js programming concept
Tariqul islam
 
Introduction to React
Introduction to React
Rob Quick
 
React hooks
React hooks
Assaf Gannon
 
React lecture
React lecture
Christoffer Noring
 
React js
React js
Rajesh Kolla
 
React js - The Core Concepts
React js - The Core Concepts
Divyang Bhambhani
 
Intro to React
Intro to React
Justin Reock
 
Reasons to use React Query
Reasons to use React Query
javaria javaid
 
React js use contexts and useContext hook
React js use contexts and useContext hook
Piyush Jamwal
 
React Hooks
React Hooks
Joao Marins
 
React js
React js
Oswald Campesato
 
React redux-tutoriel-1
React redux-tutoriel-1
Sem Koto
 
Introduction to React JS for beginners
Introduction to React JS for beginners
Varun Raj
 
Introduction to react_js
Introduction to react_js
MicroPyramid .
 
Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022
Fabio Biondi
 
React JS and Redux
React JS and Redux
Glib Kechyn
 
Redux training
Redux training
dasersoft
 
ReactJS presentation
ReactJS presentation
Thanh Tuong
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
React js programming concept
React js programming concept
Tariqul islam
 
Introduction to React
Introduction to React
Rob Quick
 
React js - The Core Concepts
React js - The Core Concepts
Divyang Bhambhani
 
Reasons to use React Query
Reasons to use React Query
javaria javaid
 
React js use contexts and useContext hook
React js use contexts and useContext hook
Piyush Jamwal
 
React redux-tutoriel-1
React redux-tutoriel-1
Sem Koto
 
Introduction to React JS for beginners
Introduction to React JS for beginners
Varun Raj
 

Similar to DevNetCreate Workshop - build a react app - React crash course (20)

Javascript Essentials - Cisco Live Barcelona 2019
Javascript Essentials - Cisco Live Barcelona 2019
Cisco DevNet
 
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Cisco DevNet
 
DevNet 1056 WIT Spark API and Chat Bot Workshop
DevNet 1056 WIT Spark API and Chat Bot Workshop
Tessa Mero
 
Meeting rooms are talking! are you listening?
Meeting rooms are talking! are you listening?
Cisco DevNet
 
Coding 102 REST API Basics Using Spark
Coding 102 REST API Basics Using Spark
Cisco DevNet
 
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Codemotion
 
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Codemotion
 
Meeting rooms are talking. Are you listening
Meeting rooms are talking. Are you listening
Cisco DevNet
 
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Cisco DevNet
 
Docs as Code: Publishing Processes for API Experiences
Docs as Code: Publishing Processes for API Experiences
Anne Gentle
 
DevNet Express - Spark & Tropo API - Lisbon May 2016
DevNet Express - Spark & Tropo API - Lisbon May 2016
Cisco DevNet
 
Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896
Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896
Cisco DevNet
 
Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071
Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071
Cisco DevNet
 
Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
Cisco DevNet
 
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Cisco DevNet
 
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Cisco DevNet
 
Build advanced chat bots - Steve Sfartz - Codemotion Amsterdam 2017
Build advanced chat bots - Steve Sfartz - Codemotion Amsterdam 2017
Codemotion
 
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
Codemotion
 
Embedding Messages and Video Calls in your apps
Embedding Messages and Video Calls in your apps
Cisco DevNet
 
Advanced Postman for Better APIs - Web Summit 2018 - Cisco DevNet
Advanced Postman for Better APIs - Web Summit 2018 - Cisco DevNet
Cisco DevNet
 
Javascript Essentials - Cisco Live Barcelona 2019
Javascript Essentials - Cisco Live Barcelona 2019
Cisco DevNet
 
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Cisco DevNet
 
DevNet 1056 WIT Spark API and Chat Bot Workshop
DevNet 1056 WIT Spark API and Chat Bot Workshop
Tessa Mero
 
Meeting rooms are talking! are you listening?
Meeting rooms are talking! are you listening?
Cisco DevNet
 
Coding 102 REST API Basics Using Spark
Coding 102 REST API Basics Using Spark
Cisco DevNet
 
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Codemotion
 
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Codemotion
 
Meeting rooms are talking. Are you listening
Meeting rooms are talking. Are you listening
Cisco DevNet
 
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Integrated, Automated Video Room Systems - Webex Devices - Cisco Live Orlando...
Cisco DevNet
 
Docs as Code: Publishing Processes for API Experiences
Docs as Code: Publishing Processes for API Experiences
Anne Gentle
 
DevNet Express - Spark & Tropo API - Lisbon May 2016
DevNet Express - Spark & Tropo API - Lisbon May 2016
Cisco DevNet
 
Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896
Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896
Cisco DevNet
 
Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071
Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071
Cisco DevNet
 
Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
Cisco DevNet
 
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Cisco DevNet
 
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Cisco DevNet
 
Build advanced chat bots - Steve Sfartz - Codemotion Amsterdam 2017
Build advanced chat bots - Steve Sfartz - Codemotion Amsterdam 2017
Codemotion
 
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
Codemotion
 
Embedding Messages and Video Calls in your apps
Embedding Messages and Video Calls in your apps
Cisco DevNet
 
Advanced Postman for Better APIs - Web Summit 2018 - Cisco DevNet
Advanced Postman for Better APIs - Web Summit 2018 - Cisco DevNet
Cisco DevNet
 
Ad

More from Cisco DevNet (19)

DEVNET-2138 - Managing OpenAPI Documents at Scale - clus24.pdf
DEVNET-2138 - Managing OpenAPI Documents at Scale - clus24.pdf
Cisco DevNet
 
18 facets of the OpenAPI specification - Cisco Live US 2023
18 facets of the OpenAPI specification - Cisco Live US 2023
Cisco DevNet
 
The 12 facets of the OpenAPI standard.pdf
The 12 facets of the OpenAPI standard.pdf
Cisco DevNet
 
the 12 facets of OpenAPI
the 12 facets of OpenAPI
Cisco DevNet
 
Webex APIs for Administrators - CL20B - DEVNET-2610
Webex APIs for Administrators - CL20B - DEVNET-2610
Cisco DevNet
 
Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019
Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019
Cisco DevNet
 
when Apps meet Infrastructure - CodeMotionMilan2018 Keynote - Cisco DevNet - ...
when Apps meet Infrastructure - CodeMotionMilan2018 Keynote - Cisco DevNet - ...
Cisco DevNet
 
Emulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API Providers
Cisco DevNet
 
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Cisco DevNet
 
Webex APIs for Admins - Cisco Live Orlando 2018 - DEVNET-3610
Webex APIs for Admins - Cisco Live Orlando 2018 - DEVNET-3610
Cisco DevNet
 
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Cisco DevNet
 
BotCommons: Metadata for Bots - Devoxx 2017
BotCommons: Metadata for Bots - Devoxx 2017
Cisco DevNet
 
Breizhcamp: Créer un bot, pas si simple. Faisons le point.
Breizhcamp: Créer un bot, pas si simple. Faisons le point.
Cisco DevNet
 
Phone Communications in Javascript with Tropo Serverless
Phone Communications in Javascript with Tropo Serverless
Cisco DevNet
 
Hackathon Poste Mobile 2016 Cisco Roma @TAG TalentGardenIT
Hackathon Poste Mobile 2016 Cisco Roma @TAG TalentGardenIT
Cisco DevNet
 
From ZERO to REST in an hour
From ZERO to REST in an hour
Cisco DevNet
 
building microservices
building microservices
Cisco DevNet
 
An introduction to Microservices
An introduction to Microservices
Cisco DevNet
 
RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)
Cisco DevNet
 
DEVNET-2138 - Managing OpenAPI Documents at Scale - clus24.pdf
DEVNET-2138 - Managing OpenAPI Documents at Scale - clus24.pdf
Cisco DevNet
 
18 facets of the OpenAPI specification - Cisco Live US 2023
18 facets of the OpenAPI specification - Cisco Live US 2023
Cisco DevNet
 
The 12 facets of the OpenAPI standard.pdf
The 12 facets of the OpenAPI standard.pdf
Cisco DevNet
 
the 12 facets of OpenAPI
the 12 facets of OpenAPI
Cisco DevNet
 
Webex APIs for Administrators - CL20B - DEVNET-2610
Webex APIs for Administrators - CL20B - DEVNET-2610
Cisco DevNet
 
Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019
Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019
Cisco DevNet
 
when Apps meet Infrastructure - CodeMotionMilan2018 Keynote - Cisco DevNet - ...
when Apps meet Infrastructure - CodeMotionMilan2018 Keynote - Cisco DevNet - ...
Cisco DevNet
 
Emulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API Providers
Cisco DevNet
 
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Cisco DevNet
 
Webex APIs for Admins - Cisco Live Orlando 2018 - DEVNET-3610
Webex APIs for Admins - Cisco Live Orlando 2018 - DEVNET-3610
Cisco DevNet
 
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Cisco DevNet
 
BotCommons: Metadata for Bots - Devoxx 2017
BotCommons: Metadata for Bots - Devoxx 2017
Cisco DevNet
 
Breizhcamp: Créer un bot, pas si simple. Faisons le point.
Breizhcamp: Créer un bot, pas si simple. Faisons le point.
Cisco DevNet
 
Phone Communications in Javascript with Tropo Serverless
Phone Communications in Javascript with Tropo Serverless
Cisco DevNet
 
Hackathon Poste Mobile 2016 Cisco Roma @TAG TalentGardenIT
Hackathon Poste Mobile 2016 Cisco Roma @TAG TalentGardenIT
Cisco DevNet
 
From ZERO to REST in an hour
From ZERO to REST in an hour
Cisco DevNet
 
building microservices
building microservices
Cisco DevNet
 
An introduction to Microservices
An introduction to Microservices
Cisco DevNet
 
RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)
Cisco DevNet
 
Ad

Recently uploaded (20)

Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
The Future of Technology: 2025-2125 by Saikat Basu.pdf
The Future of Technology: 2025-2125 by Saikat Basu.pdf
Saikat Basu
 
The Future of Product Management in AI ERA.pdf
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
 
Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Priyanka Aash
 
Quantum AI: Where Impossible Becomes Probable
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
The Future of Technology: 2025-2125 by Saikat Basu.pdf
The Future of Technology: 2025-2125 by Saikat Basu.pdf
Saikat Basu
 
The Future of Product Management in AI ERA.pdf
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
 
Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Priyanka Aash
 
Quantum AI: Where Impossible Becomes Probable
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
 

DevNetCreate Workshop - build a react app - React crash course

  • 1. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Build a React App #devnetcreate workshop API Evangelist @CiscoDevNet @SteveSfartz, [email protected] Stève Sfartz
  • 2. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • API Evangelist @CiscoDevNet - Europe • REST & Microservices Architecture • Cisco Spark API & Collaboration Endpoints xAPI • hosted @CiscoROI: Paris Innovation Center • node.js mainly, a bit of #golang • France and all around Europe • github: //ObjectIsAdvantag /Cisco/DevNet/SteveSfartz “vision without execution is hallucination” [email protected] @SteveSfartz
  • 3. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • Discover React development and Cisco Collaboration Endpoints (CE9.2.1+) programmability. • Throughout the workshop, you'll first learn to compute Meeting Room Analytics from real-time events sent by Meeting Room Device’s Camera. • We'll then go through the code of a React App that shows a map of DevNet Create 2018 location, and update it to display how many developers are attending each workshop. • Pre-requisites: you have 1 to 3 years of professional development experienceand a laptop with a pre-configured Node.js v6+ development environment. Build a React app … that shows live activity at DevNet Create
  • 4. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • React • RoomKits • xAPI • Node.js https://github.com/ObjectIsAdvantag/roomkit-react-map
  • 5. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • Pre-requisites • Interacting with Room Series from code • Creating a React Map • static HTML • static React • injecting Data • Live Map Agenda
  • 6. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Pre-requisites
  • 7. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • https://github.com/CiscoDevNet/Create2018 - Stève Sfartz • Check you have node v6+ installed on your laptop via node -v command, OR install latest version of node on your machine from https://nodejs.org • Extra command line tools: git client, npm, Firefox, postman • Sign at https://developer.ciscospark.com with your Cisco Spark account credentials • Join the Space attached to the Workshop https://eurl.io/#BJC1Z--jM Technical Requirements
  • 8. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • node –v (nodejs.org), v6+, v8 preferred • npm –v • git -–version • a code editor (Visual Studio Code, Atom...) • Cisco Spark support space: https://eurl.io/#BJC1Z--jM Pre-requites
  • 9. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Interacting with Room Series from code
  • 10. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • http://cs.co/roomdevices • Connect to RoomKitsWifi • http://192.168.2.4/web/signin • ssh with integrator role > xstatus RoomAnalytics PeopleCount • listen to events > xfeedback register /Status/RoomAnalytics/PeopleCount Meet a Room Kit
  • 11. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • REST API (xml over http) • https://github.com/CiscoDevNet/postman-xapi • jsxapi • https://github.com/ObjectIsAdvantag/xapi-samples/blob/master/jsxapi/7- feedback-peoplecount.js > JSXAPI_DEVICE_URL="ssh://192.168.2.4" JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node 7- feedback-peoplecount.js Run from code
  • 12. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • https://github.com/ObjectIsAdvantag/roomkit-collector • edit device.json • Run collector > DEBUG=api*,collector* node server.js • Run mock version > cd api > node mock.js RoomKit Collector
  • 13. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • Connect to the RoomKit Sandbox Sandbox
  • 14. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential A bit of React Crash course
  • 15. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential About React https://www.kirupa.com/react/introducing_react.htm
  • 16. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • Since it came out in 2013, React has also steadily found its way into popular web sites and apps that you probably use. • Besides Facebook and Instagram, some of the notable ones include the BBC, Khan Academy, PayPal, Reddit, The New York Times, Yahoo, and many more. • https://github.com/facebook/react/wiki/Sites-Using-React Facts
  • 17. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Traditional Web Apps (server side Web) SPA (Single Page Apps)
  • 18. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential SPA • In a single page application, the bulk of your time will be spent keeping your data in-sync with your UI • Manipulating the DOM is really REALLY slow. • Working with HTML templates can be a pain
  • 19. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • Automatic UI State Management • Lightning-fast DOM Manipulation • In-memory Virtual DOM • APIs to Create Truly Composable Uis • Visuals Defined Entirely in JavaScript • no framework-specific templating command React
  • 20. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Developing for React
  • 21. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • Dealing with JS • Babel JavaScript compiler • Converting JSX • Node.JS CI/CD toolchain • Conversion at runtime React Toolchain
  • 22. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Conversion at Runtime
  • 23. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Static conversation: CI/CD ToolChain https://www.kirupa.com/react/setting_up_react_environment.htm
  • 24. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Utility: create-react-app > npm install -g create-react-app > create-react-app helloworld > cd helloworld # for development > npm start # # for packaging > npm run build
  • 25. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • Module bundler for Javascript applications • Takes in various assets (JS, CSS, Fonts, Images, HTML…) • Transforms, minifies and optimizes to serve one bundle to the browser • JS library with an extensible architecture (loaders & plugins) • Builds a dependency graph from webpack.config.js WebPack https://github.com/webpack
  • 26. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Your First App https://www.kirupa.com/react/building_your_first_react_app.htm
  • 27. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • The render method takes two arguments: • The HTML-like elements (aka JSX) you wish to output • The location in the DOM that React will render the JSX into React Basics
  • 28. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential React Components
  • 29. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Component LifeCycle Methods
  • 30. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Synthetic Events Generic properties MouseEvent properties KeyBoardEvent properties https://reactjs.org/docs/events.html
  • 31. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Working with Redux https://www.kirupa.com/react/using_redux_with_react.htm
  • 32. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Share state with Redux store
  • 33. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • Learn React by Kirupa • https://www.kirupa.com/react/using_redux_with_react.htm • Fetching Data in React • https://www.robinwieruch.de/react-fetching-data/ • Higher order components • https://www.robinwieruch.de/gentle-introduction-higher-order-components/ Resources
  • 34. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Creating a React Map
  • 35. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential React Map Starter Kit https://github.com/ObjectIsAdvantag/roomkit-react-map
  • 36. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Live Map
  • 37. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential • Postman collections for xAPI • https://github.com/CiscoDevNet/postman-xapi • Code samples, React tutos, RoomKit Map and Collector • https://github.com/ObjectIsAdvantag • Dev Center • http://cs.co/roomdevices • Twitter • @SteveSfartz Resources
  • 38. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Thank you [email protected] twitter: @SteveSfartz github: @ObjectIsAdvantag

Editor's Notes

  • #6: 0. Postman tour - Create workspace "Develop@Cisco" - Create request https://developer.ciscospark.com/endpoint-people-me-get.html - Generating code run node.js script 1. Creating a collection - Add to collection "Postman Tour" - Add environment variables spark_token - Add another request https://developer.ciscospark.com/endpoint-rooms-post.html 2. Documentation your collection - Add description to the existing REST requests - Select your collection and click "View in Web" - Pick an environment - Publish => there is more 3. Running your collection - Select your collection and click "Run" - Pick 3 iterations, 500ms delay, Run => let's add tests (passed 0/0) 4. Add scripting - Add a test for Get Person Details - Run the REST request (2/2) - Add a test for Create a room - Run the REST request (2/2) - Add a DELETE room request => run the collection again (Passed 5/5) 5. Test automation - Create a monitor => need a paying plan - Install newman - Export your collection and run newman newman run "Postman Tour .postman_collection.json" --global-var "spark_token=XXXXXXXXXXXX" 6. Load other postman collections - Spark collection => ordered list - xAPI collection => XML sample 7. Free time - Analyse Meraki collection - Create your own 8. Wrap up, and To go further - Run in postman button - Swagger import
  • #11: Count people GREATER THAN