SlideShare uma empresa Scribd logo
1 de 59
Baixar para ler offline
Using
!
to build Front-end
JavaScript Apps that Scale
!
!
Fluent 2014
Phil @leggetter
phil@leggetter.co.uk
Caplin Systems
!
!
!
@BladeRunnerJS
• Toolkit written in Java: Modular + Extensible
• Our version of:
• Yeoman + Grunt + Broccoli + Browserify + App
Architecture + Micro-libraries
• New concepts: Blades + Workbenches
• Not a replacement for Angular, Ember, Web
Components…
Overview
• What is a Large Scale front-end App?
• What are the signs of scaling?
• What are the solutions? (with demos)
What is a large-scale
JavaScript app?
–Addy Osmani, Patterns For Large-Scale JavaScript Application
Architecture
In my view, large-scale JavaScript apps are
non-trivial applications requiring significant
developer effort to maintain, where most heavy
lifting of data manipulation and display falls to
the browser.
Large Codebase
More functionality === More code
Caplin Trader
• SDK:
• ~1,000 JavaScript files
• ~131,000 LoC
• ~131 lines per file
• ~650 test files
• ~95,000 test LoC
• Typical Apps:
• ~425 JavaScript files
• ~50,000 LoC
• ~117 lines per file
• ~200 test files
• ~21,000 test LoC
Complexity
Gmail & Caplin Trader
• Large Single Page Apps (SPAs)
• Complex functionality
• Complex interactions
• User
• Technology
• Leave open all day
Contributors
The Human Factor
Who contributes to an app?
• Front-end devs
• Back-end devs
• Designers
• QA
• Infrastructure and release engineers
• Technical authors
So, how do you ensure an
application is maintainable?
1. structure a massive codebase (js, css, html, i18n,
images, config etc.)
2. an architecture for complex functionality and
interaction (UI and other components)
3. make sure that all contributors can work in harmony
4. development must be a productive experience
5. ensure all these compliment each other
Signs of scaling
Dev Setup takes forever
My App isn’t working!
• Other contributors breaking functionality
• Code accessed and modified from elsewhere
• Dependency Analysis and out of order file concatenation
Finding assets
is hard
What does this code do?
• Inconsistent coding style
• Inconsistent code structure
• Side effects through unexpected
overrides
Long App Reloads
Have the tests finished yet?
• Having to run all the tests
• UI-based tests: Slow & unreliable
• Continuous Integration…taking 8 hours!
Stopwatch designed by Irit Barzily from the thenounproject.com
Scaling Solution
• Streamlined developer workflow
• Consistency
• Focus on building a single feature (in isolation)
• Scalable loosely-coupled application architecture
• Quality at its core (maintainability)
BRJS Goals
Developer Workflow
Focus on Features
Building a single
feature in isolation
Blades
Workbenches
Blade Demo
• Streamlined developer workflow
• Consistency
• Focus on building a single feature (in isolation)
• Scalable loosely-coupled application architecture
• Quality at its core (maintainability)
Goals
Application
Architecture
Requires an Architecture
that…
• Allows complex interactions
• Support developing a feature in isolation
• Allows components to be changed without side effects
• Is to maintain: Fix / Update / Extend
Blades (again)
MVVM
Services
What is a service?
• Use services to access shared resources
• Persistence Service
• RESTful Service
• Realtime Service
• Services registered and accessed via a ServiceRegistry
• Dynamic Service Locator1
1 http://martinfowler.com/articles/injection.html#ADynamicServiceLocator
Why use services?
• Blades should not directly communicate
• Functionality encapsulated behind an interface
• Loose-coupled communication
• Dependencies can be injected for different scenarios:
• Workbench / Test / App
Services Demo
• Streamlined developer workflow
• Consistency
• Focus on building a single feature (in isolation)
• Scalable loosely-coupled application architecture
• Quality at its core (maintainability)
Goals
Quality
Winning!
• Streamlined dev workflow: focus on features
• e.g. Blades & Workbenches
• Consistency: Asset structure, Coding style & structure, Architecture
• Loose coupling: MVVM, Services & Interfaces
• Facilitates testing
• Can easily swap out implementations
• MVVM: Avoid testing the DOM
Test Demo
!
./brjs test <path_to_run_tests>
Biggest Win
• Testing features in
isolation
• Change view model
and assert against
mocked Service
• Inject mock service,
make calls and assert
View Model
Need Proof?
Our full suite Caplin Trader
testing time went from
>8 Hours
< 30 minutes
Much less for a single
feature
• Streamlined developer workflow
• Consistency
• Focus on building a single feature (in isolation)
• Scalable loosely-coupled application architecture
• Quality at its core (maintainability)
Goals
Summary
• BladeRunnerJS toolkit: Streamline developer
workflow + focus on features
• Blades: Build features in isolation (grouping assets
together)
• Services: loose coupled communication e.g. EventHub
• Quality: Test units (classes), features (ViewModel < - >
Service) & keep DOM testing to a minimum.
BRJS at Fluent
• BladeRunnerJS is a new open source solution
• bladerunnerjs.org
• v0.4 released last week
• @leggetter & @patrickmyles are at Fluent today &
tomorrow
• BoF session tomorrow - table #7
Phil @leggetter
phil@leggetter.co.uk
Caplin Systems
!
!
!
@BladeRunnerJS
bladerunnerjs.org

