SlideShare a Scribd company logo
MAXIME LEMAITRE โ€“ 18/6/2015
Scenario Driven Design
โ€ฆ Yet another Blabla Driven Design โ€ฆ
Agenda
โ€ข Inspirations
โ€ข The dashboard problem
โ€ข Introducing Scenario Driven design
โ€ข Examples
โ€“ VOD
โ€“ Twitter
โ€“ Office for Ipad
โ€“ โ€œBetclicโ€
โ€ข Conclusion
Inspirations
Scenario Driven API Design
Or: how to make more usable APIs
By Ivo Jansch (APIDays, Paris)
โ€ฆ a long time ago โ€ฆ
Our page is so slow to load
can you fix the performance problem ?
โ€ข The design
โ€“ /orders
โ€“ /orders/:id
โ€“ /orders/:id/details
โ€“ /products
โ€“ /products/:id
โ€“ โ€ฆ
5
The basic design
โ€œA Home page showing the userโ€™s open orders,
the order status, one product for each order
plus the thumb, and a list of the last 5 sent
ordersโ€ โ€ฆ What about performance ?
26 API Calls !!
โ€œBut our API is so RESTfull !โ€
Whatโ€™s the problem ?
Whatโ€™s the problem ?
What is a REST resource ?
Is you raw data model ?
Where is the Business logic ?
Where it should be ?
What if you need to release a new client ? (WebApp, Mobile, โ€ฆ)
Whatโ€™s the problemยฒ ?
โ€ข This is not a REST problem
โ€“ REST is a great way to expose data
โ€ข Butโ€ฆ
โ€“ REST is not an excuse to expose your raw data model
โ€“ REST is not an excuse to stop thinking about business logic
โ€œSmart Data & dumb code works a lot better
than the other way aroundโ€œ
The Cathedral & The Bazaar, Eric S. Raymond
๏ƒ˜ Smart APIs, dump clients
Note : Batch requests could help, but business logic is still on client side...
Introducing โ€˜Scenario Driven API Designโ€™
Introducing Scenario Driven Design
1. Client analysis
โ€“ Identify client needs
โ€“ Usage scenarios
2. Service design
โ€“ Optimal ways to service the client
scenarios
3. Data modelling
โ€“ Create data model to support the
scenarioโ€™s
โ€“ Low level and high level concepts
4. Interface design
โ€“ REST/HAL etc. interface
โ€“ Versioning, etc.
Reminders :
โ€ข Data Driven Design
๏ƒ˜ from Data to generic clients
โ€ข Client Driven Design
๏ƒ˜ from Specific clients to data
Typical VOD features
Scenario Driven Design Approach
โ€ข Identify all relevant scenarios
โ€“ Order a movie
โ€“ Watch a movie
โ€“ See list of my movies
โ€“ Promote content on the home screen
โ€“ See whatโ€™s available
โ€“ Like/unlike movies
Interactions are platform-specific,
Scenarios usually arenโ€™t.
Promote content on the home page
โ€ข All clients should present, on
their home screen, after login:
โ€“ The userโ€™s most recently
rented movies
โ€“ User specific
recommendations
โ€“ Movie top 20
โ€“ Featured movies
Scenario Driven Design
(1) โ€˜Homeโ€™ screen
(4) /promoslots/home
(2) Promote content to the home
screen
(3) Movies, collections, banners,
Interface Design
โ€ข Exemples
โ€“ /recommendations
โ€ข or /users/@me/recommendations
โ€“ /promoslots/:screen
โ€“ /users/@me/movies
โ€“ /users/@me/movies/liked
โ€“ /movies
โ€ข Consider scenarioโ€™s at the highest level
โ€“ Business Logic entirely API side
โ€“ Important: find balance between generic and specific
Framework Design
Framework Design Guidelines: Conventions, Idioms,
and Patterns for Reusable .NET Libraries
by Krzysztof Cwalina & Brad Abrams
โ€ Frameworks often contain a very large set of
APIs. This enables advanced scenarios that require
power and expressiveness. However, most
development revolves around a small set of
common scenarios that use a relatively small
subset of the full framework. To optimize the
overall productivity of the developers using a
framework, it is crucial to invest heavily in the
design of APIs that are used in the most common
scenarios.โ€
Do & Donโ€™t
http://blogs.msdn.com/b/kcwalina/archive/2005/05/05/scenariodrivendesign.aspx
โ€ข Do make sure that the API design specification is the central part of
the design of any feature that includes a publicly accessible API.
โ€ข Do define top usage scenarios for each major feature area.
โ€ข Do ensure that the scenarios correspond to appropriate abstraction
level. They should roughly correspond to the end user use cases.
โ€ข Do design APIs by first writing code samples for the main scenarios
and then defining the object model to support the code samples.
โ€ข Do not rely solely on standard design methodologies (for example
UML) when designing the public APIs layer of a framework.
โ€ข Do not start API design with object model diagrams.
โ€ข Do organize usability studies to test APIs in main scenarios.
Examples
The example of Twitter API
โ€ข The Twitter API exposes many methods for tweets, favorites, retweets, followers,
search, โ€ฆ
โ€ข What is the most common feature of twitter ? => Timelines
โ€ข The home timeline is central to how most users interact with the Twitter service.
Do no try to reinvent the wheel
Dumb clients, Smart APIs
Office for Ipad
โ€œdesigned for iPadโ€ as opposed to โ€œported to iPad
โ€ข Several key mobile scenarios
โ€“ Packing up for the ride home
โ€“ Starting from scratch
โ€“ Last minute scramble
โ€“ Buttoning things up
โ€“ Collaborating with coworkers
โ€“ Taking notes
โ€ข โ€œbringing over hundreds of
Office commands, toolbars,
and dialogs to the iPad would
be, simply put, a mistake.โ€
Conclusion
- Better Usability
- Better Performance
- Better maintainability
- Less duplicates
Questions
References
โ€ข http://blogs.msdn.com/b/kcwalina/archive/2005/05/05/scenariodrivendesign.asp
x
โ€ข https://speakerdeck.com/ijansch/scenario-driven-api-design-apidays-paris
โ€ข https://speakerdeck.com/ijansch/scenario-driven-api-design
โ€ข https://github.com/dotnet/corefx/wiki/Framework-Design-Guidelines-Digest
โ€ข http://www.slideshare.net/clintedmonson/advanced-oop-laws-principles-idioms-
presentation?qid=63cb2104-5ac7-48e9-b3eb-
aebf85cf7459&v=qf1&b=&from_search=1
โ€ข http://www.streetinsider.com/Insiders+Blog/Microsoft+%28MSFT%29+Shows+Ho
w+Office+for+iPad+was+Designed/9519656.html

