SlideShare a Scribd company logo
1 of 21
Download to read offline
Copyright © twilio Inc. 2013
DESIGNING MODULES FOR THE
BROWSER AND NODE
JSCONF 2014
HI. I’M KEVIN.
developer evangelist @ twilio
MAKE AND
RECEIVE
PHONE CALLS
SEND AND
RECEIVE TEXT
AND PICTURE
MESSAGES
ENABLE VOIP
CALLING IN
DESKTOP
BROWSERS OR
MOBILE APPS
NPM INSTALL TWILIO
WHY BROWSERIFY?
• Same module loading system
• Same package manager
• Same code style
• Potential for code reuse
• Many modules just work
DO I NEED TO BROWSERIFY?
Maybe, if your module:
• Has complimentary interfaces on client and
server (ws)
• Doesn’t just work with Browserify’s shims
DESIGN TO BE BROWSERIFIED
• Expose a browser-specific entry point
• Define any custom shims for dependencies as
needed
• Setup source transforms
DEMO
USE CASE - TWILIO CLIENT (VOIP)
• Enable VoIP calling between browsers, mobile
apps, and standard PSTN phones
• Requires both a server and client component
• Lots of configuration when client and server are
disconnected
USE CASE - TWILIO CLIENT (VOIP)
BROWSER NODE
Request capability token
USE CASE - TWILIO CLIENT (VOIP)
BROWSER NODE
Hit Twilio REST API maybe,
return capability token
USE CASE - TWILIO CLIENT (VOIP)
BROWSER TWILIO
Ask Twilio to initiate VoIP call
USE CASE - TWILIO CLIENT (VOIP)
NODE TWILIO
Ask for instructions on how to
handle call
USE CASE - TWILIO CLIENT (VOIP)
NODE TWILIO
Return instructions for the
call
USE CASE - TWILIO CLIENT (VOIP)
BROWSER YOUR NANA
VoIP call connected!
DEMO
RESOURCES
• package.json docs: https://github.com/substack/node-
browserify#packagejson
• “browser” field spec: https://gist.github.com/
defunctzombie/4339901
• Transforms: https://github.com/substack/node-
browserify#btransformopts-tr
• ngrok: http://ngrok.com
THANK YOU!
@kevinwhinnery
kw@twilio.com
!
http://github.com/kwhinnery
http://slideshare.net/kwhinnery

More Related Content

What's hot

Amazon Final internship presentation
Amazon Final internship presentationAmazon Final internship presentation
Amazon Final internship presentation
Steven Nguyen
 
Windows Store Apps: Tips & Tricks
Windows Store Apps: Tips & TricksWindows Store Apps: Tips & Tricks
Windows Store Apps: Tips & Tricks
Robert MacLean
 

What's hot (20)

Introduction to Xamarin 2.0
Introduction to Xamarin 2.0Introduction to Xamarin 2.0
Introduction to Xamarin 2.0
 
Building Cross-Platform JavaScript Apps using Cordova
Building Cross-Platform JavaScript Apps using CordovaBuilding Cross-Platform JavaScript Apps using Cordova
Building Cross-Platform JavaScript Apps using Cordova
 
JavaScript for ASP.NET programmers (webcast) upload
JavaScript for ASP.NET programmers (webcast) uploadJavaScript for ASP.NET programmers (webcast) upload
JavaScript for ASP.NET programmers (webcast) upload
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015
 
Xamarin.Forms Hands On Lab (Advanced)
Xamarin.Forms Hands On Lab (Advanced)Xamarin.Forms Hands On Lab (Advanced)
Xamarin.Forms Hands On Lab (Advanced)
 
Hybrid App Development with PhoneGap
Hybrid App Development with PhoneGapHybrid App Development with PhoneGap
Hybrid App Development with PhoneGap
 
Flying High with Xamarin
Flying High with XamarinFlying High with Xamarin
Flying High with Xamarin
 
Kevin Whinnery: Best Practices for Cross-Platform Mobile Development
Kevin Whinnery: Best Practices for Cross-Platform Mobile DevelopmentKevin Whinnery: Best Practices for Cross-Platform Mobile Development
Kevin Whinnery: Best Practices for Cross-Platform Mobile Development
 
Xamarin Dev Days - Intro to Xamarin
Xamarin Dev Days - Intro to XamarinXamarin Dev Days - Intro to Xamarin
Xamarin Dev Days - Intro to Xamarin
 
How much would it cost to hire developers in india
How much would it cost to hire developers in indiaHow much would it cost to hire developers in india
How much would it cost to hire developers in india
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap Insights
 
Silverlight vs WPF
Silverlight vs WPFSilverlight vs WPF
Silverlight vs WPF
 
