SlideShare a Scribd company logo
Enterprise HTML5 Patterns
AKQA Anorak: June 2013
James Turner
Architect
james.turner@caplin.com
What am I talking about ?
What is “enterprise” ?
We have replaced, functionally large diverse,
desktop thick client trading systems with
with “single page” web applications.
How we did it ?
Architectural patterns and technologies used.
Good news for web-devs
http://addyosmani.com/resources/essentialjsdesignpatterns/book/
Move desktop trading to browsers (1)
Move desktop trading to browsers (2)
Business Drivers
▶  Increase trade volumes
–  Integrate pre-trade information
▶  Reduce cost of sale
▶  Direct channel to customer
–  Enhanced user experience
–  Branding
▶  Zero deployment: URL to customer
–  Reduced onboarding time + cost
–  Reduced maintenance
Reverse barrier convertibles
“10 minutes rather than up to 2 hours on phone with a sales trader”
Technology Drivers
▶  Mobile
–  Cross device support
▶  Improved browser ecosystem
–  Browser performance debugging much better
–  Fewer browser differences
–  Vibrant open source community
▶  HTML5
–  Local storage, web-sockets, CSS3 …
▶  Death of alternatives
–  Flash/Flex, Silverlight
Characterizing “enterprise”
HTML5 applications
More than
“A lot of code”
The application
▶  “A lot of code” 250k + LOC
▶  Single page “thick client” applications
–  Different assumptions
–  Runs all day, memory leaks
–  UX of lazy loading
▶  Consistency: theming/skinning/UX
▶  Internationalisation
▶  Streaming financial tradable prices
–  Screen update performance
–  Trade on “displayed price”
–  Graceful degradation
–  Throttling, scheduling
Multiple teams
▶  10-100’s of developers
▶  Multiple independent teams
–  Independent versioned deployment lifecycle
–  Share some code
–  Rest Isolated
▶  Banks are notoriously silo’d by asset class
Different cultures
▶  UX/Graphic designers
▶  Web Developers (jQuery anyone)
▶  Product Owners, Product Managers,
Business Analysts
▶  Server-side developers
–  Decouple dependencies
▶  QA’s (programming QA’s)
▶  Operations
–  Deploy artifacts
–  Same artifacts for TEST/UAT/PROD
–  Directory services
Coolness
12
Armageddon
“Monday morning: Ooops my weekend
check-in just changed the background
colour of the entire application”
How we did it:
1.  Components
2.  Code organization
3.  App structure + patterns
4.  Testing
Components
Split by feature, not technology
16
CSS
HTML
JS
config
i18n
images
tests
CSS
HTML
JS
config
tests
images
i18n
CSS
HTML
JS
config
tests
images
i18n
CSS
HTML
JS
config
tests
images
i18n
CSS
HTML
JS
config
tests
images
i18n
▶  Independent business feature
▶  No direct dependencies to other components
▶  Minimal public interface
–  Event bus (publish/subscribe)
–  Component API
▶  Code sharing mechanism
–  Libraries
–  Modules
▶  Conforms to conventions/name-spacing
▶  Can be pre-built
What is a component
Contents
Deploy
Deploy
Workbench
Instant reload imperative for developer productivity
Conways’Law
“Organizations which design systems ...
are constrained to produce designs which
are copies of the communication structures
of these organizations"
Code Structure
APPLICATION
MODULE A
COMPONENT 1
COMPONENT 2
MODULE B
COMPONENT 3
COMPONENT 4
ASPECTS
MOBILE
DESKTOP
LIBRARIES
INC THIRD-PARTY
Inheritance + Name-spacing
▶  CSS
–  App defines common “theme”
–  Components inherit theme
–  Override with more specific CSS rules
•  Need name-spacing
–  Use CSS pre-processor (e.g. LESS,SASS)
–  Define an ontology
▶  XML/HTML
–  Name-spacing for unique ID’s
JavaScript Coding
▶  Fine grained OO
–  We average about 100 LOC per class
▶  One class per file
▶  Design patterns
▶  SOLID (Uncle Bob)
▶  Coding standards
–  Inheritance
–  JsHint
▶  Common code in libraries
▶  Interpreted: so testing is more important
▶  JsLint /coverage
Bundling
dev-server
bundling
(enforcement)
APPLICATIO
N
BLADESET A
BLADE 1
BLADE 2
BLADESET B
BLADE 1
BLADE 2
ASPECTS
MOBILE
DESKTOP
ProjectsEclipse
IntelliJ
Sublime
NetBeans
Vi/Emacs
……..
IDE of choice
running app
J2EE
ServerWAR
deploy
ZIP CDN
Directory
services
App Structure
CLIENT SERVER
TraderApp
Layout
Managercomponent
component
component
component
service
service
service
service
event
bus
HTML Bundle
CSS Bundle
I18n Bundle
XML Bundle
JavaScript Bundle
Application
Server
JavaScript Interfaces
▶  Defines the contract a component should
conform to.
–  A set of method signatures
▶  Multiple classes “implement” the same interface
▶  Provides a hook for documentation
▶  Hook for IDE tooling
Service Registry
var service = new caplin.XhrXmlResourceServiceProvider(this.sXmlBundleUrl);
caplin.ServiceRegistry.register("caplin.XmlResourceService”, service);
var xmlResourceService = caplin.ServiceRegistry.getService("caplin.XmlResourceService");
var tradeModelNode = xmlResourceService.getXmlDocument("tradeModels");
Registration:
Usage:
Event Hub
▶  Publish/Subscribe inside the browser
–  Many to many (or none)
▶  Defined by an interface (contract)
▶  Methods cannot return anything
▶  Classic example: logging
▶  Nice Article:
http://blog.caplin.com/2012/12/07/event-hub-pubsub-in-the-browser/
Component Interface
▶  Used by layout managers to manage GUI
components
▶  Defines GUI lifecycle events
–  getElement(),
–  onOpen(),
–  onResize(),
–  onSerialize() etc.
MVVM Pattern
ViewRendering to screen
Domain
Model
business semantic method callslistens
Reused across many
screens
View
Model
gestureslistens
Logical representation
of the view
(an adaptor)
<button class=‘..’
data-bind=‘click:buttonClicked’>
Execute Trade
</button>
HTML template with bindings
$(button).click(function(){
vm.buttonClicked()
});
jQuery Control
Our HTML5 MVVM
Domain
Model
executeTrade()complete()
Message
Service
send()receive()
View
Model
buttonClicked()tradeButtonEnabled
No DOM Access
XmlHttpRequest
binding framework
e.g. KnockoutJs
The Testing Triangle
Functional
GUI testing
ITs
Unit Tests
manual
Acceptance
Tests
Performance
Tests
Integration Tests
- Selenium -
(automated
manual tests)
Unit Tests
manual
Performance
Tests
Test by contract
Browser
GUI
logicaluseractions
servicecalls
Given “form is opened”
When “user executes trade”
Then “trade message sent to server”
Server
Code
RESTfulAPI
Given “server is started”
When “trade message received”
Then “money is sent somewhere”
Test by contract
MVVM and services
View
Model
Domain
Model
complete()
View
execute()
Given …
When …
Then …
Fixtures
executeTrade()
tradeButtonEnabled
Message
Service
Stub
send()
receive()
Test Infrastructure
js-test-driver
Server
Bundlers
JavaScript
Dependencies
jsTestDriver.conf
plugin:
- name: "BundleInjector"
jar: …/js-jstd-plugin.jar
module: com.caplin.jstd.BundlerPlugin
load:
- bundles/i18n/en_i18n.bundle
- bundles/js/js.bundle
test:
- tests/**.js
serve:
- bundles/html.bundle
- bundles/xml.bundle
Plugin
JavaScript
Test Files
HTML/XML
Dependencies
In summary:
divide + conquer
Natural fine grained OO coding
Components
Common code in libraries
Split GUI Code into
Dom interactions
View Model
Domain Model
Services for stubbing
GWT + Test by contract
We will soon be open-sourcing
our implementation of this
architecture
www.bladerunnerjs.org

More Related Content

What's hot

Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk ServerUsing ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
BizTalk360
 
Delivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDBDelivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDB
John Bennett
 
Change data capture with MongoDB and Kafka.
Change data capture with MongoDB and Kafka.Change data capture with MongoDB and Kafka.
Change data capture with MongoDB and Kafka.
Dan Harvey
 
How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...
How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...
How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...
HostedbyConfluent
 
Real-time Data Streaming from Oracle to Apache Kafka
Real-time Data Streaming from Oracle to Apache Kafka Real-time Data Streaming from Oracle to Apache Kafka
Real-time Data Streaming from Oracle to Apache Kafka
confluent
 
Low-latency data applications with Kafka and Agg indexes | Tino Tereshko, Fir...
Low-latency data applications with Kafka and Agg indexes | Tino Tereshko, Fir...Low-latency data applications with Kafka and Agg indexes | Tino Tereshko, Fir...
Low-latency data applications with Kafka and Agg indexes | Tino Tereshko, Fir...
HostedbyConfluent
 
Event sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event StoreEvent sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event Store
Shivji Kumar Jha
 
In-memory No SQL- GIDS2014
In-memory No SQL- GIDS2014In-memory No SQL- GIDS2014
In-memory No SQL- GIDS2014
Hazelcast
 
#GeodeSummit - Redis to Geode Adaptor
#GeodeSummit - Redis to Geode Adaptor#GeodeSummit - Redis to Geode Adaptor
#GeodeSummit - Redis to Geode Adaptor
PivotalOpenSourceHub
 
Bootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source ToolsBootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source Tools
botsplash.com
 
12 Factor App: Best Practices for JVM Deployment
12 Factor App: Best Practices for JVM Deployment12 Factor App: Best Practices for JVM Deployment
12 Factor App: Best Practices for JVM Deployment
Joe Kutner
 
Spark Compute as a Service at Paypal with Prabhu Kasinathan
Spark Compute as a Service at Paypal with Prabhu KasinathanSpark Compute as a Service at Paypal with Prabhu Kasinathan
Spark Compute as a Service at Paypal with Prabhu Kasinathan
Databricks
 
Bitsy graph database
Bitsy graph databaseBitsy graph database
Bitsy graph database
LambdaZen LLC
 
Hybrid Apache Spark Architecture with YARN and Kubernetes
Hybrid Apache Spark Architecture with YARN and KubernetesHybrid Apache Spark Architecture with YARN and Kubernetes
Hybrid Apache Spark Architecture with YARN and Kubernetes
Databricks
 
Introducing Kubernetes
Introducing Kubernetes Introducing Kubernetes
Introducing Kubernetes
VikRam S
 
Apache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platformApache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platform
confluent
 
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
Redis Labs
 
Akka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast DataAkka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast Data
Lightbend
 
Whirlpools in the Stream with Jayesh Lalwani
 Whirlpools in the Stream with Jayesh Lalwani Whirlpools in the Stream with Jayesh Lalwani
Whirlpools in the Stream with Jayesh Lalwani
Databricks
 
Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...
Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...
Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 

What's hot (20)

Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk ServerUsing ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
 
Delivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDBDelivering big content at NBC News with RavenDB
Delivering big content at NBC News with RavenDB
 
Change data capture with MongoDB and Kafka.
Change data capture with MongoDB and Kafka.Change data capture with MongoDB and Kafka.
Change data capture with MongoDB and Kafka.
 
How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...
How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...
How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...
 
Real-time Data Streaming from Oracle to Apache Kafka
Real-time Data Streaming from Oracle to Apache Kafka Real-time Data Streaming from Oracle to Apache Kafka
Real-time Data Streaming from Oracle to Apache Kafka
 
Low-latency data applications with Kafka and Agg indexes | Tino Tereshko, Fir...
Low-latency data applications with Kafka and Agg indexes | Tino Tereshko, Fir...Low-latency data applications with Kafka and Agg indexes | Tino Tereshko, Fir...
Low-latency data applications with Kafka and Agg indexes | Tino Tereshko, Fir...
 
Event sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event StoreEvent sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event Store
 
In-memory No SQL- GIDS2014
In-memory No SQL- GIDS2014In-memory No SQL- GIDS2014
In-memory No SQL- GIDS2014
 
#GeodeSummit - Redis to Geode Adaptor
#GeodeSummit - Redis to Geode Adaptor#GeodeSummit - Redis to Geode Adaptor
#GeodeSummit - Redis to Geode Adaptor
 
Bootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source ToolsBootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source Tools
 
12 Factor App: Best Practices for JVM Deployment
12 Factor App: Best Practices for JVM Deployment12 Factor App: Best Practices for JVM Deployment
12 Factor App: Best Practices for JVM Deployment
 
Spark Compute as a Service at Paypal with Prabhu Kasinathan
Spark Compute as a Service at Paypal with Prabhu KasinathanSpark Compute as a Service at Paypal with Prabhu Kasinathan
Spark Compute as a Service at Paypal with Prabhu Kasinathan
 
Bitsy graph database
Bitsy graph databaseBitsy graph database
Bitsy graph database
 
Hybrid Apache Spark Architecture with YARN and Kubernetes
Hybrid Apache Spark Architecture with YARN and KubernetesHybrid Apache Spark Architecture with YARN and Kubernetes
Hybrid Apache Spark Architecture with YARN and Kubernetes
 
Introducing Kubernetes
Introducing Kubernetes Introducing Kubernetes
Introducing Kubernetes
 
Apache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platformApache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platform
 
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
 
Akka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast DataAkka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast Data
 
Whirlpools in the Stream with Jayesh Lalwani
 Whirlpools in the Stream with Jayesh Lalwani Whirlpools in the Stream with Jayesh Lalwani
Whirlpools in the Stream with Jayesh Lalwani
 
Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...
Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...
Javantura v3 - Real-time BigData ingestion and querying of aggregated data – ...
 

Viewers also liked

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
Phil Leggetter
 
Praise explosion/ marathon de louange
Praise explosion/ marathon de louangePraise explosion/ marathon de louange
Praise explosion/ marathon de louange
BEATRICE LASSAIGNE
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
Sergio Ronchi
 
Metodo d inferencia estadistica
Metodo d inferencia estadisticaMetodo d inferencia estadistica
Metodo d inferencia estadistica
Carlos fernando Mena Bonilla
 
Comercio internacional
Comercio internacionalComercio internacional
Comercio internacional
marcela_tinjaca
 
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
Olivier Lance
 
Chronic pain: Role of tricyclic antidepressants, dolsulepin
Chronic pain: Role of tricyclic antidepressants, dolsulepinChronic pain: Role of tricyclic antidepressants, dolsulepin
Chronic pain: Role of tricyclic antidepressants, dolsulepin
Sudhir Kumar
 
Assembly level language
Assembly level languageAssembly level language
Assembly level language
PDFSHARE
 
Cecilia jaya larraga investigacion
Cecilia jaya larraga investigacionCecilia jaya larraga investigacion
Cecilia jaya larraga investigacion
Cecilia Jaya Larraga
 
Las teorías del liderazgo
Las teorías del liderazgoLas teorías del liderazgo
Las teorías del liderazgo
Joanny Ibarbia Pardo
 
Matemática proyecto de aula
Matemática proyecto de aulaMatemática proyecto de aula
Matemática proyecto de aula
Samuel López
 
Burning tongue webinar with Dr.Susan Sklar
Burning tongue webinar with Dr.Susan SklarBurning tongue webinar with Dr.Susan Sklar
Burning tongue webinar with Dr.Susan Sklar
Warren Blesofsky
 
WINK Calgary presents "Learn to love your money - basics of investing"
WINK Calgary presents "Learn to love your money - basics of investing"WINK Calgary presents "Learn to love your money - basics of investing"
WINK Calgary presents "Learn to love your money - basics of investing"
Patty Auger, CA, CFP
 

Viewers also liked (13)

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
 
Praise explosion/ marathon de louange
Praise explosion/ marathon de louangePraise explosion/ marathon de louange
Praise explosion/ marathon de louange
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Metodo d inferencia estadistica
Metodo d inferencia estadisticaMetodo d inferencia estadistica
Metodo d inferencia estadistica
 
Comercio internacional
Comercio internacionalComercio internacional
Comercio internacional
 
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
Algolia's Fury Road to a Worldwide API - Take Off Conference 2016
 
Chronic pain: Role of tricyclic antidepressants, dolsulepin
Chronic pain: Role of tricyclic antidepressants, dolsulepinChronic pain: Role of tricyclic antidepressants, dolsulepin
Chronic pain: Role of tricyclic antidepressants, dolsulepin
 
Assembly level language
Assembly level languageAssembly level language
Assembly level language
 
Cecilia jaya larraga investigacion
Cecilia jaya larraga investigacionCecilia jaya larraga investigacion
Cecilia jaya larraga investigacion
 
Las teorías del liderazgo
Las teorías del liderazgoLas teorías del liderazgo
Las teorías del liderazgo
 
Matemática proyecto de aula
Matemática proyecto de aulaMatemática proyecto de aula
Matemática proyecto de aula
 
Burning tongue webinar with Dr.Susan Sklar
Burning tongue webinar with Dr.Susan SklarBurning tongue webinar with Dr.Susan Sklar
Burning tongue webinar with Dr.Susan Sklar
 
WINK Calgary presents "Learn to love your money - basics of investing"
WINK Calgary presents "Learn to love your money - basics of investing"WINK Calgary presents "Learn to love your money - basics of investing"
WINK Calgary presents "Learn to love your money - basics of investing"
 

Similar to James Turner (Caplin) - Enterprise HTML5 Patterns

An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web Components
Red Pill Now
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .Net
Richard Banks
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
Chris Richardson
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
JAXLondon2014
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
Chris Richardson
 
Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)
Chris Richardson
 
Power
PowerPower
7+ Years.Net Resume
7+ Years.Net Resume7+ Years.Net Resume
7+ Years.Net Resume
Rajkumar Chinnamsetti
 
Azure Overview Csco
Azure Overview CscoAzure Overview Csco
Azure Overview Csco
rajramab
 
ASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile EnterpriseASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile Enterprise
Dennis Moon
 
cross-platform-assets-based-front-end-architecture
cross-platform-assets-based-front-end-architecturecross-platform-assets-based-front-end-architecture
cross-platform-assets-based-front-end-architecture
Oleksandr Tserkovnyi
 
xRM - as an Evolution of CRM
xRM - as an Evolution of CRMxRM - as an Evolution of CRM
xRM - as an Evolution of CRM
Catherine Eibner
 
WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012
Dmitri Artamonov
 
Keynote - The Benefits of an Open Service Oriented Architecture in the Enterpr...
Keynote - The Benefits of an Open Service Oriented Architecture in the Enterpr...Keynote - The Benefits of an Open Service Oriented Architecture in the Enterpr...
Keynote - The Benefits of an Open Service Oriented Architecture in the Enterpr...
mfrancis
 
Windows Azure Platform + PHP - Jonathan Wong
Windows Azure Platform + PHP - Jonathan WongWindows Azure Platform + PHP - Jonathan Wong
Windows Azure Platform + PHP - Jonathan Wong
Spiffy
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
Mario Romano
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017
Melania Andrisan (Danciu)
 
Windowsazureplatform Overviewlatest
Windowsazureplatform OverviewlatestWindowsazureplatform Overviewlatest
Windowsazureplatform Overviewlatest
rajramab
 
Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture
Andrew Blades
 

Similar to James Turner (Caplin) - Enterprise HTML5 Patterns (20)

An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web Components
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .Net
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
 
Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)
 
Power
PowerPower
Power
 
7+ Years.Net Resume
7+ Years.Net Resume7+ Years.Net Resume
7+ Years.Net Resume
 
Azure Overview Csco
Azure Overview CscoAzure Overview Csco
Azure Overview Csco
 
ASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile EnterpriseASP.NET Core For The Agile Enterprise
ASP.NET Core For The Agile Enterprise
 
cross-platform-assets-based-front-end-architecture
cross-platform-assets-based-front-end-architecturecross-platform-assets-based-front-end-architecture
cross-platform-assets-based-front-end-architecture
 
xRM - as an Evolution of CRM
xRM - as an Evolution of CRMxRM - as an Evolution of CRM
xRM - as an Evolution of CRM
 
WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012WinJS at NYC Code Camp 2012
WinJS at NYC Code Camp 2012
 
Keynote - The Benefits of an Open Service Oriented Architecture in the Enterpr...
Keynote - The Benefits of an Open Service Oriented Architecture in the Enterpr...Keynote - The Benefits of an Open Service Oriented Architecture in the Enterpr...
Keynote - The Benefits of an Open Service Oriented Architecture in the Enterpr...
 
Windows Azure Platform + PHP - Jonathan Wong
Windows Azure Platform + PHP - Jonathan WongWindows Azure Platform + PHP - Jonathan Wong
Windows Azure Platform + PHP - Jonathan Wong
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
 
Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017
 
Windowsazureplatform Overviewlatest
Windowsazureplatform OverviewlatestWindowsazureplatform Overviewlatest
Windowsazureplatform Overviewlatest
 
Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture
 

Recently uploaded

Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 

Recently uploaded (20)

Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 

James Turner (Caplin) - Enterprise HTML5 Patterns

  • 1. Enterprise HTML5 Patterns AKQA Anorak: June 2013 James Turner Architect james.turner@caplin.com
  • 2. What am I talking about ? What is “enterprise” ? We have replaced, functionally large diverse, desktop thick client trading systems with with “single page” web applications. How we did it ? Architectural patterns and technologies used. Good news for web-devs http://addyosmani.com/resources/essentialjsdesignpatterns/book/
  • 3. Move desktop trading to browsers (1)
  • 4. Move desktop trading to browsers (2)
  • 5. Business Drivers ▶  Increase trade volumes –  Integrate pre-trade information ▶  Reduce cost of sale ▶  Direct channel to customer –  Enhanced user experience –  Branding ▶  Zero deployment: URL to customer –  Reduced onboarding time + cost –  Reduced maintenance
  • 6. Reverse barrier convertibles “10 minutes rather than up to 2 hours on phone with a sales trader”
  • 7. Technology Drivers ▶  Mobile –  Cross device support ▶  Improved browser ecosystem –  Browser performance debugging much better –  Fewer browser differences –  Vibrant open source community ▶  HTML5 –  Local storage, web-sockets, CSS3 … ▶  Death of alternatives –  Flash/Flex, Silverlight
  • 9. The application ▶  “A lot of code” 250k + LOC ▶  Single page “thick client” applications –  Different assumptions –  Runs all day, memory leaks –  UX of lazy loading ▶  Consistency: theming/skinning/UX ▶  Internationalisation ▶  Streaming financial tradable prices –  Screen update performance –  Trade on “displayed price” –  Graceful degradation –  Throttling, scheduling
  • 10. Multiple teams ▶  10-100’s of developers ▶  Multiple independent teams –  Independent versioned deployment lifecycle –  Share some code –  Rest Isolated ▶  Banks are notoriously silo’d by asset class
  • 11. Different cultures ▶  UX/Graphic designers ▶  Web Developers (jQuery anyone) ▶  Product Owners, Product Managers, Business Analysts ▶  Server-side developers –  Decouple dependencies ▶  QA’s (programming QA’s) ▶  Operations –  Deploy artifacts –  Same artifacts for TEST/UAT/PROD –  Directory services Coolness
  • 12. 12
  • 13. Armageddon “Monday morning: Ooops my weekend check-in just changed the background colour of the entire application”
  • 14. How we did it: 1.  Components 2.  Code organization 3.  App structure + patterns 4.  Testing
  • 16. Split by feature, not technology 16 CSS HTML JS config i18n images tests CSS HTML JS config tests images i18n CSS HTML JS config tests images i18n CSS HTML JS config tests images i18n CSS HTML JS config tests images i18n
  • 17. ▶  Independent business feature ▶  No direct dependencies to other components ▶  Minimal public interface –  Event bus (publish/subscribe) –  Component API ▶  Code sharing mechanism –  Libraries –  Modules ▶  Conforms to conventions/name-spacing ▶  Can be pre-built What is a component
  • 19. Workbench Instant reload imperative for developer productivity
  • 20. Conways’Law “Organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations"
  • 21. Code Structure APPLICATION MODULE A COMPONENT 1 COMPONENT 2 MODULE B COMPONENT 3 COMPONENT 4 ASPECTS MOBILE DESKTOP LIBRARIES INC THIRD-PARTY
  • 22. Inheritance + Name-spacing ▶  CSS –  App defines common “theme” –  Components inherit theme –  Override with more specific CSS rules •  Need name-spacing –  Use CSS pre-processor (e.g. LESS,SASS) –  Define an ontology ▶  XML/HTML –  Name-spacing for unique ID’s
  • 23. JavaScript Coding ▶  Fine grained OO –  We average about 100 LOC per class ▶  One class per file ▶  Design patterns ▶  SOLID (Uncle Bob) ▶  Coding standards –  Inheritance –  JsHint ▶  Common code in libraries ▶  Interpreted: so testing is more important ▶  JsLint /coverage
  • 24. Bundling dev-server bundling (enforcement) APPLICATIO N BLADESET A BLADE 1 BLADE 2 BLADESET B BLADE 1 BLADE 2 ASPECTS MOBILE DESKTOP ProjectsEclipse IntelliJ Sublime NetBeans Vi/Emacs …….. IDE of choice running app J2EE ServerWAR deploy ZIP CDN Directory services
  • 26. JavaScript Interfaces ▶  Defines the contract a component should conform to. –  A set of method signatures ▶  Multiple classes “implement” the same interface ▶  Provides a hook for documentation ▶  Hook for IDE tooling
  • 27. Service Registry var service = new caplin.XhrXmlResourceServiceProvider(this.sXmlBundleUrl); caplin.ServiceRegistry.register("caplin.XmlResourceService”, service); var xmlResourceService = caplin.ServiceRegistry.getService("caplin.XmlResourceService"); var tradeModelNode = xmlResourceService.getXmlDocument("tradeModels"); Registration: Usage:
  • 28. Event Hub ▶  Publish/Subscribe inside the browser –  Many to many (or none) ▶  Defined by an interface (contract) ▶  Methods cannot return anything ▶  Classic example: logging ▶  Nice Article: http://blog.caplin.com/2012/12/07/event-hub-pubsub-in-the-browser/
  • 29. Component Interface ▶  Used by layout managers to manage GUI components ▶  Defines GUI lifecycle events –  getElement(), –  onOpen(), –  onResize(), –  onSerialize() etc.
  • 30. MVVM Pattern ViewRendering to screen Domain Model business semantic method callslistens Reused across many screens View Model gestureslistens Logical representation of the view (an adaptor)
  • 31. <button class=‘..’ data-bind=‘click:buttonClicked’> Execute Trade </button> HTML template with bindings $(button).click(function(){ vm.buttonClicked() }); jQuery Control Our HTML5 MVVM Domain Model executeTrade()complete() Message Service send()receive() View Model buttonClicked()tradeButtonEnabled No DOM Access XmlHttpRequest binding framework e.g. KnockoutJs
  • 32. The Testing Triangle Functional GUI testing ITs Unit Tests manual Acceptance Tests Performance Tests Integration Tests - Selenium - (automated manual tests) Unit Tests manual Performance Tests
  • 33. Test by contract Browser GUI logicaluseractions servicecalls Given “form is opened” When “user executes trade” Then “trade message sent to server” Server Code RESTfulAPI Given “server is started” When “trade message received” Then “money is sent somewhere”
  • 34. Test by contract MVVM and services View Model Domain Model complete() View execute() Given … When … Then … Fixtures executeTrade() tradeButtonEnabled Message Service Stub send() receive()
  • 35. Test Infrastructure js-test-driver Server Bundlers JavaScript Dependencies jsTestDriver.conf plugin: - name: "BundleInjector" jar: …/js-jstd-plugin.jar module: com.caplin.jstd.BundlerPlugin load: - bundles/i18n/en_i18n.bundle - bundles/js/js.bundle test: - tests/**.js serve: - bundles/html.bundle - bundles/xml.bundle Plugin JavaScript Test Files HTML/XML Dependencies
  • 36. In summary: divide + conquer Natural fine grained OO coding Components Common code in libraries Split GUI Code into Dom interactions View Model Domain Model Services for stubbing GWT + Test by contract
  • 37. We will soon be open-sourcing our implementation of this architecture www.bladerunnerjs.org