SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
APIs/Services for
  Mobile Apps
     (in Ruby)

   Andrei Navarro
Background
● Web development for Startups
  ○ Web Products (w/ APIs)
● .NET, PHP, Ruby (Rails, Ramaze)
● Currently:
  ○ Tech Guy at Scrambled Eggs
  ○ Faculty at Ateneo de Manila
● PHRUG, Startup Weekend
● Geekcamp
History
● 80 - 90s: Computers for "Business" use
● 90s - Early 00s: "dotcom" era; ecommerce
  ○ Web TV
● Mid 00s: "Web 2.0"
History
Recent Years
● Late 00s - 10s: Mobile Era
  ○   Faster mobile internet speed
  ○   Easier access to devices
  ○   Exponential growth in users
  ○   "App" Era
● People becoming App developers instead of
  going into Web
Mobile Apps need Web
● Web developers are still relevant
  ○ Need to provide data/interconnectedness to mobile
    apps
  ○ Moving from Application layer to
    Presentation/Session layer
Similarities with RIA
● Javascript/AJAX makes requests to your
  backend -- which is connected to your
  database
AJAX architecture
Quick Story (Amundsen vs Scott)
● The Antarctic Race
  ○ http://www.slideshare.net/apigee/amundsens-dogs-
    information-halos-and-apis
● Apps are the "South Pole"
● Native Wisdom: Your APIs support and
  strengthen your mobile apps (whether built
  by yourself or by a developer community)
Mobile App Data Architecture
Building APIs
● Just like any other web app
  ○ no view layer (HTML/CSS/JS)
  ○ apps "view" your API
● Transfer is via HTTP/HTTPS
● Plan your format
  ○ JSON, XML, SOAP etc.
  ○ REST/RPC?
  ○ Parsing capability on client end
● Scalability
● Sessions and Authentication
  ○ token-based
  ○ header-based
  ○ devise
Design-by-Contract
● Define your "interface" that will supply the
  mobile app with JSON/XML data
   ○ use mocks!
● When building your API, conform to that
  interface
● Allows parallelization of development
Testing
● Web apps are tested on a browser
● APIs ultimate test is on the target clients
● Development usually happens in parallel --
  and you need to validate your API works
  before app is completed
  ○ rest-client gem
  ○ rest-client chrome/firefox extensions
Building it with Rails
● Rails already supports RESTful architecture
● Rails already supports multiple formats
● Can use RSpec/Test::Unit to validate API
  requests
● Variety of existing gems already tested and
  well integrated with Rails
Issues with Rails
● Issues for APIs (not in general)
● Adds a lot of dependencies that aren't
  needed for your purpose
  ○ Wasted memory
● Cherry pick middleware and modules from
  the stack
  ○ hassle.
● Others
  ○ http://engineering.gomiso.com/2011/05/16/if-youre-
    using-to_json-youre-doing-it-wrong/
Some solutions
● RABL (Ruby API builder language)
  ○ https://github.com/nesquena/rabl
● Rails-API
  ○ https://github.com/rails-api/rails-api
  ○ a subset of rails specifically for building APIs
Microframeworks
● Much lighter than Rails
  ○   Sinatra/Padrino
  ○   Ramaze
  ○   Merb
  ○   Camping
● Build only what you need
  ○ smaller footprint
● You'll need to know Ruby well
  ○ that's actually a good thing
Grape Framework
● https://github.com/intridea/grape
● From Intridea, creators of OmniAuth
● "An opinionated microframework for creating
  REST-like APIs in Ruby"

Generalized
Rapid
API
Erector
Grape Framework
Grape Framework
● Rack-based
   ○ easy deployment over passenger
   ○ run via config.ru
   ○ can sit alongside your Rails app
     ■ mount My::API in config/routes.rb
● Different content-types supported
● Fun HTTP stuff (headers, verbs, status
  codes etc)
● Entities: grouping/presenting your data into
  "Models"
● Killer feature: API versioning
API Versioning
Traditional Web Development
API Versioning
● Support several versions of Mobile apps
  ○ up to client/user to update
● App store problem
  ○ Dev
  ○ Staging
    ■ App store staging
  ○ Production
    ■ App store production
API Versioning
Recommendations
● MVC-ize your application
  ○ It's just good design.
● Use Devise/Omniauth for authentication
  ○ token-based authentication
● Use oj gem for JSON
  ○ https://github.com/ohler55/oj
  ○ faster Json parser/encoder compared to native ruby
    JSON parsing
● Use ox gem for XML
Questions?
 @dreinavarro

