SlideShare a Scribd company logo
RAPID – Resource API Design Language
Pushing the limits of language usability with XText
TED EPSTEIN, FOUNDER AND CEO
TANYA FESENKO, LEAD DEVELOPER
EclipseCon NA 2015, Xtext Day
1COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED.
™
™
Overview
• RepreZen: solving API interoperability
• Challenge: a better API description language
• RAPID Language Features
◦ Optional Fluency: accommodating coding styles
◦ Keyword Sequence: encourage, don’t Enforce
◦ Indent-Based Block Scoping: life without curly braces
• Implementation Overview
• Summary
• Q&A
2COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED.
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 3
/ Unify Data Models
/ Federate APIs
/ Integrate Faster
The Elevator Pitch
The Elevator Pitch
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 4
Make Canonical
Data Models
Practical
Enable Highly
Interoperable
APIs
Significantly
Lower Long-
Term Integration
Cost
• Frequently recommended, hard to implement
• Current reality: much easier to build from
scratch than to reuse existing data models
• We want to change that!
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 5
Make Canonical
Data Models
Practical
Enable Highly
Interoperable
APIs
Significantly
Lower Long-
Term Integration
Cost
• Frequently recommended, hard to implement
• Current reality: much easier to build from
scratch than to reuse existing data models
• We want to change that!
• Reusable data models: business-oriented,
technology-independent, semantically rich
• Allow variability through realization
• Message payloads still conform to canonical model
Property Subsets Perspective
<party dataSource=“MSDB”>
<partyId>123</partyId>
<partyName xsi:nil=“true” nullValue=“Not Available” />
<accounts>
<account dataSource=“A2” transType=“insert”>
<accountId>XYZ</accountId>
<balance xsi:nil=“true” isRestricted=“true” />
</account>
</accounts>
</party>
Metadata Contextual Constraints
The Elevator Pitch
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 6
Make Canonical
Data Models
Practical
Enable Highly
Interoperable
APIs
Significantly
Lower Long-
Term Integration
Cost
• Frequently recommended, hard to implement
• Current reality: much easier to build from
scratch than to reuse existing data models
• We want to change that!
• Reusable data models: business-oriented, technology-
independent, semantically rich
• Allow variability through realization
• Message payloads still conform to canonical model
• Service APIs speak the same language
• Clients can work with multiple APIs, without multiple DTOs,
SDKs, etc.
• Stop runaway spending on remedial integration technology
Changing the way we build APIs
Message
Schema
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 7
Business
Domain
Model
Realization
• Subset
• Perspective
• Constraints
• Metadata
Resource
Data
Model
Representation
• Media Type
• Format
• Conventions
• Hyperlinks
This needs to be
built into the API
modeling language.
Yet Another API Description Language?
YAADL? YAAPIDL?
There are at least four of these...
“The nice thing about standards is
that you have so many to chose from.”
- Andrew Tanenbaum
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 8
… and they’re pretty good.
◦ Web-based editors
◦ API Documentation with integrated
sandbox
◦ Syntax based on YAML or Markdown
◦ Interesting language-level reuse
◦ REST patterns built in
If we have to
build an API
modeling language,
it has to be good.
… any
ideas?
Who’s going to model these APIs?
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 9
…andDevelopers!
Developers!
Developers!
Business Analysts
Subject Matter Experts
Data Professionals
Enterprise Architects
Make it accessible,
readable, versatile.
What
she
said.
Demo – RAPID Usability Features
• Indent Syntax:
◦ Python-like block syntax, no curly braces
◦ Advanced highlighting to visualize structure
• Order Assist:
◦ Flexible sequence for declarations
◦ Reset to standard sequence using QuickFix or auto-format
• Optional Fluency
◦ Support terse and fluent syntax with optional keywords
◦ Semantic highlighting to distinguish optional vs. required keywords
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 10
11
Indent-Based Syntax
Structural Highlighting -
editbox.sourceforge.net
New Syntax –
indents define block scope
Previous Syntax –
braces for block scoping
Order Assist
12
Optional Fluency
13
Fluent
Terse
Implementation
Walkthrough
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 14
15
Work with Xtext
Xtext
Grammar
(*.xtext file)
16
Work with Xtext
Xtext
Grammar
(*.xtext file)
Generated code (Parser and UI)
17
Work with Xtext
The rest
(customized from generated code)
Lexer Formatter Content assist
Code
Templates
Prefs
Cross-
reference
Scope
Code
highlighter
Validation/
Quickfix
Outline …
Xtext
Grammar
(*.xtext file)
Generated code (Parser and UI)
Description Grammar
Code
Customization
for (each feature):
18
Three features
Feature 1:
Automate canonical ordering
19
Order Assist
20
methods
21
Implementation: Grammar
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
22
Allow arbitrary order in grammar
23
Allow arbitrary order in grammar
24
Allow arbitrary order in grammar
Disable code-assist and add
validator for duplicate single-
valued properties to prevent
overriding
25
Sort List< INode>
Compare INodes:
• Using sorting rules
• Preserving:
• List delimiters
• Whitespaces
• Attached symbols (*, +)
• Order of elements of the same
kind
Grammar Tree
Sorting rule:
Sequence<GrammarElement>
26
Implementation: Grammar
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Validation
Validation
27
MyJavaValidator #
checkMyElement(SemanticElement)
Validation
28
Semantic
Element
Syntax
Tree Node
getIncorrectly
OrderedChildren()
Incorrectly
ordered
Nodes
NodeModelUtils::getNode()
MyJavaValidator #
checkMyElement(SemanticElement)
29
Implementation: Grammar
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Formatter
30
FormatterDefaultNodeModelFormatter#format():
31
FormatterDefaultNodeModelFormatter#format():
32
FormatterDefaultNodeModelFormatter#format():
INode:
• offset
• text
• length
• grammarElement
• semanticElement
33
FormatterDefaultNodeModelFormatter#format():
Writes tokens
to character
stream and
then flushes it
The write
methods create
formatted
LineEntries with
use of formatter
configuration
(ElementLocators)
34
FormatterDefaultNodeModelFormatter#format():
TextRegion –
offset and
length in the
char stream
populated in
the write
methods
35
FormatterDefaultNodeModelFormatter#format():
Place for
customization
36
Implementation: Grammar
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Preferences
page
Usability: Preferences
37
38
Testing
1
2
3
4
5
How many
permutations for five
elements ?
5!=120
39
Testing
Xtend Active Annotations
120 green
tests!
40
Changes: Automate Canonical Ordering
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Preferences
pageFormatterValidation
Enable
arbitrary order
41
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Preferences
pageFormatterValidation
• Errors for single-value
property override
• Warnings for
"incorrect" order
Changes: Automate Canonical Ordering
42
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Preferences
pageFormatterValidation
Restore
canonical order
Changes: Automate Canonical Ordering
43
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Preferences
pageFormatterValidation
enable/disable
validation,
reordering in
formatter
Changes: Automate Canonical Ordering
Feature 2:
Optional fluency
44
What is Optional Fluency?
45
Fluent
Terse
46
Implementation: Grammar
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Implementation
47
48
Implementation
49
Changes: Optional Fluency
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Optional
fluency
Feature 3:
Indent-based block scoping in
Xtext
50
51
Indent-based block scoping in Xtext
Python-like notation
With curly braces
52
Indent-based block scoping in Xtext
Highlighting of boxes-
editbox.sourceforge.net
53
Implementation: Grammar
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
54
Grammar
NL - newline
WS – whitespace
BEGIN – indent
END - outdent
55
Grammar NL: not
hidden
NL - newline
WS – whitespace
BEGIN – indent
END - outdent
56
Grammar NL: not
hidden
NL - newline
WS – whitespace
BEGIN – indent
END - outdent
57
Implementation: Grammar
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Lexer
58
Custom Lexer
Custom
code
Generated /
Xtext code
Indent-based Syntax in Xtext -
tinyurl.com/pgcowct
Insert BEGIN and
END token
59
Content assist
60
Implementation: Grammar
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Content
Assist
61
Custom Lexers
Plural now
Custom code
Generated /
Xtext code
Content-assist
needs its own lexer
Custom Lexers
62
Custom
code
Generated /
Xtext code
Content Assist
63
Also see “Enhancing
Content Assist” from
XtextCON 2015 -
tinyurl.com/onou2hu
Content Assist
64
Also see “Enhancing
Content Assist” from
XtextCON 2015 -
tinyurl.com/onou2hu
Content Assist
65
Also see “Enhancing
Content Assist” from
XtextCON 2015 -
tinyurl.com/onou2hu
Content Assist
66
Place for
customization
Content-Assist Context Factory
67
Initialize data
Analyze data to
create content
assist contexts
Content
Assist
Contexts
Content-Assist Context Factory
68
Initialize data
Analyze data to
create content
assist contexts
Content
Assist
Contexts
Syntax tree nodes –
lastCompleteNode,
lastVisibleNode, currentNode,
datatypeNode
Semantic model - current model
Initialize data
Analyze data to
create content
assist contexts
Content
Assist
Contexts
Content-Assist Context Factory
69
Start a new token, complete
current one, collect
available alternatives, etc…
Initialize data
Analyze data to
create content
assist contexts
Content
Assist
Contexts
Content-Assist Context Factory
70
Customize to
respect indents
71
Implementation: Grammar
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
Formatter
Formatter
72
Assign correct value to
FormattingConfigBasedStream
#indentationLevel
No spaces around “invisible”
rules – synthetic (BEGIN and
END) and NL (newline)
No line wraps should be
introduced by formatter – line
wraps change structure of
Python-like models
73
Changes: Indent-based Syntax
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
FormatterContent
AssistLexer
Add BEGIN and
END terminal
rules
74
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
FormatterContent
AssistLexer
Synthesize
BEGIN and END
tokens
Changes: Indent-based Syntax
75
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
FormatterContent
AssistLexer
Show proposals
according to
indent level
Changes: Indent-based Syntax
76
The rest
(customized from generated code)
Xtext
Grammar
(*.xtext file)
Generated code
FormatterContent
AssistLexer
Preserve NLs
and indents
Changes: Indent-based Syntax
Summary
• Still an ongoing experiment
◦ Early feedback from users has been very positive.
◦ We welcome your feedback!
• API Studio is a commercial product, still pre-launch
• Offering a free license with 1-year maintenance to Conference
attendees (1 per organization)
• Register at get.reprezen.com with invitation code eclipsecon2015
• Contacts:
◦ ted.epstein@reprezen.com
◦ tatiana.fesenko@reprezen.com
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 77
Questions
THANK YOU!
COPYRIGHT © 2015, MODELSOLV, INC. | ALL RIGHTS RESERVED. 78

