OpenRasta RESTful services and jQuery Consumption

No description »
Eli Perelman

OpenRasta
RESTful Services &
jQuery Consumption
REST
We work for
Nate Taylor
&
Eli Perelman
Nate Taylor
Software engineer with II years of professional developing experience. I've developed applications in MFC C++, VB, C#, and J2ME. My latest focus has been on designing and optimizing back-end architectures for web applications.
Eli Perelman
A front-end software engineer with over 9 years of professional experience working with JavaScript, jQuery, and other front-end technologies. I co-organize the Omaha Front-end Web & jQuery Meetup and enjoy JavaScript, maybe too much.
Representational
State Transfer
Communication
HTTP
Resources
Verbs:
Act on a resource
OpenWrap
Package Manager similar to NuGet
Best way to get latest version of OpenRasta
http://openwrap.org
Download and install o.exe
Starting a
new project
Open command line at location for new project
c:\>o init-wrap <projectName>
Open studio, create new ASP.Net Web Application
Go back to command window 
c:\> o init-wrap -all
c:\>o add-wrap openrasta-full
Add reference to wraps\bin-net35\openrasta.client.dll
Initial Project
Configuration
Remove:
Account Folder
Scripts Folder
Styles Folder
Site.Master
About.aspx
Add:
Handlers Folder
Pipelines Folder
Resources Folder
Configuration.cs
OpenRasta
Basics
Resources:
The objects you'll be sending to the service
Handlers:
The classes that process the resources
Pipelines:
Intercept communication
Configuration.cs
Analogous of Program.cs
taylonr@gmail.com | taylonr.com | @taylonr
@eliperelman | eliperelman.com | eli@eliperelman.com
Codecs:
Determine how the data is returned to the consumer.
http://taylonr.com
http://eliperelman.com
http://www.zephyros-systems.co.uk/blog/?p=45
https://github.com/openrasta/openrasta-stable
http://trac.caffeine-it.com/openrasta
http://openrasta.org/
Sites of Interest
Client
Server
What are we trying
to achieve with REST?
Why are we communicating?
XML-RPC:
Procedural Programming


REST:
Object-Oriented Programming
GET: fetch a representation of a resource

POST: Create a new resource

PUT: Store a new representation of a resource

DELETE: Remove a resource
How do we make a RESTful call?
URL Structuring
Resource: Meme
Tip: Plurality
GET http://mysite/memes

GET http://mysite/memes/123

POST http://mysite/memes

PUT http://mysite/memes/123

DELETE http://mysite/memes/123
What happens after
the call is over?
HTTP Response Codes
200
404
304
500
Why
OpenRasta?
What is OpenRasta?
Collection
container
http://mysite.com/users/13579
http://mysite.com/getusers?id=13579

Loading comments...

Please log in to add your comment.

Report abuse

More presentations by Eli Perelman