Amazon Final internship presentation
Amazon Final internship presentationAmazon Final internship presentation
Amazon Final internship presentation
 
Flutter vs react native head to toe comparison [2021 edition]
Flutter vs react native  head to toe comparison [2021 edition]Flutter vs react native  head to toe comparison [2021 edition]
Flutter vs react native head to toe comparison [2021 edition]
 
What software developers do
What software developers doWhat software developers do
What software developers do
 
Windows Store Apps: Tips & Tricks
Windows Store Apps: Tips & TricksWindows Store Apps: Tips & Tricks
Windows Store Apps: Tips & Tricks
 
Xamarin 0
Xamarin 0Xamarin 0
Xamarin 0
 
Developing and Designing Native Mobile Apps in Visual Studio
Developing and Designing Native Mobile Apps in Visual StudioDeveloping and Designing Native Mobile Apps in Visual Studio
Developing and Designing Native Mobile Apps in Visual Studio
 
Importance Of Alert And Notification In App Dev
Importance Of Alert And Notification In App DevImportance Of Alert And Notification In App Dev
Importance Of Alert And Notification In App Dev
 

Viewers also liked

In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript AppsIn Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
Spike Brehm
 

Viewers also liked (10)

1st npm
1st npm1st npm
1st npm
 
Browserify
BrowserifyBrowserify
Browserify
 
Get Pumped for the HTML 5 Gamepad API
Get Pumped for the HTML 5 Gamepad APIGet Pumped for the HTML 5 Gamepad API
Get Pumped for the HTML 5 Gamepad API
 
Web development tools { starter pack }
Web development tools { starter pack }Web development tools { starter pack }
Web development tools { starter pack }
 
Lightning Talk: Making JS better with Browserify
Lightning Talk: Making JS better with BrowserifyLightning Talk: Making JS better with Browserify
Lightning Talk: Making JS better with Browserify
 
JavaScript Dependencies, Modules & Browserify
JavaScript Dependencies, Modules & BrowserifyJavaScript Dependencies, Modules & Browserify
JavaScript Dependencies, Modules & Browserify
 
npm + browserify
npm + browserifynpm + browserify
npm + browserify
 
PHP and node.js Together
PHP and node.js TogetherPHP and node.js Together
PHP and node.js Together
 
Building testable chrome extensions
Building testable chrome extensionsBuilding testable chrome extensions
Building testable chrome extensions
 
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript AppsIn Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
 

Similar to Designing Modules for the Browser and Node with Browserify

Developing Mobile Solutions with Azure and Windows Phone VSLive! Redmond 2013
Developing Mobile Solutions with Azure and Windows Phone VSLive! Redmond 2013Developing Mobile Solutions with Azure and Windows Phone VSLive! Redmond 2013
Developing Mobile Solutions with Azure and Windows Phone VSLive! Redmond 2013
Woodruff Solutions LLC
 
Automated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStackAutomated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStack
Animesh Singh
 
Cloud Foundry at VMware
Cloud Foundry at VMwareCloud Foundry at VMware
Cloud Foundry at VMware
Platform CF
 

Similar to Designing Modules for the Browser and Node with Browserify (20)

DEVNET-1122 Integrating Cisco Collaboration into Web Apps
DEVNET-1122	Integrating Cisco Collaboration into Web AppsDEVNET-1122	Integrating Cisco Collaboration into Web Apps
DEVNET-1122 Integrating Cisco Collaboration into Web Apps
 
Eclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in BluemixEclipse tools for deployment to was liberty profile in Bluemix
Eclipse tools for deployment to was liberty profile in Bluemix
 
News from hursley jens diedrichsen - may 2014
News from hursley   jens diedrichsen - may 2014 News from hursley   jens diedrichsen - may 2014
News from hursley jens diedrichsen - may 2014
 
AWS Summit Stockholm 2014 – T4 – Continuous integration on AWS
AWS Summit Stockholm 2014 – T4 – Continuous integration on AWSAWS Summit Stockholm 2014 – T4 – Continuous integration on AWS
AWS Summit Stockholm 2014 – T4 – Continuous integration on AWS
 
WSO2Con USA 2015: WSO2 Cloud: What it is, How it Works, and Where it’s Going
WSO2Con USA 2015: WSO2 Cloud: What it is, How it Works, and Where it’s GoingWSO2Con USA 2015: WSO2 Cloud: What it is, How it Works, and Where it’s Going
WSO2Con USA 2015: WSO2 Cloud: What it is, How it Works, and Where it’s Going
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.js
 
Developing Mobile Solutions with Azure and Windows Phone VSLive! Redmond 2013
Developing Mobile Solutions with Azure and Windows Phone VSLive! Redmond 2013Developing Mobile Solutions with Azure and Windows Phone VSLive! Redmond 2013
Developing Mobile Solutions with Azure and Windows Phone VSLive! Redmond 2013
 
PHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixPHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on Bluemix
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developers
 
CI/CD for Containers: A Way Forward for Your DevOps Pipeline
CI/CD for Containers: A Way Forward for Your DevOps PipelineCI/CD for Containers: A Way Forward for Your DevOps Pipeline
CI/CD for Containers: A Way Forward for Your DevOps Pipeline
 
Zero to Portlet in 20 minutes or less
Zero to Portlet in 20 minutes or lessZero to Portlet in 20 minutes or less
Zero to Portlet in 20 minutes or less
 
Automated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStackAutomated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStack
 
Cloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment WorkshopCloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment Workshop
 
DBD 2414 - Iterative Web-Based Designer for Software Defined Environments (In...
DBD 2414 - Iterative Web-Based Designer for Software Defined Environments (In...DBD 2414 - Iterative Web-Based Designer for Software Defined Environments (In...
DBD 2414 - Iterative Web-Based Designer for Software Defined Environments (In...
 
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
 
Cloud Foundry at VMware
Cloud Foundry at VMwareCloud Foundry at VMware
Cloud Foundry at VMware
 
WSO2Con USA 2015: WSO2 Cloud - What it is, How it Works, and Where it’s Going
WSO2Con USA 2015: WSO2 Cloud - What it is, How it Works, and Where it’s GoingWSO2Con USA 2015: WSO2 Cloud - What it is, How it Works, and Where it’s Going
WSO2Con USA 2015: WSO2 Cloud - What it is, How it Works, and Where it’s Going
 
Rapid Application Development in the Cloud and On-Premises with Docker
Rapid Application Development in the Cloud and On-Premises with DockerRapid Application Development in the Cloud and On-Premises with Docker
Rapid Application Development in the Cloud and On-Premises with Docker
 
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCode
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCodeContinuous Application Delivery to WebSphere - Featuring IBM UrbanCode
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCode
 
A Smooth Transition to HTML5
A Smooth Transition to HTML5A Smooth Transition to HTML5
A Smooth Transition to HTML5
 

More from Kevin Whinnery

Write Better JavaScript
Write Better JavaScriptWrite Better JavaScript
Write Better JavaScript
Kevin Whinnery
 
Write Better JavaScript
Write Better JavaScriptWrite Better JavaScript
Write Better JavaScript
Kevin Whinnery
 
Lessons Learned From Applications That Kicked Titanium's Ass
Lessons Learned From Applications That Kicked Titanium's AssLessons Learned From Applications That Kicked Titanium's Ass
Lessons Learned From Applications That Kicked Titanium's Ass
Kevin Whinnery
 

More from Kevin Whinnery (13)

Second Screen Apps with the Google Cast SDK
Second Screen Apps with the Google Cast SDKSecond Screen Apps with the Google Cast SDK
Second Screen Apps with the Google Cast SDK
 
Let's Write Better Node Modules
Let's Write Better Node ModulesLet's Write Better Node Modules
Let's Write Better Node Modules
 
JavaScript as a First-Class Citizen on iOS 7
JavaScript as a First-Class Citizen on iOS 7JavaScript as a First-Class Citizen on iOS 7
JavaScript as a First-Class Citizen on iOS 7
 
Taking UX to the Real World
Taking UX to the Real WorldTaking UX to the Real World
Taking UX to the Real World
 
Write Better JavaScript
Write Better JavaScriptWrite Better JavaScript
Write Better JavaScript
 
Write Better JavaScript
Write Better JavaScriptWrite Better JavaScript
Write Better JavaScript
 
Lessons Learned From Applications That Kicked Titanium's Ass
Lessons Learned From Applications That Kicked Titanium's AssLessons Learned From Applications That Kicked Titanium's Ass
Lessons Learned From Applications That Kicked Titanium's Ass
 
Titanium Overview (Mobile March 2011)
Titanium Overview (Mobile March 2011)Titanium Overview (Mobile March 2011)
Titanium Overview (Mobile March 2011)
 
What's New in Titanium 1.5
What's New in Titanium 1.5What's New in Titanium 1.5
What's New in Titanium 1.5
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
 
Titanium @ Minnebar
Titanium @ MinnebarTitanium @ Minnebar
Titanium @ Minnebar
 
Whats New in Titanium 0.7
Whats New in Titanium 0.7Whats New in Titanium 0.7
Whats New in Titanium 0.7
 
Getting Started with Titanium
Getting Started with TitaniumGetting Started with Titanium
Getting Started with Titanium
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Designing Modules for the Browser and Node with Browserify