More Related Content

What's hot (19)

PPT
Putting DITA Localization into Practice
XMetaL
 
PDF
Api and Fluency
Stefano Fago
 
PDF
JSR 335 / java 8 - update reference
sandeepji_choudhary
 
PDF
Managing OSS license obligations
nexB Inc.
 
PDF
Zend Con Harris Data Case Study
ZendCon
 
PPTX
End-to-End Deep Learning Deployment with ONNX
Nick Pentreath
 
PPTX
Gaining Value From Global Content Using the Vasont CCMS: A Case Study of Hewl...
Vasont Systems
 
PDF
PHP Batch Jobs on IBM i
Alan Seiden
 
PDF
Web services on IBM i with PHP and Zend Framework
Alan Seiden
 
PPT
Net framework
Mahfuz1061
 
PDF
Strategic Modernization with PHP on IBM i
Alan Seiden
 
PDF
IBM i: Fertile Ground for PHP Developers
Alan Seiden
 
PDF
A Tale of Two Toolkits
Zend by Rogue Wave Software
 
PDF
Browser tools that make web development easier
Alan Seiden
 
PDF
Advancing OpenFabrics Interfaces
inside-BigData.com
 
PDF
Object Pascal Clean Code Guidelines Proposal (at EKON 22)
Arnaud Bouchez
 