Weitere ähnliche Inhalte

Was ist angesagt?

Everything you need to know about mern stack programming
Everything you need to know about mern stack programmingEverything you need to know about mern stack programming
Everything you need to know about mern stack programmingJAMESJOHN130
 
Intro to Lightning Web Components
Intro to Lightning Web ComponentsIntro to Lightning Web Components
Intro to Lightning Web ComponentsCalvin LaBelle
 
Getting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | SalesforceGetting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | SalesforceRahul Malhotra
 
Product Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsProduct Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsSandeep Adwankar
 
Decoupled Drupal: What This Means for Developers
Decoupled Drupal: What This Means for DevelopersDecoupled Drupal: What This Means for Developers
Decoupled Drupal: What This Means for DevelopersAcquia
 
Boston, MA Developer Group 2/7/2019 - Introduction to lightning web components
Boston, MA Developer Group 2/7/2019 - Introduction to lightning web componentsBoston, MA Developer Group 2/7/2019 - Introduction to lightning web components
Boston, MA Developer Group 2/7/2019 - Introduction to lightning web componentsBingWang77
 
Introduction to Modern and Emerging Web Technologies
Introduction to Modern and Emerging Web TechnologiesIntroduction to Modern and Emerging Web Technologies
Introduction to Modern and Emerging Web TechnologiesSuresh Patidar
 
Website development & it's trends
Website development & it's trendsWebsite development & it's trends
Website development & it's trendsSunCart Store
 
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...CodeValue
 
10 top web development frameworks (new version 21 11)
10 top web development frameworks (new version 21 11)10 top web development frameworks (new version 21 11)
10 top web development frameworks (new version 21 11)Mandar Majmudar
 
Top Web Development Frameworks Comparison: All You Need To Know
Top Web Development Frameworks Comparison: All You Need To KnowTop Web Development Frameworks Comparison: All You Need To Know
Top Web Development Frameworks Comparison: All You Need To KnowPixel Crayons
 
Intro to lwc - dev week slides
Intro to lwc - dev week slidesIntro to lwc - dev week slides
Intro to lwc - dev week slidesSara Sali
 
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"Frank Wienberg
 
Silverlight - What Is It And How Can We Use It
Silverlight - What Is It And How Can We Use ItSilverlight - What Is It And How Can We Use It
Silverlight - What Is It And How Can We Use ItVenketash (Pat) Ramadass
 
Silverlight abhinav - slideshare
Silverlight   abhinav - slideshareSilverlight   abhinav - slideshare
Silverlight abhinav - slideshareabhinav4133
 
Exciting features in visual studio 2017
Exciting features in visual studio 2017Exciting features in visual studio 2017
Exciting features in visual studio 2017Md. Mahedee Hasan
 
Migrating to HTML5, Migrating Silverlight to HTML5, Migration Applications t...
Migrating to HTML5,  Migrating Silverlight to HTML5, Migration Applications t...Migrating to HTML5,  Migrating Silverlight to HTML5, Migration Applications t...
Migrating to HTML5, Migrating Silverlight to HTML5, Migration Applications t...Idexcel Technologies
 
Top 5 Front End Development Tools For 2021
Top 5 Front End Development Tools For 2021Top 5 Front End Development Tools For 2021
Top 5 Front End Development Tools For 2021ForceBolt
 

Was ist angesagt? (19)

Everything you need to know about mern stack programming
Everything you need to know about mern stack programmingEverything you need to know about mern stack programming
Everything you need to know about mern stack programming
 
Intro to Lightning Web Components
Intro to Lightning Web ComponentsIntro to Lightning Web Components
Intro to Lightning Web Components
 
Getting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | SalesforceGetting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | Salesforce
 
Product Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical SkillsProduct Camp Silicon Valley 2018 - PM Technical Skills
Product Camp Silicon Valley 2018 - PM Technical Skills
 
Decoupled Drupal: What This Means for Developers
Decoupled Drupal: What This Means for DevelopersDecoupled Drupal: What This Means for Developers
Decoupled Drupal: What This Means for Developers
 
Boston, MA Developer Group 2/7/2019 - Introduction to lightning web components
Boston, MA Developer Group 2/7/2019 - Introduction to lightning web componentsBoston, MA Developer Group 2/7/2019 - Introduction to lightning web components
Boston, MA Developer Group 2/7/2019 - Introduction to lightning web components
 
Introduction to Modern and Emerging Web Technologies
Introduction to Modern and Emerging Web TechnologiesIntroduction to Modern and Emerging Web Technologies
Introduction to Modern and Emerging Web Technologies
 