Mais conteúdo relacionado

Mais procurados

Continuous integration
Continuous integrationContinuous integration
Continuous integrationAbhay Kumar
 
Dev/Test scenarios in DevOps world
Dev/Test scenarios in DevOps worldDev/Test scenarios in DevOps world
Dev/Test scenarios in DevOps worldDavide Benvegnù
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesQamar Abbas
 
How to Develop Highly Customizable Off-the-Shelf Software (Aleksey Stukalov)
How to Develop Highly Customizable Off-the-Shelf Software  (Aleksey Stukalov)How to Develop Highly Customizable Off-the-Shelf Software  (Aleksey Stukalov)
How to Develop Highly Customizable Off-the-Shelf Software (Aleksey Stukalov)Юрий Артамонов
 
Testing Salesforce at Cloud Scale
Testing Salesforce at Cloud ScaleTesting Salesforce at Cloud Scale
Testing Salesforce at Cloud Scalegwestr
 
Laws of test automation framework
Laws of test automation frameworkLaws of test automation framework
Laws of test automation frameworkvodqancr
 
Sps monaco vincent biret spfx devops
Sps monaco vincent biret spfx devopsSps monaco vincent biret spfx devops
Sps monaco vincent biret spfx devopsVincent Biret
 
Introduction to Enterprise-Release Engineering on the Salesforce Platform
Introduction to Enterprise-Release Engineering on the Salesforce PlatformIntroduction to Enterprise-Release Engineering on the Salesforce Platform
Introduction to Enterprise-Release Engineering on the Salesforce PlatformSalesforce Developers
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsSmartBear
 
API SDK Development – Lessons Learned
API SDK Development – Lessons LearnedAPI SDK Development – Lessons Learned
API SDK Development – Lessons LearnedPronovix
 
Introducing Visual Studio Online
Introducing Visual Studio OnlineIntroducing Visual Studio Online
Introducing Visual Studio OnlineEd Blankenship
 
Adobe resume
Adobe resumeAdobe resume
Adobe resumemk chow
 
Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SitePronovix
 
Whats new for developers in Visual Studio 2013
Whats new for developers in Visual Studio 2013Whats new for developers in Visual Studio 2013
Whats new for developers in Visual Studio 2013Chris Dufour
 
Advanced Mocking for Swagger APIs
Advanced Mocking for Swagger APIsAdvanced Mocking for Swagger APIs
Advanced Mocking for Swagger APIsSmartBear
 
Introducing DevOps
Introducing DevOpsIntroducing DevOps
Introducing DevOpsMoataz Nabil
 