More Related Content

What's hot (19)

PDF
VISUG: Visual studio for web developers
Kevin DeRudder
ย 
PDF
Job manager 2020 in Angular
Orlovsky Consulting GbR
ย 
PPTX
Branching Your Way to Low-Code Perfection
OutSystems
ย 
PPTX
JavaScript Toolkit
Robert MacLean
ย 
PDF
Building cross platform applications using Windows Azure Mobile Services
Kevin DeRudder
ย 
PDF
Building resuable and customizable Vue components
Filip Rakowski
ย 
PDF
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
David Wesst
ย 
PPTX
Continuous Delivery with TFS msbuild msdeploy
Peter Gfader
ย 
PDF
DrupalCon 2013 Making Support Fun & Profitable
Promet Source
ย 
PPTX
Web Development and Web Development technologies - Temitayo Fadojutimi
Temitayo Fadojutimi
ย 
PPTX
Vue Storefront MUG
Filip Rakowski
ย 
PDF
HTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SK
David Wesst
ย 
PDF
How to create a WordPress not understanding WordPress, so more on the headles...
Krzysztof (Chris) Ozog
ย 
PPT
Browser As Platform
Kai Feng Zhang
ย 
PPTX
Overview of SharePoint Framework (SPFx)
Maล‚gorzata Borzฤ™cka
ย 
PPTX
DrupalCamp Ghent 2014 - Developing Drupal 7 with Drupal 8 in mind
Joeri van Dooren
ย 
PPTX
What's new in Visual Studio 2013 & TFS 2013
Danijel Malik
ย 
PPTX
The StartUp Agency - A Case Study on CFPB
GovLoop
ย 
PPTX
Lightswitch
Robert MacLean
ย 
VISUG: Visual studio for web developers
Kevin DeRudder
ย 
Job manager 2020 in Angular
Orlovsky Consulting GbR
ย 
Branching Your Way to Low-Code Perfection
OutSystems
ย 
JavaScript Toolkit
Robert MacLean
ย 
Building cross platform applications using Windows Azure Mobile Services
Kevin DeRudder
ย 
Building resuable and customizable Vue components
Filip Rakowski
ย 
JavaScript Revolution - 5/Nov/13 - PrDC Saskatoon, SK
David Wesst
ย 
Continuous Delivery with TFS msbuild msdeploy
Peter Gfader
ย 
DrupalCon 2013 Making Support Fun & Profitable
Promet Source
ย 
Web Development and Web Development technologies - Temitayo Fadojutimi
Temitayo Fadojutimi
ย 
Vue Storefront MUG
Filip Rakowski
ย 
HTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SK
David Wesst
ย 
How to create a WordPress not understanding WordPress, so more on the headles...
Krzysztof (Chris) Ozog
ย 
Browser As Platform
Kai Feng Zhang
ย 
Overview of SharePoint Framework (SPFx)
Maล‚gorzata Borzฤ™cka
ย 
DrupalCamp Ghent 2014 - Developing Drupal 7 with Drupal 8 in mind
Joeri van Dooren
ย 
What's new in Visual Studio 2013 & TFS 2013
Danijel Malik
ย 
The StartUp Agency - A Case Study on CFPB
GovLoop
ย 
Lightswitch
Robert MacLean
ย 