Website development & it's trends
Website development & it's trendsWebsite development & it's trends
Website development & it's trends
 
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
 
10 top web development frameworks (new version 21 11)
10 top web development frameworks (new version 21 11)10 top web development frameworks (new version 21 11)
10 top web development frameworks (new version 21 11)
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
 
Top Web Development Frameworks Comparison: All You Need To Know
Top Web Development Frameworks Comparison: All You Need To KnowTop Web Development Frameworks Comparison: All You Need To Know
Top Web Development Frameworks Comparison: All You Need To Know
 
Intro to lwc - dev week slides
Intro to lwc - dev week slidesIntro to lwc - dev week slides
Intro to lwc - dev week slides
 
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
 
Silverlight - What Is It And How Can We Use It
Silverlight - What Is It And How Can We Use ItSilverlight - What Is It And How Can We Use It
Silverlight - What Is It And How Can We Use It
 
Silverlight abhinav - slideshare
Silverlight   abhinav - slideshareSilverlight   abhinav - slideshare
Silverlight abhinav - slideshare
 
Exciting features in visual studio 2017
Exciting features in visual studio 2017Exciting features in visual studio 2017
Exciting features in visual studio 2017
 
Migrating to HTML5, Migrating Silverlight to HTML5, Migration Applications t...
Migrating to HTML5,  Migrating Silverlight to HTML5, Migration Applications t...Migrating to HTML5,  Migrating Silverlight to HTML5, Migration Applications t...
Migrating to HTML5, Migrating Silverlight to HTML5, Migration Applications t...
 
Top 5 Front End Development Tools For 2021
Top 5 Front End Development Tools For 2021Top 5 Front End Development Tools For 2021
Top 5 Front End Development Tools For 2021
 

Andere mochten auch

Creating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFCreating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFdonaldlsmithjr
 
Building a repository of biomedical ontologies with Neo4j
Building a repository of biomedical ontologies with Neo4jBuilding a repository of biomedical ontologies with Neo4j
Building a repository of biomedical ontologies with Neo4jSimon Jupp
 
JSON Schema: Your API's Secret Weapon
JSON Schema: Your API's Secret WeaponJSON Schema: Your API's Secret Weapon
JSON Schema: Your API's Secret WeaponPete Gamache
 
Managing Genetic Ancestry at Scale with Neo4j and Kafka - StampedeCon 2015
Managing Genetic Ancestry at Scale with Neo4j and Kafka - StampedeCon 2015Managing Genetic Ancestry at Scale with Neo4j and Kafka - StampedeCon 2015
Managing Genetic Ancestry at Scale with Neo4j and Kafka - StampedeCon 2015StampedeCon
 
Neo4j - 5 cool graph examples
Neo4j - 5 cool graph examplesNeo4j - 5 cool graph examples
Neo4j - 5 cool graph examplesPeter Neubauer
 

Andere mochten auch (7)

Creating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFCreating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDF
 
Introdução ao Neo4j
Introdução ao Neo4jIntrodução ao Neo4j
Introdução ao Neo4j
 
Building a repository of biomedical ontologies with Neo4j
Building a repository of biomedical ontologies with Neo4jBuilding a repository of biomedical ontologies with Neo4j
Building a repository of biomedical ontologies with Neo4j
 
JSON Schema: Your API's Secret Weapon
JSON Schema: Your API's Secret WeaponJSON Schema: Your API's Secret Weapon
JSON Schema: Your API's Secret Weapon
 
Managing Genetic Ancestry at Scale with Neo4j and Kafka - StampedeCon 2015
Managing Genetic Ancestry at Scale with Neo4j and Kafka - StampedeCon 2015Managing Genetic Ancestry at Scale with Neo4j and Kafka - StampedeCon 2015
Managing Genetic Ancestry at Scale with Neo4j and Kafka - StampedeCon 2015
 
Neo4j - 5 cool graph examples
Neo4j - 5 cool graph examplesNeo4j - 5 cool graph examples
Neo4j - 5 cool graph examples
 
Models for hierarchical data
Models for hierarchical dataModels for hierarchical data
Models for hierarchical data
 

Ähnlich wie APIs for mobile

Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Kazuhiro Ogura
 
Refactoring to a Single Page Application
Refactoring to a Single Page ApplicationRefactoring to a Single Page Application
Refactoring to a Single Page ApplicationCodemotion
 
GlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices togetherGlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices togetherRestlet
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An OverviewNaveen Pete
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneursRodrigo Gil
 
Defrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIs
Defrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIsDefrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIs
Defrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIsRestlet
 
QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...
QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...
QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...Restlet
 
Progressive web applications
Progressive web applicationsProgressive web applications
Progressive web applicationsTom Martin
 
Client vs Server Templating: Speed up initial load for SPA with Angular as an...
Client vs Server Templating: Speed up initial load for SPA with Angular as an...Client vs Server Templating: Speed up initial load for SPA with Angular as an...
Client vs Server Templating: Speed up initial load for SPA with Angular as an...David Amend
 
Rho mobile v4 - DroidCon Paris 18 june 2013
Rho mobile v4 - DroidCon Paris 18 june 2013Rho mobile v4 - DroidCon Paris 18 june 2013
Rho mobile v4 - DroidCon Paris 18 june 2013Paris Android User Group
 
Hybridmobileapps 130130213844-phpapp02
Hybridmobileapps 130130213844-phpapp02Hybridmobileapps 130130213844-phpapp02
Hybridmobileapps 130130213844-phpapp02weeyee
 
SumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststemSumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststemSumit Kataria
 
From RPG OA to Node.js: Approaches to Application Modernization - Greg Patterson
From RPG OA to Node.js: Approaches to Application Modernization - Greg PattersonFrom RPG OA to Node.js: Approaches to Application Modernization - Greg Patterson
From RPG OA to Node.js: Approaches to Application Modernization - Greg PattersonFresche Solutions
 
Android Development...Using Web Technologies
Android Development...Using Web TechnologiesAndroid Development...Using Web Technologies
Android Development...Using Web TechnologiesCommonsWare
 
Creating a custom API for a headless Drupal
Creating a custom API for a headless DrupalCreating a custom API for a headless Drupal
Creating a custom API for a headless DrupalExove
 
The Importance Things of Full Stack Development
The Importance Things of Full Stack DevelopmentThe Importance Things of Full Stack Development
The Importance Things of Full Stack DevelopmentMike Taylor
 
Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3Dobrica Pavlinušić
 
Google App Engine Overview and Update
Google App Engine Overview and UpdateGoogle App Engine Overview and Update
Google App Engine Overview and UpdateChris Schalk
 

Ähnlich wie APIs for mobile (20)

Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)
 
Refactoring to a SPA
Refactoring to a SPARefactoring to a SPA
Refactoring to a SPA
 
Refactoring to a Single Page Application
Refactoring to a Single Page ApplicationRefactoring to a Single Page Application
Refactoring to a Single Page Application
 
GlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices togetherGlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices together
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An Overview
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
 
Defrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIs
Defrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIsDefrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIs
Defrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIs
 
QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...
QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...
QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks ...
 
Webdevelopment
WebdevelopmentWebdevelopment
Webdevelopment
 
Progressive web applications
Progressive web applicationsProgressive web applications
Progressive web applications
 
Client vs Server Templating: Speed up initial load for SPA with Angular as an...
Client vs Server Templating: Speed up initial load for SPA with Angular as an...Client vs Server Templating: Speed up initial load for SPA with Angular as an...
Client vs Server Templating: Speed up initial load for SPA with Angular as an...
 
Rho mobile v4 - DroidCon Paris 18 june 2013
Rho mobile v4 - DroidCon Paris 18 june 2013Rho mobile v4 - DroidCon Paris 18 june 2013
Rho mobile v4 - DroidCon Paris 18 june 2013
 
Hybridmobileapps 130130213844-phpapp02
Hybridmobileapps 130130213844-phpapp02Hybridmobileapps 130130213844-phpapp02
Hybridmobileapps 130130213844-phpapp02
 
SumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststemSumitK's mobile app dev using drupal as base ststem
SumitK's mobile app dev using drupal as base ststem
 
From RPG OA to Node.js: Approaches to Application Modernization - Greg Patterson
From RPG OA to Node.js: Approaches to Application Modernization - Greg PattersonFrom RPG OA to Node.js: Approaches to Application Modernization - Greg Patterson
From RPG OA to Node.js: Approaches to Application Modernization - Greg Patterson
 
Android Development...Using Web Technologies
Android Development...Using Web TechnologiesAndroid Development...Using Web Technologies
Android Development...Using Web Technologies
 
Creating a custom API for a headless Drupal
Creating a custom API for a headless DrupalCreating a custom API for a headless Drupal
Creating a custom API for a headless Drupal
 
The Importance Things of Full Stack Development
The Importance Things of Full Stack DevelopmentThe Importance Things of Full Stack Development
The Importance Things of Full Stack Development
 
Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3
 