KEY
Extending ZF & Extending With ZF
Ralph Schindler
 
PPTX
Overview Of .Net 4.0 Sanjay Vyas
rsnarayanan
 
PPTX
PHP on IBM i Tutorial
ZendCon
 
Putting DITA Localization into Practice
XMetaL
 
Api and Fluency
Stefano Fago
 
JSR 335 / java 8 - update reference
sandeepji_choudhary
 
Managing OSS license obligations
nexB Inc.
 
Zend Con Harris Data Case Study
ZendCon
 
End-to-End Deep Learning Deployment with ONNX
Nick Pentreath
 
Gaining Value From Global Content Using the Vasont CCMS: A Case Study of Hewl...
Vasont Systems
 
PHP Batch Jobs on IBM i
Alan Seiden
 
Web services on IBM i with PHP and Zend Framework
Alan Seiden
 
Net framework
Mahfuz1061
 
Strategic Modernization with PHP on IBM i
Alan Seiden
 
IBM i: Fertile Ground for PHP Developers
Alan Seiden
 
A Tale of Two Toolkits
Zend by Rogue Wave Software
 
Browser tools that make web development easier
Alan Seiden
 
Advancing OpenFabrics Interfaces
inside-BigData.com
 
Object Pascal Clean Code Guidelines Proposal (at EKON 22)
Arnaud Bouchez
 
Extending ZF & Extending With ZF
Ralph Schindler
 
Overview Of .Net 4.0 Sanjay Vyas
rsnarayanan
 
PHP on IBM i Tutorial
ZendCon
 

Similar to RepreZen DSL: Pushing the limits of language usability with XText (20)

PPT
Alfresco share 4.1 to 4.2 customisation
Muralidharan Deenathayalan
 
PPTX
Contract-Based Web Services API Deep Dive
Gabriel Michaud
 
PDF
NetWork - 15.10.2011 - Applied code generation in .NET
Dmytro Mindra
 
PDF
Oracle - Continuous Delivery NYC meetup, June 07, 2018
Oracle Developers
 
PDF
Apache Deep Learning 101 - DWS Berlin 2018
Timothy Spann
 
PDF
M meijer api management - tech-days 2015
Freelance Consultant / Manager / co-CTO
 
