2. URL vs. URI
• URl is a resource, that asks for action
• URL is a file or a single item that is
stateless
3. URL vs. URI
• URl is a resource, that asks for action
http://www.lassosoft.com/home/
• URL is a file or a single item that is
stateless
4. URL vs. URI
• URl is a resource, that asks for action
http://www.lassosoft.com/home/
• URL is a file or a single item that is
stateless
http://www.lassosoft.com/
LassoSoft_Logo.png
5. URL vs. URI
• URl is a resource, that asks for action
• URL is a file or a single item that is
stateless
6. Handling vs. Rewriting
vs. Redirecting
• Handling is conceptually parsing a URI to
see what application components to call to
provide a resource.
•
•
7. Handling vs. Rewriting
vs. Redirecting
• Handling is conceptually parsing a URI to
see what application components to call to
provide a resource.
• Rewriting is altering a URL to another one
before it even hits the application stack.
8. Handling vs. Rewriting
vs. Redirecting
• Handling is conceptually parsing a URI to
see what application components to call to
provide a resource.
• Rewriting is altering a URL to another one
before it even hits the application stack.
• Redirecting is capturing a request for a URI
or URL and sending a different one in lieu.
13. REST
• Really, what it's about is using the true
potential of HTTP.
• In a RESTful application you'll never modify
data using a GET request.
• resources being manipulated using a
common set of verbs
• the actual representation retrieved for a
resource is dependent on the request and
not the identifier
14. SOAP RPC
• SOAP RPC over HTTP, on the other hand,
encourages each application designer to
define a new and arbitrary vocabulary of
nouns and verbs
• getUsers(), savePurchaseOrder(...)
15. YUCK
• There’s a better way, writing RESTful apps.
• Think of each page as a service that
responds to requests instead of as a web
page.
16. http verbs in REST
• Get • Remember Fielding
http://roy.gbiv.com/
• Post Co-founder VP
Apache project.
• Put
• Delete
17. Developng RESTful
URIs
• In truly restful apps there are only seven
functions.
18. http verbs in REST
• show (Get)
• create (Post)
• update (Put)
• destroy (Delete)
• index (Get)
• new (Get)
• edit (Get)
20. How do we handle
these?
• Routing File or an application controller
• /app/controllers/application.inc
• map the requests to models, views and
controllers