Viewers also liked (20)

PDF
Email Management in Outlook
Betclic Everest Group Tech Team
ย 
PPT
Ideation Mind Mapping
jascc1
ย 
PPTX
Web 2 0 Tools To Get Organised
BGS Library
ย 
PDF
Business Value and Business Model Innovation in Decentralized Interoperabilit...
Boris Otto
ย 
PPTX
Technique to design Business Model from the book: Business Model Generation
Roukaya Issaoui
ย 
PPTX
Design Techniques for Business Model Generator
Hani Tarabichi
ย 
PDF
Solucionario de int3pids del I Wargame de Sbd - 2011
secbydefault
ย 
PPTX
Using Scenario Analysis to Predict the Future of the Semantic Web
August Jackson
ย 
PDF
TAUS Roundtable Moscow, Planning for an Uncertain Future, Jaap van der Meer, ...
TAUS - The Language Data Network
ย 
PPTX
What Will Game become?
Cara Yu
ย 
PPT
Wargame Results for The Battle of Stocker's Ridge
Mr.J
ย 
PDF
Wargame
Alejandro Ramos
ย 
PPT
Last Day
Daniel Wernegren
ย 
ODP
WgSbD2
secbydefault
ย 
PPTX
Scenarios
Netresult Ltd
ย 
PDF
CDE Marketplace 2016: NSC
Defence and Security Accelerator
ย 
PPTX
War Games (Remote Control 2014, Utrecht)
Stefan Werning
ย 
PPTX
"The โ€œinevitable futureโ€ scenario-building methodology" by Artiom Zheltov
Artiom Zheltov
ย 
PPT
Scenario Analysis Use Case: 3G/4G Wireless Data
August Jackson
ย 
PDF
Business Model Wargame, SunIdee 2012
Martin Klitsie
ย 
Email Management in Outlook
Betclic Everest Group Tech Team
ย 
Ideation Mind Mapping
jascc1
ย 
Web 2 0 Tools To Get Organised
BGS Library
ย 
Business Value and Business Model Innovation in Decentralized Interoperabilit...
Boris Otto
ย 
Technique to design Business Model from the book: Business Model Generation
Roukaya Issaoui
ย 
Design Techniques for Business Model Generator
Hani Tarabichi
ย 
Solucionario de int3pids del I Wargame de Sbd - 2011
secbydefault
ย 
Using Scenario Analysis to Predict the Future of the Semantic Web
August Jackson
ย 
TAUS Roundtable Moscow, Planning for an Uncertain Future, Jaap van der Meer, ...
TAUS - The Language Data Network
ย 
What Will Game become?
Cara Yu
ย 
Wargame Results for The Battle of Stocker's Ridge
Mr.J
ย 
Wargame
Alejandro Ramos
ย 
Last Day
Daniel Wernegren
ย 
WgSbD2
secbydefault
ย 
Scenarios
Netresult Ltd
ย 
CDE Marketplace 2016: NSC
Defence and Security Accelerator
ย 
War Games (Remote Control 2014, Utrecht)
Stefan Werning
ย 
"The โ€œinevitable futureโ€ scenario-building methodology" by Artiom Zheltov
Artiom Zheltov
ย 
Scenario Analysis Use Case: 3G/4G Wireless Data
August Jackson
ย 
Business Model Wargame, SunIdee 2012
Martin Klitsie
ย 
Ad

