Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Designing Web Services using ActiveResource
Search
Keshav Biswa
June 23, 2024
34
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Designing Web Services using ActiveResource
Keshav Biswa
June 23, 2024
More Decks by Keshav Biswa
See All by Keshav Biswa
From Curiosity To Confusion
keshavbiswa
0
26
Journey of writing a programming language
keshavbiswa
0
180
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
We Are The Robots
honzajavorek
0
400
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
WCS-LA-2024
lcolladotor
0
890
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
New Earth Scene 8
popppiees
4
2.7k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
600
Marketing to machines
jonoalderson
1
5.9k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Building an army of robots
kneath
307
47k
Transcript
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 Designing Web services using ActiveResource Keshav Biswa Senior
Software Engineer at Saeloun
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 I’m a Senior Software Engineer at Saeloun. •
Working with Ruby since 2018 • Have worked with multiple frameworks and languages • Open source Enthusiast About Me
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 ActiveResource: Connect Business Objects and REST Web Services
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 • Wrapper to your external API services •
Provides ORMs functionalities • Easy to configure • Provides Authentication Support ActiveResource https://www.youtube.com/watch?v=hdHjjBS4cs8
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 Why ActiveResource?
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 • Custom JSON responses • No Validations •
Same logic everywhere • Custom HTTP clients • No Structure The Issue
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 The Issue
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 Solution: Virtual Model? • ActiveModel • Validations •
Provide attributes • Provides Structure
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 HTTP Client and Virtual Model
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 Final Solution: ActiveResource
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 Configurable
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 Associations:
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 • Parses the code with the grammar •
Creates an AST • Evaluates AST • Adds to the context • Returns the context Validations
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 Validations
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 For external HTTP REST services
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 For external HTTP REST services
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 Treetop
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 Other Features • Instrumentation and Logging • Callbacks
• Custom Collection Parsing • HTTPMock (ActiveResource::HTTPMock)
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 RESOURCES To understand more about parsers, compilers, ASTs:
• https://github.com/rails/activeresource • https://github.com/keshavbiswa/active-resource-github-dashboard (Github Dashboard) • https://github.com/keshavbiswa/activeresource-blog-api (Blog API) • https://github.com/keshavbiswa/active-resource-blog-client
https://github.com/keshavbiswa https://twitter.com/keshavbiswa21 Any questions? THANKS!