SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
Resource-Oriented Architecture
And Why It Matters
And How Waves Make It Easier
dan yoder                      interactive
                                     r&d
          director.hacking
        dan@zeraweb.com
http://twitter.com/dyoder
 http://dev.zeraweb.com/

 AutoCode • Functor • Filebase
Waves • Pages • Hoshi • DateJS
The Web works pretty well.
Web Sites (M)

160




120



         Scalability?
 80

       The Web Has It.
 40




  0
      2005   2006           2007    2008
HTML
      JSON
        CSS
Open? M I M E
      Yep. Mostly, anyway.
       XML
        RSS
       RDF
Existing Infrastructure?
Firewalls, Edge Caches, Proxy Servers, Etc.
But why does it work?
The Web Isn’t MVC
So Why Do We Use It So Often For Web Apps?
http://www.flickr.com/photos/seokchanyun/
RSS: From Blogs To Podcasts
Feed provides RDF-like metadata, media-type
can vary, many different clients.
http://www.flickr.com/photos/abletoven/
login                    get request token
           grant permission               get permission
                              Provider
                                                             Consumer
Resource
                               Proxy
           access resource                 access token




             HTTP Auth                       OAuth




OAuth Smart Proxies
Like firewalls for your apps - implementors don’t
need to add OAuth support directly.
Video Search
Edge caching takes the burden of caching away
from overloaded servers.
http://www.flickr.com/photos/33122834@N06/
Taking a step back ...
ROA Is Just Distributed Objects.
Except based on Fielding’s REST constraints.
ROA Solves An Old Problem.
RPC? CORBA? DCOM? DSOM? RMI? SOA?
http://www.flickr.com/photos/secretlondon/
Learning From Past Mistakes
Be platform neutral.
Don’t assume anything about the format of an
object. Let the client specify it, instead.
http://www.flickr.com/photos/dirigibleduck/
Be Wire Neutral, Too.
Protocols evolve and change. Make it possible to
link to resources using older protocols.
http://www.flickr.com/photos/megans_photography/
Define Meta-Object Protocols
“Uniform stateless interface” means rich
interactions happen on the client.
Don’t Forget Performance.
This means edge caching and pushing
computation out to the client.
http://www.flickr.com/photos/24293932@N00/
Allow Layered Architectures
Proxies and gateways can decouple server
implementations from network policies.
http://www.flickr.com/photos/rengel134/
Waves and ROA ...
Rich DSL for HTTP requests
on( :get, [ ‘location’ ],
  :query => { :lat => /d{4}/, :long => /d{4}/ },
  :accept => [ :json, :xml ] )
But it’s still just Ruby ...
pages $ waves console

Pages::Resources::Story.instance_methods &
  %w( get put post delete )

# => [quot;deletequot;, quot;postquot;, quot;putquot;, quot;getquot;]
Resource Classes

Inheritance. I can now just inherit from a base class to
provide common REST features.
Modularity. Request-handling is broken down into
logically discrete chunks, just like normal classes.
Performance. I don’t have to go through each
possible match - just those for the matching resource.
The One File Waves App