Google App Engine Overview and Update
Google App Engine Overview and UpdateGoogle App Engine Overview and Update
Google App Engine Overview and Update
 

Kürzlich hochgeladen

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Kürzlich hochgeladen (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

APIs for mobile

  • 1. APIs/Services for Mobile Apps (in Ruby) Andrei Navarro
  • 2. Background ● Web development for Startups ○ Web Products (w/ APIs) ● .NET, PHP, Ruby (Rails, Ramaze) ● Currently: ○ Tech Guy at Scrambled Eggs ○ Faculty at Ateneo de Manila ● PHRUG, Startup Weekend ● Geekcamp
  • 3. History ● 80 - 90s: Computers for "Business" use ● 90s - Early 00s: "dotcom" era; ecommerce ○ Web TV ● Mid 00s: "Web 2.0"
  • 5. Recent Years ● Late 00s - 10s: Mobile Era ○ Faster mobile internet speed ○ Easier access to devices ○ Exponential growth in users ○ "App" Era ● People becoming App developers instead of going into Web
  • 6. Mobile Apps need Web ● Web developers are still relevant ○ Need to provide data/interconnectedness to mobile apps ○ Moving from Application layer to Presentation/Session layer
  • 7. Similarities with RIA ● Javascript/AJAX makes requests to your backend -- which is connected to your database
  • 9. Quick Story (Amundsen vs Scott) ● The Antarctic Race ○ http://www.slideshare.net/apigee/amundsens-dogs- information-halos-and-apis ● Apps are the "South Pole" ● Native Wisdom: Your APIs support and strengthen your mobile apps (whether built by yourself or by a developer community)
  • 10. Mobile App Data Architecture
  • 11. Building APIs ● Just like any other web app ○ no view layer (HTML/CSS/JS) ○ apps "view" your API ● Transfer is via HTTP/HTTPS ● Plan your format ○ JSON, XML, SOAP etc. ○ REST/RPC? ○ Parsing capability on client end ● Scalability ● Sessions and Authentication ○ token-based ○ header-based ○ devise
  • 12. Design-by-Contract ● Define your "interface" that will supply the mobile app with JSON/XML data ○ use mocks! ● When building your API, conform to that interface ● Allows parallelization of development
  • 13. Testing ● Web apps are tested on a browser ● APIs ultimate test is on the target clients ● Development usually happens in parallel -- and you need to validate your API works before app is completed ○ rest-client gem ○ rest-client chrome/firefox extensions
  • 14. Building it with Rails ● Rails already supports RESTful architecture ● Rails already supports multiple formats ● Can use RSpec/Test::Unit to validate API requests ● Variety of existing gems already tested and well integrated with Rails
  • 15. Issues with Rails ● Issues for APIs (not in general) ● Adds a lot of dependencies that aren't needed for your purpose ○ Wasted memory ● Cherry pick middleware and modules from the stack ○ hassle. ● Others ○ http://engineering.gomiso.com/2011/05/16/if-youre- using-to_json-youre-doing-it-wrong/
  • 16. Some solutions ● RABL (Ruby API builder language) ○ https://github.com/nesquena/rabl ● Rails-API ○ https://github.com/rails-api/rails-api ○ a subset of rails specifically for building APIs
  • 17. Microframeworks ● Much lighter than Rails ○ Sinatra/Padrino ○ Ramaze ○ Merb ○ Camping ● Build only what you need ○ smaller footprint ● You'll need to know Ruby well ○ that's actually a good thing
  • 18. Grape Framework ● https://github.com/intridea/grape ● From Intridea, creators of OmniAuth ● "An opinionated microframework for creating REST-like APIs in Ruby" Generalized Rapid API Erector
  • 20. Grape Framework ● Rack-based ○ easy deployment over passenger ○ run via config.ru ○ can sit alongside your Rails app ■ mount My::API in config/routes.rb ● Different content-types supported ● Fun HTTP stuff (headers, verbs, status codes etc) ● Entities: grouping/presenting your data into "Models" ● Killer feature: API versioning
  • 22. API Versioning ● Support several versions of Mobile apps ○ up to client/user to update ● App store problem ○ Dev ○ Staging ■ App store staging ○ Production ■ App store production
  • 24. Recommendations ● MVC-ize your application ○ It's just good design. ● Use Devise/Omniauth for authentication ○ token-based authentication ● Use oj gem for JSON ○ https://github.com/ohler55/oj ○ faster Json parser/encoder compared to native ruby JSON parsing ● Use ox gem for XML