SlideShare a Scribd company logo
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Roberto Cortez, Ivan Junckes Filho
Chasing the RESTful Trinity
Client, CLI and Documentation
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Speakers
Roberto Cortez
● Senior Software Engineer at Tomitribe
● Java Champion & Oracle Groundbreaker
● JUG Leader Coimbra JUG & vJUG
● JNation Conference Founder & Organizer
● Blogger, Youtuber, Speaker
● +10 years of experience with Java
● Software Engineer at Tomitribe
● Oracle Certified Professional
● 9+ years experience with JavaEE
● Eclipse Commiter: JnoSQL, JPA, JSONB
and JSP
Ivan Junckes
● Memberof GUjavaSC
@radcortez @CesarHgt @tomitribehttps://www.tomitribe.com/codeone/dev6016/
Questions?
As soon as you have them!
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Agenda
● REST API Development
● Problems
● Challenges
● Inget
● Future
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
REST API Dominates
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
REST API
● Most projects use REST now
● Stable Standards
● Repetitive
● Plenty of frameworks to use
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Real Case
● Typical project with a REST API
● 2 years work
● 8-10 developers
● 100+ API’s
● CRUDs and Lists
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Result?
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Problems
● Different names to represent the same object
● Some uses prefixes, others don’t
● Different Collection types
● Booleans (is, get, set)
● Enums vs Strings
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Problems
● PUT vs POST
● Read / Create / Update properties
● Return Status Codes?
● Plural or singular names?
● Headers / Path Params / Query Params?
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
And we were still missing...
● Client Libraries
● Documentation
● Command Line
● Versioning
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Challenges
● Producing REST apis is less than half of the work
● Tooling around it is needed
● How are you going to call a service?
● How are you going to document it?
● Do you want to expose it non technical people?
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
More challenges...
1. Microservices evolve too fast
2. Maintenance requires too much effort
3. Changing or adding new interfaces will require changes in all the
tooling around it
4. Documentation is frequently out of date
5. Cost is too high
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
How to solve it
● Generation is the realistic solution
● Tool with Client, CLI and Documentation
● The client will help you call the services from different apps
● The Command-line Interface will help access the services without code
● Your services will have up to date docs
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Benefits
● You only spend time with the things that really affect the business
● You can evolve fast without worrying about the impact in different
toolings
● Less maintenance
● Less cost
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Inget
● Open Source, Apache License
● Code Generator Tool
● Maven Plugin
● Use your own source
● From the model or resources files
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
JavaParser
● Parse
● Analyze
● Transform
● Generate
● Java Code
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
JavaParser
CompilationUnit cu = JavaParser.parse("JavaFilename.java");
ClassOrInterfaceDeclaration klass = cu.getClassByName("ClassName").get();
klass.addField("Date", "date", Modifier.PRIVATE);
klass.addImport("java.util.Date");
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Model
● Amazon style Model
● Separate classes for each operation
● Only expose the fields used
● Annotated Model class to generate required classes
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Demo
Model Generation
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Resources
● Generates interfaces
● JAX-RS Endpoint
● Support for Bulk, Filters and Pagination
● You can add your own endpoints
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Demo
Resources Generation
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Client
● Microprofile Typesafe client implementation
● Deals with everything required to call a resource
● Can be incorporated to other applications
● Works with Basic, Signature and OAuth2 (very soon) authentication
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
BabyStore
Spotify Desktop App
Netflix Web App
client
client
client
Tribestream API Gateway
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Demo
Client Generation
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Command-line Interface
● Airlift / Airline
● Executable binary
● Manual page (Man page)
● SSH Keys
● Easily build scripts to call microservices
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
BabyStore
CLI
Tribestream API Gateway
Command Line Interface (baby)
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Demo
Command Line Generation
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Documentation
● Generates the Open API file (json / yaml)
● Microprofile Open API
● AsciiDoc / Markdown from Open API
● HTML to publish the documentation
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Demo
Documentation Generation
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Limitations
● Requires the initial model
● Lacks configuration
● Additional plugins to generate OpenAPI files and docs
● Missing store for CLI
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
Future
● Generation of clients in other languages
● Generate from openapi file
● Simplify setup
● GraalVM Native Images for CLI
● CLI auto complete
@radcortez @ivanjunckes @tomitribehttps://www.tomitribe.com/codeone/dev6001/
https://www.tomitribe.com/codeone/dev6001
Thank you
Contact us @TOMITRIBE

More Related Content

PDF
Chasing the RESTful Trinity - Client CLI and Documentation
PDF
GraalVM and MicroProfile - A Polyglot Microservices Solution
PDF
React native first impression
PDF
Phpforandroid en
ODP
PHP for Android: prototyping Android apps in php
PPTX
Gear up for Continuous Integration with Salesforce DX, Circle CI and Clayton
PDF
How to Create the API Document from Real API and Localization
PDF
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Chasing the RESTful Trinity - Client CLI and Documentation
GraalVM and MicroProfile - A Polyglot Microservices Solution
React native first impression
Phpforandroid en
PHP for Android: prototyping Android apps in php
Gear up for Continuous Integration with Salesforce DX, Circle CI and Clayton
How to Create the API Document from Real API and Localization
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...