module HelloWorld

  include Waves::Foundations::Compact

  module Resources
    class Map
      on( :get, [] ) { quot;Hello #{query.name}quot;   }
    end
  end

end
Roadmap
# TODO: this is a hack ...
A Resource DSL
class Blog
  include Waves::Resource::Server
  resource :list, :expires => 3.days, [ ‘blogs’ ]  do
    get { model.find_all }
  end
  resource :element, :expires => 3.days, [ ‘blog’, :name ]  do
    get { model.find_by_name( captured.name ) }
  end
  schema :element, [ 'schema', 'blog', '2009-03' ] do
    attributes :title => String, :description => String
    link :entries, :list => Story
  end
  representations :list do
   as :html, :lang => :en do | blogs |
     view( :blog ).list( blogs )
   end
  end
end
Waves::Vitals
 Initial 0.7.0 release Feb 08
 Release 0.8.3 Available Soon!

 Of course, we’re on git.
 http://github.com/waves/stable

 Join Us On Google Groups.
 rubywaves

 irc:freenode.net#waves

 And, lest we forget, a Web site.
 http://rubywaves.com/
Shout Out
polymar, rue, leetspete, kaykay, automatthew,
pascal, copawaves, and many others.
Thanks!

Contenu connexe

Tendances

WEB SOCKET 應用
WEB SOCKET 應用WEB SOCKET 應用
WEB SOCKET 應用
Jerromy Lee
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 
High performance website
High performance websiteHigh performance website
High performance website
Chamnap Chhorn
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
martinlippert
 
JAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScriptJAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScript
martinlippert
 

Tendances (20)

WEB SOCKET 應用
WEB SOCKET 應用WEB SOCKET 應用
WEB SOCKET 應用
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
ClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationClubAJAX Basics - Server Communication
ClubAJAX Basics - Server Communication
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
 
Grokking REST (ZendCon 2010)
Grokking REST (ZendCon 2010)Grokking REST (ZendCon 2010)
Grokking REST (ZendCon 2010)
 
Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4
 
REST in Practice
REST in PracticeREST in Practice
REST in Practice
 
Twitter - Architecture and Scalability lessons
Twitter - Architecture and Scalability lessonsTwitter - Architecture and Scalability lessons
Twitter - Architecture and Scalability lessons
 
WebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceWebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer Conference
 
WebApp #3 : API
WebApp #3 : APIWebApp #3 : API
WebApp #3 : API
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 
Rest api design by george reese
Rest api design by george reeseRest api design by george reese
Rest api design by george reese
 
J web socket
J web socketJ web socket
J web socket
 
React server side rendering performance
React server side rendering performanceReact server side rendering performance
React server side rendering performance
 
Cache Rules Everything Around Me
Cache Rules Everything Around MeCache Rules Everything Around Me
Cache Rules Everything Around Me
 
Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...
Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...
Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...
 
High performance website
High performance websiteHigh performance website
High performance website
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
 
JAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScriptJAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScript
 
Dynamic web pages in java
Dynamic web pages in javaDynamic web pages in java
Dynamic web pages in java
 

En vedette

محاضرة 1 ظل.pps [compatibility mode]
محاضرة 1 ظل.pps [compatibility mode]محاضرة 1 ظل.pps [compatibility mode]
محاضرة 1 ظل.pps [compatibility mode]
freemadoo
 
محاضرة 2 ظل.pps [compatibility mode]
محاضرة 2 ظل.pps [compatibility mode]محاضرة 2 ظل.pps [compatibility mode]
محاضرة 2 ظل.pps [compatibility mode]
freemadoo
 
محاضرة 3 ظل.pps [compatibility mode]
محاضرة 3 ظل.pps [compatibility mode]محاضرة 3 ظل.pps [compatibility mode]
محاضرة 3 ظل.pps [compatibility mode]
freemadoo
 
محاضرة 4 ظل.pps [compatibility mode]
محاضرة 4 ظل.pps [compatibility mode]محاضرة 4 ظل.pps [compatibility mode]
محاضرة 4 ظل.pps [compatibility mode]
freemadoo
 
محاضرة 6 ظل.pps [compatibility mode]
محاضرة 6 ظل.pps [compatibility mode]محاضرة 6 ظل.pps [compatibility mode]
محاضرة 6 ظل.pps [compatibility mode]
freemadoo
 
محاضرة 7ظل.pps [compatibility mode]
محاضرة 7ظل.pps [compatibility mode]محاضرة 7ظل.pps [compatibility mode]
محاضرة 7ظل.pps [compatibility mode]
freemadoo
 
محاضرة 5 ظل.pps [compatibility mode]
محاضرة 5 ظل.pps [compatibility mode]محاضرة 5 ظل.pps [compatibility mode]
محاضرة 5 ظل.pps [compatibility mode]
freemadoo
 
الفراغات المعماريه للعرض.Ppt [compatibility mode]
الفراغات المعماريه للعرض.Ppt [compatibility mode]الفراغات المعماريه للعرض.Ppt [compatibility mode]
الفراغات المعماريه للعرض.Ppt [compatibility mode]
freemadoo
 
Qnh Performance Management V2 5
Qnh Performance Management V2 5Qnh Performance Management V2 5
Qnh Performance Management V2 5
guest712728
 
Pro JavaScript Design Patterns
Pro JavaScript Design PatternsPro JavaScript Design Patterns
Pro JavaScript Design Patterns
chenwei
 

En vedette (20)

محاضرة 1 ظل.pps [compatibility mode]
محاضرة 1 ظل.pps [compatibility mode]محاضرة 1 ظل.pps [compatibility mode]
محاضرة 1 ظل.pps [compatibility mode]
 
محاضرة 2 ظل.pps [compatibility mode]
محاضرة 2 ظل.pps [compatibility mode]محاضرة 2 ظل.pps [compatibility mode]
محاضرة 2 ظل.pps [compatibility mode]
 
محاضرة 3 ظل.pps [compatibility mode]
محاضرة 3 ظل.pps [compatibility mode]محاضرة 3 ظل.pps [compatibility mode]
محاضرة 3 ظل.pps [compatibility mode]
 
محاضرة 4 ظل.pps [compatibility mode]
محاضرة 4 ظل.pps [compatibility mode]محاضرة 4 ظل.pps [compatibility mode]
محاضرة 4 ظل.pps [compatibility mode]
 
محاضرة 6 ظل.pps [compatibility mode]
محاضرة 6 ظل.pps [compatibility mode]محاضرة 6 ظل.pps [compatibility mode]
محاضرة 6 ظل.pps [compatibility mode]
 
SD-WAN Architecture Matters - Dr. Jim Metzler & VeloCloud
SD-WAN Architecture Matters - Dr. Jim Metzler & VeloCloudSD-WAN Architecture Matters - Dr. Jim Metzler & VeloCloud
SD-WAN Architecture Matters - Dr. Jim Metzler & VeloCloud
 
محاضرة 7ظل.pps [compatibility mode]
محاضرة 7ظل.pps [compatibility mode]محاضرة 7ظل.pps [compatibility mode]
محاضرة 7ظل.pps [compatibility mode]
 
محاضرة 5 ظل.pps [compatibility mode]
محاضرة 5 ظل.pps [compatibility mode]محاضرة 5 ظل.pps [compatibility mode]
محاضرة 5 ظل.pps [compatibility mode]
 
Why Architecture in Web Development matters
Why Architecture in Web Development mattersWhy Architecture in Web Development matters
Why Architecture in Web Development matters
 
الفراغات المعماريه للعرض.Ppt [compatibility mode]
الفراغات المعماريه للعرض.Ppt [compatibility mode]الفراغات المعماريه للعرض.Ppt [compatibility mode]
الفراغات المعماريه للعرض.Ppt [compatibility mode]
 
Design with nature review
Design with nature reviewDesign with nature review
Design with nature review
 
بحث عن المباني الثقافية والترفيهية - نظريات عمارة1
بحث عن المباني الثقافية والترفيهية - نظريات عمارة1بحث عن المباني الثقافية والترفيهية - نظريات عمارة1
بحث عن المباني الثقافية والترفيهية - نظريات عمارة1
 
101 Things I Learned In Interaction Design School - Web Directions South
101 Things I Learned In Interaction Design School - Web Directions South101 Things I Learned In Interaction Design School - Web Directions South
101 Things I Learned In Interaction Design School - Web Directions South
 
2ScsT141b
2ScsT141b2ScsT141b
2ScsT141b
 
Wacom event report 2007 - early 2008
Wacom event report 2007 - early 2008Wacom event report 2007 - early 2008
Wacom event report 2007 - early 2008
 
Qnh Performance Management V2 5
Qnh Performance Management V2 5Qnh Performance Management V2 5
Qnh Performance Management V2 5
 
Arcticfilm: time of Polar countries
Arcticfilm: time of Polar countriesArcticfilm: time of Polar countries
Arcticfilm: time of Polar countries
 
Pro JavaScript Design Patterns
Pro JavaScript Design PatternsPro JavaScript Design Patterns
Pro JavaScript Design Patterns
 
evoloop - Company Profile
evoloop - Company Profileevoloop - Company Profile
evoloop - Company Profile
 
Hashtag Marketing by Amex
Hashtag Marketing by Amex Hashtag Marketing by Amex
Hashtag Marketing by Amex
 

Similaire à LA RubyConf 2009 Waves And Resource-Oriented Architecture

NU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web PerformanceNU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web Performance
Lee Roberson
 
Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29
Alexandre Morgaut
 
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampDoing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Chris Love
 

Similaire à LA RubyConf 2009 Waves And Resource-Oriented Architecture (20)

Decoupled cms sunshinephp 2014
Decoupled cms sunshinephp 2014Decoupled cms sunshinephp 2014
Decoupled cms sunshinephp 2014
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Robotlegs on Top of Gaia
Robotlegs on Top of GaiaRobotlegs on Top of Gaia
Robotlegs on Top of Gaia
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Wicket Web Framework 101
Wicket Web Framework 101Wicket Web Framework 101
Wicket Web Framework 101
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
 
NU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web PerformanceNU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web Performance
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
 
Connect js nodejs_api_shubhra
Connect js nodejs_api_shubhraConnect js nodejs_api_shubhra
Connect js nodejs_api_shubhra
 
ReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... YawnReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... Yawn
 
Server rendering-talk
Server rendering-talkServer rendering-talk
Server rendering-talk
 
Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig Presentation
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Today
 
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampDoing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
 
RESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web DesignRESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web Design
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

LA RubyConf 2009 Waves And Resource-Oriented Architecture

  • 1. Resource-Oriented Architecture And Why It Matters And How Waves Make It Easier
  • 2. dan yoder interactive r&d director.hacking dan@zeraweb.com http://twitter.com/dyoder http://dev.zeraweb.com/ AutoCode • Functor • Filebase Waves • Pages • Hoshi • DateJS
  • 3. The Web works pretty well.
  • 4. Web Sites (M) 160 120 Scalability? 80 The Web Has It. 40 0 2005 2006 2007 2008
  • 5. HTML JSON CSS Open? M I M E Yep. Mostly, anyway. XML RSS RDF
  • 6. Existing Infrastructure? Firewalls, Edge Caches, Proxy Servers, Etc.
  • 7. But why does it work?
  • 8. The Web Isn’t MVC So Why Do We Use It So Often For Web Apps? http://www.flickr.com/photos/seokchanyun/
  • 9. RSS: From Blogs To Podcasts Feed provides RDF-like metadata, media-type can vary, many different clients. http://www.flickr.com/photos/abletoven/
  • 10. login get request token grant permission get permission Provider Consumer Resource Proxy access resource access token HTTP Auth OAuth OAuth Smart Proxies Like firewalls for your apps - implementors don’t need to add OAuth support directly.
  • 11. Video Search Edge caching takes the burden of caching away from overloaded servers. http://www.flickr.com/photos/33122834@N06/
  • 12. Taking a step back ...
  • 13. ROA Is Just Distributed Objects. Except based on Fielding’s REST constraints.
  • 14. ROA Solves An Old Problem. RPC? CORBA? DCOM? DSOM? RMI? SOA? http://www.flickr.com/photos/secretlondon/
  • 15. Learning From Past Mistakes
  • 16. Be platform neutral. Don’t assume anything about the format of an object. Let the client specify it, instead. http://www.flickr.com/photos/dirigibleduck/
  • 17. Be Wire Neutral, Too. Protocols evolve and change. Make it possible to link to resources using older protocols. http://www.flickr.com/photos/megans_photography/
  • 18. Define Meta-Object Protocols “Uniform stateless interface” means rich interactions happen on the client.
  • 19. Don’t Forget Performance. This means edge caching and pushing computation out to the client. http://www.flickr.com/photos/24293932@N00/
  • 20. Allow Layered Architectures Proxies and gateways can decouple server implementations from network policies. http://www.flickr.com/photos/rengel134/
  • 22. Rich DSL for HTTP requests on( :get, [ ‘location’ ], :query => { :lat => /d{4}/, :long => /d{4}/ }, :accept => [ :json, :xml ] )
  • 23. But it’s still just Ruby ... pages $ waves console Pages::Resources::Story.instance_methods & %w( get put post delete ) # => [quot;deletequot;, quot;postquot;, quot;putquot;, quot;getquot;]
  • 24. Resource Classes Inheritance. I can now just inherit from a base class to provide common REST features. Modularity. Request-handling is broken down into logically discrete chunks, just like normal classes. Performance. I don’t have to go through each possible match - just those for the matching resource.
  • 25. The One File Waves App module HelloWorld include Waves::Foundations::Compact module Resources class Map on( :get, [] ) { quot;Hello #{query.name}quot; } end end end
  • 26. Roadmap # TODO: this is a hack ...
  • 27. A Resource DSL class Blog include Waves::Resource::Server   resource :list, :expires => 3.days, [ ‘blogs’ ]  do     get { model.find_all }   end   resource :element, :expires => 3.days, [ ‘blog’, :name ]  do     get { model.find_by_name( captured.name ) }   end   schema :element, [ 'schema', 'blog', '2009-03' ] do     attributes :title => String, :description => String     link :entries, :list => Story   end   representations :list do    as :html, :lang => :en do | blogs |      view( :blog ).list( blogs )    end   end end
  • 28. Waves::Vitals Initial 0.7.0 release Feb 08 Release 0.8.3 Available Soon! Of course, we’re on git. http://github.com/waves/stable Join Us On Google Groups. rubywaves irc:freenode.net#waves And, lest we forget, a Web site. http://rubywaves.com/
  • 29. Shout Out polymar, rue, leetspete, kaykay, automatthew, pascal, copawaves, and many others.