The Dark arts of building your own framework (Andrey Glashenko)
The Dark arts of building your own framework (Andrey Glashenko)The Dark arts of building your own framework (Andrey Glashenko)
The Dark arts of building your own framework (Andrey Glashenko)Юрий Артамонов
 
What's new in Visual Studio 2013 & TFS 2013
What's new in Visual Studio 2013 & TFS 2013What's new in Visual Studio 2013 & TFS 2013
What's new in Visual Studio 2013 & TFS 2013Danijel Malik
 

Mais procurados (20)

Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Dev/Test scenarios in DevOps world
Dev/Test scenarios in DevOps worldDev/Test scenarios in DevOps world
Dev/Test scenarios in DevOps world
 
AndGen+
AndGen+AndGen+
AndGen+
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
How to Develop Highly Customizable Off-the-Shelf Software (Aleksey Stukalov)
How to Develop Highly Customizable Off-the-Shelf Software  (Aleksey Stukalov)How to Develop Highly Customizable Off-the-Shelf Software  (Aleksey Stukalov)
How to Develop Highly Customizable Off-the-Shelf Software (Aleksey Stukalov)
 
Testing Salesforce at Cloud Scale
Testing Salesforce at Cloud ScaleTesting Salesforce at Cloud Scale
Testing Salesforce at Cloud Scale
 
Laws of test automation framework
Laws of test automation frameworkLaws of test automation framework
Laws of test automation framework
 
Sps monaco vincent biret spfx devops
Sps monaco vincent biret spfx devopsSps monaco vincent biret spfx devops
Sps monaco vincent biret spfx devops
 
Introduction to Enterprise-Release Engineering on the Salesforce Platform
Introduction to Enterprise-Release Engineering on the Salesforce PlatformIntroduction to Enterprise-Release Engineering on the Salesforce Platform
Introduction to Enterprise-Release Engineering on the Salesforce Platform
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script Extensions
 
API SDK Development – Lessons Learned
API SDK Development – Lessons LearnedAPI SDK Development – Lessons Learned
API SDK Development – Lessons Learned
 
Introducing Visual Studio Online
Introducing Visual Studio OnlineIntroducing Visual Studio Online
Introducing Visual Studio Online
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Adobe resume
Adobe resumeAdobe resume
Adobe resume
 
Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc Site
 
Whats new for developers in Visual Studio 2013
Whats new for developers in Visual Studio 2013Whats new for developers in Visual Studio 2013
Whats new for developers in Visual Studio 2013
 
Advanced Mocking for Swagger APIs
Advanced Mocking for Swagger APIsAdvanced Mocking for Swagger APIs
Advanced Mocking for Swagger APIs
 
Introducing DevOps
Introducing DevOpsIntroducing DevOps
Introducing DevOps
 
The Dark arts of building your own framework (Andrey Glashenko)
The Dark arts of building your own framework (Andrey Glashenko)The Dark arts of building your own framework (Andrey Glashenko)
The Dark arts of building your own framework (Andrey Glashenko)
 
What's new in Visual Studio 2013 & TFS 2013
What's new in Visual Studio 2013 & TFS 2013What's new in Visual Studio 2013 & TFS 2013
What's new in Visual Studio 2013 & TFS 2013
 

Destaque

Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Phil Leggetter
 
Slideaula irenildes
Slideaula irenildesSlideaula irenildes
Slideaula irenildesirenildes2
 
Fed London - January 2015
Fed London - January 2015Fed London - January 2015
Fed London - January 2015Phil Leggetter
 
What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012Phil Leggetter
 
M hussain a day in the life
M hussain a day in the lifeM hussain a day in the life
M hussain a day in the lifemhussainp1
 
Testing Ginormous JavaScript Apps - ScotlandJS 2014
Testing Ginormous JavaScript Apps - ScotlandJS 2014Testing Ginormous JavaScript Apps - ScotlandJS 2014
Testing Ginormous JavaScript Apps - ScotlandJS 2014Phil Leggetter
 
The Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsThe Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsPhil Leggetter
 
Real-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & BeyondReal-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & BeyondPhil Leggetter
 