Similar to Mini training- Scenario Driven Design (20)

PPT
How to design effective APIs
Bansilal Haudakari
ย 
PPTX
APIs with Bounded Contexts: Modelling Apis with Domain-Driven Design
Josรฉ Haro Peralta
ย 
PPTX
Api design part 1
Ibrahim Elsawaf
ย 
PPT
Effective API Design
Bansilal Haudakari
ย 
PPTX
Top 10 Lessons Learned from the Netflix API - OSCON 2014
Daniel Jacobson
ย 
PDF
Design & Deploy a data-driven Web API in 2 hours
Restlet
ย 
PDF
Be My API How to Implement an API Strategy Everyone will Love
CA API Management
ย 
PPTX
API-First Redesign of a Legacy Application
Nordic APIs
ย 
PPTX
Succeed with a Developer-Centric API Strategy - Ronnie Mitra, Principal API A...
CA API Management
ย 
PPTX
Intro to API Design Principles
Victor Osimitz
ย 
PPTX
Applying Domain-Driven Design to APIs and Microservices - Austin API Meetup
LaunchAny
ย 
PPTX
Oscon2014 Netflix API - Top 10 Lessons Learned
Sangeeta Narayanan
ย 
PPTX
API-first Redesign of a Legacy Application - Nordic APIs Platform Summit 2018
Chris Busse
ย 
PDF
Why your APIs should fly first class
LibbySchulze
ย 
PPTX
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
CA API Management
ย 
PDF
apidays London 2023 - Why and how to apply DDD to APIs, Radhouane Jrad, QBE E...
apidays
ย 
PPTX
API Strategy Evolution at Netflix
Michael Hart
ย 
PPTX
On the shoulders of giants Learning About API Design by Looking Backwards
CA API Management
ย 
PPTX
Navigating the Post-OpenAPI Era with Innovative API Design Frameworks - Danie...
Nordic APIs
ย 
PDF
API Introduction - API Management Workshop Munich from Ronnie Mitra
CA API Management
ย 
How to design effective APIs
Bansilal Haudakari
ย 
APIs with Bounded Contexts: Modelling Apis with Domain-Driven Design
Josรฉ Haro Peralta
ย 
Api design part 1
Ibrahim Elsawaf
ย 
Effective API Design
Bansilal Haudakari
ย 
Top 10 Lessons Learned from the Netflix API - OSCON 2014
Daniel Jacobson
ย 
Design & Deploy a data-driven Web API in 2 hours
Restlet
ย 
Be My API How to Implement an API Strategy Everyone will Love
CA API Management
ย 
API-First Redesign of a Legacy Application
Nordic APIs
ย 
Succeed with a Developer-Centric API Strategy - Ronnie Mitra, Principal API A...
CA API Management
ย 
Intro to API Design Principles
Victor Osimitz
ย 
Applying Domain-Driven Design to APIs and Microservices - Austin API Meetup
LaunchAny
ย 
Oscon2014 Netflix API - Top 10 Lessons Learned
Sangeeta Narayanan
ย 
API-first Redesign of a Legacy Application - Nordic APIs Platform Summit 2018
Chris Busse
ย 
Why your APIs should fly first class
LibbySchulze
ย 
Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 Londo...
CA API Management
ย 
apidays London 2023 - Why and how to apply DDD to APIs, Radhouane Jrad, QBE E...
apidays
ย 
API Strategy Evolution at Netflix
Michael Hart
ย 
On the shoulders of giants Learning About API Design by Looking Backwards
CA API Management
ย 
Navigating the Post-OpenAPI Era with Innovative API Design Frameworks - Danie...
Nordic APIs
ย 
API Introduction - API Management Workshop Munich from Ronnie Mitra
CA API Management
ย 
Ad