PPTX
What I Learned From Writing a Test Framework (And Why I May Never Write One A...
Daryl Walleck
 
PPTX
C#: Past, Present and Future
Rodolfo Finochietti
 
PPTX
Overview of SuiteHelp 3.1 for DITA
Suite Solutions
 
PPTX
What’s new in the 4.5
Yuriy Seniuk
 
PDF
Omni-Path Status, Upstreaming and Ongoing Work
inside-BigData.com
 
PPTX
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Callon Campbell
 
PDF
Tutorial Módulo 1 de Introdução com Flask
Vinícius Marques
 
PDF
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Mack Hardy
 
PPTX
FHIR Server internals - sqlonfhir
Brian Postlethwaite
 
DOC
Diwakar Nag
Diwakar Nag
 
PDF
Deep learning on HDP 2018 Prague
Timothy Spann
 
PPTX
What's New in .Net 4.5
Malam Team
 
PDF
Lois Patterson: Markup Languages and Warp-Speed Documentation
Jack Molisani
 
PPTX
Markup languages and warp-speed documentation
Lois Patterson
 
Alfresco share 4.1 to 4.2 customisation
Muralidharan Deenathayalan
 
Contract-Based Web Services API Deep Dive
Gabriel Michaud
 
NetWork - 15.10.2011 - Applied code generation in .NET
Dmytro Mindra
 
Oracle - Continuous Delivery NYC meetup, June 07, 2018
Oracle Developers
 
Apache Deep Learning 101 - DWS Berlin 2018
Timothy Spann
 
M meijer api management - tech-days 2015
Freelance Consultant / Manager / co-CTO
 
What I Learned From Writing a Test Framework (And Why I May Never Write One A...
Daryl Walleck
 
C#: Past, Present and Future
Rodolfo Finochietti
 
Overview of SuiteHelp 3.1 for DITA
Suite Solutions
 
What’s new in the 4.5
Yuriy Seniuk
 
Omni-Path Status, Upstreaming and Ongoing Work
inside-BigData.com
 
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Callon Campbell
 
Tutorial Módulo 1 de Introdução com Flask
Vinícius Marques
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Mack Hardy
 
FHIR Server internals - sqlonfhir
Brian Postlethwaite
 
Diwakar Nag
Diwakar Nag
 
Deep learning on HDP 2018 Prague
Timothy Spann
 
What's New in .Net 4.5
Malam Team
 
Lois Patterson: Markup Languages and Warp-Speed Documentation
Jack Molisani
 
Markup languages and warp-speed documentation
Lois Patterson
 
Ad

Recently uploaded (20)

PDF
Understanding the EU Cyber Resilience Act
ICS
 
PDF
How Attendance Management Software is Revolutionizing Education.pdf
Pikmykid
 
PDF
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
 
PPTX
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
 
PDF
Introduction to Apache Iceberg™ & Tableflow
Alluxio, Inc.
 
PPTX
How Can Reporting Tools Improve Marketing Performance.pptx
Varsha Nayak
 
PDF
Virtual Threads in Java: A New Dimension of Scalability and Performance
Tier1 app
 
PDF
custom development enhancement | Togglenow.pdf
aswinisuhu
 
PPTX
Odoo Migration Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
 
PDF
ESUG 2025: Pharo 13 and Beyond (Stephane Ducasse)
ESUG
 
PDF
Instantiations Company Update (ESUG 2025)
ESUG
 
PPTX
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
PDF
chapter 5.pdf cyber security and Internet of things
PalakSharma980227
 
PDF
Australian Enterprises Need Project Service Automation
Navision India
 
PPTX
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
PPTX
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
PPTX
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
PPTX
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
PDF
Windows 10 Professional Preactivated.pdf
asghxhsagxjah
 
PDF
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
Understanding the EU Cyber Resilience Act
ICS
 
How Attendance Management Software is Revolutionizing Education.pdf
Pikmykid
 
SAP GUI Installation Guide for macOS (iOS) | Connect to SAP Systems on Mac
SAP Vista, an A L T Z E N Company
 
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
 
Introduction to Apache Iceberg™ & Tableflow
Alluxio, Inc.
 
How Can Reporting Tools Improve Marketing Performance.pptx
Varsha Nayak
 
Virtual Threads in Java: A New Dimension of Scalability and Performance
Tier1 app
 
custom development enhancement | Togglenow.pdf
aswinisuhu
 
Odoo Migration Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
 
ESUG 2025: Pharo 13 and Beyond (Stephane Ducasse)
ESUG
 
Instantiations Company Update (ESUG 2025)
ESUG
 
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
chapter 5.pdf cyber security and Internet of things
PalakSharma980227
 
Australian Enterprises Need Project Service Automation
Navision India
 
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
Windows 10 Professional Preactivated.pdf
asghxhsagxjah
 
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
Ad

RepreZen DSL: Pushing the limits of language usability with XText