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
36
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
Transcript
20 slides
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!
More Decks by Keshav Biswa
See All by Keshav Biswa
From Curiosity To Confusion
keshavbiswa
0
28
Journey of writing a programming language
keshavbiswa
0
180
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Faster Mobile Websites
deanohume
310
32k
Speed Design
sergeychernyshev
33
2.2k
Ethics towards AI in product and experience design
skipperchong
2
460
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Odyssey Design
rkendrick25
PRO
3
940
Technical Leadership for Architectural Decision Making
baasie
4
640
The Cult of Friendly URLs
andyhume
79
7.1k
Statistics for Hackers
jakevdp
799
230k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k