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/
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/
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
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/