More from Betclic Everest Group Tech Team (20)

PPTX
Mini training - Reactive Extensions (Rx)
Betclic Everest Group Tech Team
ย 
PPTX
Mini training - Moving to xUnit.net
Betclic Everest Group Tech Team
ย 
PPTX
Mini training - Introduction to Microsoft Azure Storage
Betclic Everest Group Tech Team
ย 
PDF
Mini-Training: SSO with Windows Identity Foundation
Betclic Everest Group Tech Team
ย 
PPTX
Training - What is Performance ?
Betclic Everest Group Tech Team
ย 
PPTX
Mini-Training: Docker
Betclic Everest Group Tech Team
ย 
PDF
Mini Training Flyway
Betclic Everest Group Tech Team
ย 
PDF
Management 3.0 Workout
Betclic Everest Group Tech Team
ย 
PDF
Lean for Business
Betclic Everest Group Tech Team
ย 
PPTX
Short-Training asp.net vNext
Betclic Everest Group Tech Team
ย 
PPTX
Training โ€“ Going Async
Betclic Everest Group Tech Team
ย 
PDF
Mini-Training: Mobile UX Trends
Betclic Everest Group Tech Team
ย 
PPTX
Training: MVVM Pattern
Betclic Everest Group Tech Team
ย 
PPTX
Mini-training: Personalization & Recommendation Demystified
Betclic Everest Group Tech Team
ย 
PPTX
Mini-training: Letโ€™s Git It!
Betclic Everest Group Tech Team
ย 
PDF
AngularJS Best Practices
Betclic Everest Group Tech Team
ย 
PDF
Mini-Training: Roslyn
Betclic Everest Group Tech Team
ย 
PDF
Mini-Training: Netflix Simian Army
Betclic Everest Group Tech Team
ย 
PPTX
WCF Configuration - The basics
Betclic Everest Group Tech Team
ย 
Mini training - Reactive Extensions (Rx)
Betclic Everest Group Tech Team
ย 
Mini training - Moving to xUnit.net
Betclic Everest Group Tech Team
ย 
Mini training - Introduction to Microsoft Azure Storage
Betclic Everest Group Tech Team
ย 
Mini-Training: SSO with Windows Identity Foundation
Betclic Everest Group Tech Team
ย 
Training - What is Performance ?
Betclic Everest Group Tech Team
ย 
Mini-Training: Docker
Betclic Everest Group Tech Team
ย 
Mini Training Flyway
Betclic Everest Group Tech Team
ย 
Management 3.0 Workout
Betclic Everest Group Tech Team
ย 
Lean for Business
Betclic Everest Group Tech Team
ย 
Short-Training asp.net vNext
Betclic Everest Group Tech Team
ย 
Training โ€“ Going Async
Betclic Everest Group Tech Team
ย 
Mini-Training: Mobile UX Trends
Betclic Everest Group Tech Team
ย 
Training: MVVM Pattern
Betclic Everest Group Tech Team
ย 
Mini-training: Personalization & Recommendation Demystified
Betclic Everest Group Tech Team
ย 
Mini-training: Letโ€™s Git It!
Betclic Everest Group Tech Team
ย 
AngularJS Best Practices
Betclic Everest Group Tech Team
ย 
Mini-Training: Roslyn
Betclic Everest Group Tech Team
ย 
Mini-Training: Netflix Simian Army
Betclic Everest Group Tech Team
ย 
WCF Configuration - The basics
Betclic Everest Group Tech Team
ย 

Recently uploaded (20)