Destaque (9)

Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014
 
Slideaula irenildes
Slideaula irenildesSlideaula irenildes
Slideaula irenildes
 
Famous secret’s powerpoint
Famous secret’s powerpointFamous secret’s powerpoint
Famous secret’s powerpoint
 
Fed London - January 2015
Fed London - January 2015Fed London - January 2015
Fed London - January 2015
 
What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012
 
M hussain a day in the life
M hussain a day in the lifeM hussain a day in the life
M hussain a day in the life
 
Testing Ginormous JavaScript Apps - ScotlandJS 2014
Testing Ginormous JavaScript Apps - ScotlandJS 2014Testing Ginormous JavaScript Apps - ScotlandJS 2014
Testing Ginormous JavaScript Apps - ScotlandJS 2014
 
The Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsThe Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and Communications
 
Real-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & BeyondReal-Time Web Apps in 2015 & Beyond
Real-Time Web Apps in 2015 & Beyond
 

Semelhante a Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014

Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPhil Leggetter
 
How to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJSHow to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJSPhil Leggetter
 
A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012Imaginet
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle ManagementAmazon Web Services
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Adam Mokan
 
Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012Delta-N
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
Acing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointAcing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointJeremy Thake
 
ALM with TFS: From the Drawing Board to the Cloud
ALM with TFS: From the Drawing Board to the CloudALM with TFS: From the Drawing Board to the Cloud
ALM with TFS: From the Drawing Board to the CloudJeremy Likness
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile DeveloperBSGAfrica
 
Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014Sean McCullough
 
Asp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech SoftwareAsp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech SoftwareRitwik Das
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project Elad Hirsch
 
Lean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentLean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentBill Ayers
 
How to build a JavaScript toolkit
How to build a JavaScript toolkitHow to build a JavaScript toolkit
How to build a JavaScript toolkitMichael Nelson
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software TestingMohammed Moishin
 
Dev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsDev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsMahesh Arali
 

Semelhante a Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014 (20)

Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
 
How to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJSHow to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJS
 
A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012
 
Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Acing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointAcing application lifecycle management in SharePoint
Acing application lifecycle management in SharePoint
 
ALM with TFS: From the Drawing Board to the Cloud
ALM with TFS: From the Drawing Board to the CloudALM with TFS: From the Drawing Board to the Cloud
ALM with TFS: From the Drawing Board to the Cloud
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile Developer
 
Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014
 
Asp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech SoftwareAsp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech Software
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
 
Lean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentLean-Agile SharePoint Development
Lean-Agile SharePoint Development
 
How to build a JavaScript toolkit
How to build a JavaScript toolkitHow to build a JavaScript toolkit
How to build a JavaScript toolkit
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
Dev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsDev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teams
 

Mais de Phil Leggetter

An Introduction to AAARRRP: A framework for Defining Your Developer Relations...
An Introduction to AAARRRP: A framework for Defining Your Developer Relations...An Introduction to AAARRRP: A framework for Defining Your Developer Relations...
An Introduction to AAARRRP: A framework for Defining Your Developer Relations...Phil Leggetter
 
How APIs Enable Contextual Communications
How APIs Enable Contextual CommunicationsHow APIs Enable Contextual Communications
How APIs Enable Contextual CommunicationsPhil Leggetter
 
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...Phil Leggetter
 
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...Phil Leggetter
 
Contextual Communications: What, Why and How? Bristol JS
Contextual Communications: What, Why and How? Bristol JSContextual Communications: What, Why and How? Bristol JS
Contextual Communications: What, Why and How? Bristol JSPhil Leggetter
 
Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016
Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016
Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016Phil Leggetter
 
Real-Time Web Apps & .NET - What are your options?
Real-Time Web Apps & .NET - What are your options?Real-Time Web Apps & .NET - What are your options?
Real-Time Web Apps & .NET - What are your options?Phil Leggetter
 
The Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsThe Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsPhil Leggetter
 