What's hot (20)

PDF
Android clean architecture workshop 3h edition
PDF
Building APIs with the OpenApi Spec
PDF
Laravel 道場帶你看 Laracon AU 2018 - 考察小組心得分享會
PDF
React Native "A Bad Idea Or A Game Changer" at Code Mania 101
PDF
Introduzione a React Native - Facebook Developer Circle Rome
PDF
Automating the API Product Lifecycle
PPTX
What can possibly go wrong if i dont e2 e test my packages?
PDF
Writing REST APIs with OpenAPI and Swagger Ada
PPTX
Laravel, il framework php per gli artigiani del web
PDF
Testing Pyramid
PPTX
Integration of automation framework with ci tools
PDF
Drag and Drop UI Development with React Native
PDF
Developing Apps With React Native
PDF
Designing APIs with OpenAPI Spec
PDF
What's This React Native Thing I Keep Hearing About?
PPTX
Lets cook cucumber !!
PPTX
Building REST APIs with Django
PPTX
45 Tools to Boost Your Front-End
PDF
From git to forge
PDF
Integrating react in django while staying sane and happy
Android clean architecture workshop 3h edition
Building APIs with the OpenApi Spec
Laravel 道場帶你看 Laracon AU 2018 - 考察小組心得分享會
React Native "A Bad Idea Or A Game Changer" at Code Mania 101
Introduzione a React Native - Facebook Developer Circle Rome
Automating the API Product Lifecycle
What can possibly go wrong if i dont e2 e test my packages?
Writing REST APIs with OpenAPI and Swagger Ada
Laravel, il framework php per gli artigiani del web
Testing Pyramid
Integration of automation framework with ci tools
Drag and Drop UI Development with React Native
Developing Apps With React Native
Designing APIs with OpenAPI Spec
What's This React Native Thing I Keep Hearing About?
Lets cook cucumber !!
Building REST APIs with Django
45 Tools to Boost Your Front-End
From git to forge
Integrating react in django while staying sane and happy
Ad

Similar to Resful Trinity Code One - San Francisco (20)

PDF
Creando microservicios con Java y Microprofile - Nicaragua JUG
PDF
Creando microservicios con java micro profile y tomee - CUNORI 2020
PDF
2018 (codeone) Graal VM and MicroProfile a polyglot microservices solution [d...
PDF
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
PDF
2018 (codeone) type safe approach to invoking restful services with microprof...
PDF
Android Services Skill Sprint
PDF
Legacy Code: Evolve or Rewrite?
PDF
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
PDF
Building and deploying AI agents in Java
PDF
Viktor Turskyi "Effective NodeJS Application Development"
PDF
Stackato v6
PDF
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
PPTX
Serverless Single Page Apps with React and Redux at ItCamp 2017
PPTX
Software Engineering in Startups
PPTX
Modern site and teams provisioning across a Bot, SPFx, Azure Function and Mic...
PDF
"The working architecture of NodeJs applications" Viktor Turskyi
PDF
The working architecture of NodeJS applications, Виктор Турский
PDF
The working architecture of node js applications open tech week javascript ...
PPTX
Reactive Micro Services with Java seminar
PDF
Creando microservicios con Java MicroProfile y TomEE - OGBT
Creando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con java micro profile y tomee - CUNORI 2020
2018 (codeone) Graal VM and MicroProfile a polyglot microservices solution [d...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
2018 (codeone) type safe approach to invoking restful services with microprof...
Android Services Skill Sprint
Legacy Code: Evolve or Rewrite?
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Building and deploying AI agents in Java
Viktor Turskyi "Effective NodeJS Application Development"
Stackato v6
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
Serverless Single Page Apps with React and Redux at ItCamp 2017
Software Engineering in Startups
Modern site and teams provisioning across a Bot, SPFx, Azure Function and Mic...
"The working architecture of NodeJs applications" Viktor Turskyi
The working architecture of NodeJS applications, Виктор Турский
The working architecture of node js applications open tech week javascript ...
Reactive Micro Services with Java seminar
Creando microservicios con Java MicroProfile y TomEE - OGBT
Ad

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Tartificialntelligence_presentation.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Encapsulation theory and applications.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
Teaching material agriculture food technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Unlocking AI with Model Context Protocol (MCP)
Tartificialntelligence_presentation.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
A comparative analysis of optical character recognition models for extracting...
Encapsulation theory and applications.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine Learning_overview_presentation.pptx
Getting Started with Data Integration: FME Form 101
Building Integrated photovoltaic BIPV_UPV.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Teaching material agriculture food technology
Empathic Computing: Creating Shared Understanding
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Encapsulation_ Review paper, used for researhc scholars
TLE Review Electricity (Electricity).pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
A comparative study of natural language inference in Swahili using monolingua...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Resful Trinity Code One - San Francisco