PDF
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
ย 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
ย 
PPTX
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
ย 
PDF
AI Image Enhancer: Revolutionizing Visual Qualityโ€
docmasoom
ย 
PDF
What companies do with Pharo (ESUG 2025)
ESUG
ย 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
ย 
PDF
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
ย 
PDF
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
ย 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
ย 
PPTX
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
ย 
PDF
AI Software Engineering based on Multi-view Modeling and Engineering Patterns
Hironori Washizaki
ย 
PDF
SAP GUI Installation Guide for Windows | Step-by-Step Setup for SAP Access
SAP Vista, an A L T Z E N Company
ย 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
ย 
PDF
Salesforce Pricing Update 2025: Impact, Strategy & Smart Cost Optimization wi...
GetOnCRM Solutions
ย 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
ย 
PPTX
SAP Public Cloud PPT , SAP PPT, Public Cloud PPT
sonawanekundan2024
ย 
PPTX
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
ย 
PDF
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
ย 
PPTX
Farrell__10e_ch04_PowerPoint.pptx Programming Logic and Design slides
bashnahara11
ย 
PDF
AWS_Agentic_AI_in_Indian_BFSI_A_Strategic_Blueprint_for_Customer.pdf
siddharthnetsavvies
ย 
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
ย 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
ย 
TRAVEL APIs | WHITE LABEL TRAVEL API | TOP TRAVEL APIs
philipnathen82
ย 
AI Image Enhancer: Revolutionizing Visual Qualityโ€
docmasoom
ย 
What companies do with Pharo (ESUG 2025)
ESUG
ย 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
ย 
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
ย 
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
ย 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
ย 
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
ย 
AI Software Engineering based on Multi-view Modeling and Engineering Patterns
Hironori Washizaki
ย 
SAP GUI Installation Guide for Windows | Step-by-Step Setup for SAP Access
SAP Vista, an A L T Z E N Company
ย 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
ย 
Salesforce Pricing Update 2025: Impact, Strategy & Smart Cost Optimization wi...
GetOnCRM Solutions
ย 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
ย 
SAP Public Cloud PPT , SAP PPT, Public Cloud PPT
sonawanekundan2024
ย 
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
ย 
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
ย 
Farrell__10e_ch04_PowerPoint.pptx Programming Logic and Design slides
bashnahara11
ย 
AWS_Agentic_AI_in_Indian_BFSI_A_Strategic_Blueprint_for_Customer.pdf
siddharthnetsavvies
ย 