What's the ROI of Developer Relations?
What's the ROI of Developer Relations?What's the ROI of Developer Relations?
What's the ROI of Developer Relations?Phil Leggetter
 
Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Phil Leggetter
 
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015Phil Leggetter
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Phil Leggetter
 
How to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScaleHow to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScalePhil Leggetter
 
Realtime Web Apps in 2014 & Beyond
Realtime Web Apps in 2014 & BeyondRealtime Web Apps in 2014 & Beyond
Realtime Web Apps in 2014 & BeyondPhil Leggetter
 
BladeRunnerJS Show & Tell
BladeRunnerJS Show & TellBladeRunnerJS Show & Tell
BladeRunnerJS Show & TellPhil Leggetter
 
How the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsHow the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsPhil Leggetter
 
Web browsers & the realtime web
Web browsers & the realtime webWeb browsers & the realtime web
Web browsers & the realtime webPhil Leggetter
 

Mais de Phil Leggetter (17)

An Introduction to AAARRRP: A framework for Defining Your Developer Relations...
An Introduction to AAARRRP: A framework for Defining Your Developer Relations...An Introduction to AAARRRP: A framework for Defining Your Developer Relations...
An Introduction to AAARRRP: A framework for Defining Your Developer Relations...
 
How APIs Enable Contextual Communications
How APIs Enable Contextual CommunicationsHow APIs Enable Contextual Communications
How APIs Enable Contextual Communications
 
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
 
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
An Introduction to the AAARRRP Developer Relations Strategy Framework and How...
 
Contextual Communications: What, Why and How? Bristol JS
Contextual Communications: What, Why and How? Bristol JSContextual Communications: What, Why and How? Bristol JS
Contextual Communications: What, Why and How? Bristol JS
 
Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016
Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016
Real-Time Web Apps & .NET. What Are Your Options? NDC Oslo 2016
 
Real-Time Web Apps & .NET - What are your options?
Real-Time Web Apps & .NET - What are your options?Real-Time Web Apps & .NET - What are your options?
Real-Time Web Apps & .NET - What are your options?
 
The Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and CommunicationsThe Past, Present and Future of Real-Time Apps and Communications
The Past, Present and Future of Real-Time Apps and Communications
 
What's the ROI of Developer Relations?
What's the ROI of Developer Relations?What's the ROI of Developer Relations?
What's the ROI of Developer Relations?
 
Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?Real-Time Web Apps & Symfony. What are your options?
Real-Time Web Apps & Symfony. What are your options?
 
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015
 
How to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScaleHow to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that Scale
 
Realtime Web Apps in 2014 & Beyond
Realtime Web Apps in 2014 & BeyondRealtime Web Apps in 2014 & Beyond
Realtime Web Apps in 2014 & Beyond
 
BladeRunnerJS Show & Tell
BladeRunnerJS Show & TellBladeRunnerJS Show & Tell
BladeRunnerJS Show & Tell
 
How the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsHow the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communications
 
Web browsers & the realtime web
Web browsers & the realtime webWeb browsers & the realtime web
Web browsers & the realtime web
 