Mini training- Scenario Driven Design

  • 1. MAXIME LEMAITRE โ€“ 18/6/2015 Scenario Driven Design โ€ฆ Yet another Blabla Driven Design โ€ฆ
  • 2. Agenda โ€ข Inspirations โ€ข The dashboard problem โ€ข Introducing Scenario Driven design โ€ข Examples โ€“ VOD โ€“ Twitter โ€“ Office for Ipad โ€“ โ€œBetclicโ€ โ€ข Conclusion
  • 3. Inspirations Scenario Driven API Design Or: how to make more usable APIs By Ivo Jansch (APIDays, Paris)
  • 4. โ€ฆ a long time ago โ€ฆ Our page is so slow to load can you fix the performance problem ?
  • 5. โ€ข The design โ€“ /orders โ€“ /orders/:id โ€“ /orders/:id/details โ€“ /products โ€“ /products/:id โ€“ โ€ฆ 5 The basic design โ€œA Home page showing the userโ€™s open orders, the order status, one product for each order plus the thumb, and a list of the last 5 sent ordersโ€ โ€ฆ What about performance ? 26 API Calls !! โ€œBut our API is so RESTfull !โ€ Whatโ€™s the problem ?
  • 6. Whatโ€™s the problem ? What is a REST resource ? Is you raw data model ? Where is the Business logic ? Where it should be ? What if you need to release a new client ? (WebApp, Mobile, โ€ฆ)
  • 7. Whatโ€™s the problemยฒ ? โ€ข This is not a REST problem โ€“ REST is a great way to expose data โ€ข Butโ€ฆ โ€“ REST is not an excuse to expose your raw data model โ€“ REST is not an excuse to stop thinking about business logic โ€œSmart Data & dumb code works a lot better than the other way aroundโ€œ The Cathedral & The Bazaar, Eric S. Raymond ๏ƒ˜ Smart APIs, dump clients Note : Batch requests could help, but business logic is still on client side...
  • 9. Introducing Scenario Driven Design 1. Client analysis โ€“ Identify client needs โ€“ Usage scenarios 2. Service design โ€“ Optimal ways to service the client scenarios 3. Data modelling โ€“ Create data model to support the scenarioโ€™s โ€“ Low level and high level concepts 4. Interface design โ€“ REST/HAL etc. interface โ€“ Versioning, etc. Reminders : โ€ข Data Driven Design ๏ƒ˜ from Data to generic clients โ€ข Client Driven Design ๏ƒ˜ from Specific clients to data
  • 11. Scenario Driven Design Approach โ€ข Identify all relevant scenarios โ€“ Order a movie โ€“ Watch a movie โ€“ See list of my movies โ€“ Promote content on the home screen โ€“ See whatโ€™s available โ€“ Like/unlike movies Interactions are platform-specific, Scenarios usually arenโ€™t.
  • 12. Promote content on the home page โ€ข All clients should present, on their home screen, after login: โ€“ The userโ€™s most recently rented movies โ€“ User specific recommendations โ€“ Movie top 20 โ€“ Featured movies
  • 13. Scenario Driven Design (1) โ€˜Homeโ€™ screen (4) /promoslots/home (2) Promote content to the home screen (3) Movies, collections, banners,
  • 14. Interface Design โ€ข Exemples โ€“ /recommendations โ€ข or /users/@me/recommendations โ€“ /promoslots/:screen โ€“ /users/@me/movies โ€“ /users/@me/movies/liked โ€“ /movies โ€ข Consider scenarioโ€™s at the highest level โ€“ Business Logic entirely API side โ€“ Important: find balance between generic and specific
  • 15. Framework Design Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries by Krzysztof Cwalina & Brad Abrams โ€ Frameworks often contain a very large set of APIs. This enables advanced scenarios that require power and expressiveness. However, most development revolves around a small set of common scenarios that use a relatively small subset of the full framework. To optimize the overall productivity of the developers using a framework, it is crucial to invest heavily in the design of APIs that are used in the most common scenarios.โ€
  • 16. Do & Donโ€™t http://blogs.msdn.com/b/kcwalina/archive/2005/05/05/scenariodrivendesign.aspx โ€ข Do make sure that the API design specification is the central part of the design of any feature that includes a publicly accessible API. โ€ข Do define top usage scenarios for each major feature area. โ€ข Do ensure that the scenarios correspond to appropriate abstraction level. They should roughly correspond to the end user use cases. โ€ข Do design APIs by first writing code samples for the main scenarios and then defining the object model to support the code samples. โ€ข Do not rely solely on standard design methodologies (for example UML) when designing the public APIs layer of a framework. โ€ข Do not start API design with object model diagrams. โ€ข Do organize usability studies to test APIs in main scenarios.
  • 18. The example of Twitter API โ€ข The Twitter API exposes many methods for tweets, favorites, retweets, followers, search, โ€ฆ โ€ข What is the most common feature of twitter ? => Timelines โ€ข The home timeline is central to how most users interact with the Twitter service. Do no try to reinvent the wheel Dumb clients, Smart APIs
  • 19. Office for Ipad โ€œdesigned for iPadโ€ as opposed to โ€œported to iPad โ€ข Several key mobile scenarios โ€“ Packing up for the ride home โ€“ Starting from scratch โ€“ Last minute scramble โ€“ Buttoning things up โ€“ Collaborating with coworkers โ€“ Taking notes โ€ข โ€œbringing over hundreds of Office commands, toolbars, and dialogs to the iPad would be, simply put, a mistake.โ€
  • 20. Conclusion - Better Usability - Better Performance - Better maintainability - Less duplicates
  • 22. References โ€ข http://blogs.msdn.com/b/kcwalina/archive/2005/05/05/scenariodrivendesign.asp x โ€ข https://speakerdeck.com/ijansch/scenario-driven-api-design-apidays-paris โ€ข https://speakerdeck.com/ijansch/scenario-driven-api-design โ€ข https://github.com/dotnet/corefx/wiki/Framework-Design-Guidelines-Digest โ€ข http://www.slideshare.net/clintedmonson/advanced-oop-laws-principles-idioms- presentation?qid=63cb2104-5ac7-48e9-b3eb- aebf85cf7459&v=qf1&b=&from_search=1 โ€ข http://www.streetinsider.com/Insiders+Blog/Microsoft+%28MSFT%29+Shows+Ho w+Office+for+iPad+was+Designed/9519656.html