Último

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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 DevelopmentsTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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 AutomationSafe Software
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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 textsMaria Levchenko
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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 BusinessPixlogix Infotech
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014

  • 1. Using ! to build Front-end JavaScript Apps that Scale ! ! Fluent 2014
  • 3.
  • 4. • Toolkit written in Java: Modular + Extensible • Our version of: • Yeoman + Grunt + Broccoli + Browserify + App Architecture + Micro-libraries • New concepts: Blades + Workbenches • Not a replacement for Angular, Ember, Web Components…
  • 5. Overview • What is a Large Scale front-end App? • What are the signs of scaling? • What are the solutions? (with demos)
  • 6. What is a large-scale JavaScript app?
  • 7. –Addy Osmani, Patterns For Large-Scale JavaScript Application Architecture In my view, large-scale JavaScript apps are non-trivial applications requiring significant developer effort to maintain, where most heavy lifting of data manipulation and display falls to the browser.
  • 9. Caplin Trader • SDK: • ~1,000 JavaScript files • ~131,000 LoC • ~131 lines per file • ~650 test files • ~95,000 test LoC • Typical Apps: • ~425 JavaScript files • ~50,000 LoC • ~117 lines per file • ~200 test files • ~21,000 test LoC
  • 11.
  • 12.
  • 13. Gmail & Caplin Trader • Large Single Page Apps (SPAs) • Complex functionality • Complex interactions • User • Technology • Leave open all day
  • 15. Who contributes to an app? • Front-end devs • Back-end devs • Designers • QA • Infrastructure and release engineers • Technical authors
  • 16. So, how do you ensure an application is maintainable? 1. structure a massive codebase (js, css, html, i18n, images, config etc.) 2. an architecture for complex functionality and interaction (UI and other components) 3. make sure that all contributors can work in harmony 4. development must be a productive experience 5. ensure all these compliment each other
  • 18. Dev Setup takes forever
  • 19. My App isn’t working! • Other contributors breaking functionality • Code accessed and modified from elsewhere • Dependency Analysis and out of order file concatenation
  • 21. What does this code do? • Inconsistent coding style • Inconsistent code structure • Side effects through unexpected overrides
  • 23. Have the tests finished yet? • Having to run all the tests • UI-based tests: Slow & unreliable • Continuous Integration…taking 8 hours! Stopwatch designed by Irit Barzily from the thenounproject.com
  • 25. • Streamlined developer workflow • Consistency • Focus on building a single feature (in isolation) • Scalable loosely-coupled application architecture • Quality at its core (maintainability) BRJS Goals
  • 27.
  • 30.
  • 31.
  • 33.
  • 34.
  • 36.
  • 37.
  • 38. • Streamlined developer workflow • Consistency • Focus on building a single feature (in isolation) • Scalable loosely-coupled application architecture • Quality at its core (maintainability) Goals
  • 40. Requires an Architecture that… • Allows complex interactions • Support developing a feature in isolation • Allows components to be changed without side effects • Is to maintain: Fix / Update / Extend
  • 42. MVVM
  • 44. What is a service? • Use services to access shared resources • Persistence Service • RESTful Service • Realtime Service • Services registered and accessed via a ServiceRegistry • Dynamic Service Locator1 1 http://martinfowler.com/articles/injection.html#ADynamicServiceLocator
  • 45. Why use services? • Blades should not directly communicate • Functionality encapsulated behind an interface • Loose-coupled communication • Dependencies can be injected for different scenarios: • Workbench / Test / App
  • 47.
  • 48. • Streamlined developer workflow • Consistency • Focus on building a single feature (in isolation) • Scalable loosely-coupled application architecture • Quality at its core (maintainability) Goals
  • 50. Winning! • Streamlined dev workflow: focus on features • e.g. Blades & Workbenches • Consistency: Asset structure, Coding style & structure, Architecture • Loose coupling: MVVM, Services & Interfaces • Facilitates testing • Can easily swap out implementations • MVVM: Avoid testing the DOM
  • 51. Test Demo ! ./brjs test <path_to_run_tests>
  • 52.
  • 53. Biggest Win • Testing features in isolation • Change view model and assert against mocked Service • Inject mock service, make calls and assert View Model
  • 54.
  • 55. Need Proof? Our full suite Caplin Trader testing time went from >8 Hours < 30 minutes Much less for a single feature
  • 56. • Streamlined developer workflow • Consistency • Focus on building a single feature (in isolation) • Scalable loosely-coupled application architecture • Quality at its core (maintainability) Goals
  • 57. Summary • BladeRunnerJS toolkit: Streamline developer workflow + focus on features • Blades: Build features in isolation (grouping assets together) • Services: loose coupled communication e.g. EventHub • Quality: Test units (classes), features (ViewModel < - > Service) & keep DOM testing to a minimum.
  • 58. BRJS at Fluent • BladeRunnerJS is a new open source solution • bladerunnerjs.org • v0.4 released last week • @leggetter & @patrickmyles are at Fluent today & tomorrow • BoF session tomorrow - table #7