building social and restful frameworks
DESCRIPTION
TRANSCRIPT
![Page 1: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/1.jpg)
Brendon Schwartz
http://blogs.sharepointguys.com/brendon
Senior Software Engineer
Telligent
![Page 2: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/2.jpg)
Brendon SchwartzSenior Software Engineer, Telligent
Experience: SharePoint Server Microsoft MVP and ASP.NET MVP
Architect for applications at AJC, AT&T, AutoTrader.com, Coca-Cola Enterprises
Co-founder, Atlanta .NET Regular Guys www.devcow.com
Past Vice President of Technology, INETA
Author of books and magazines
![Page 3: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/3.jpg)
Create Entities based on domain Examples:
Company
Order
Users
Entities usually have data access method
Lazy load any large objects
![Page 4: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/4.jpg)
Have base classes Page Class in web
Stream class for input/output
Design your system by determining Interfaces
Abstract classes
Base class implementations
![Page 5: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/5.jpg)
Different options Manually
Automated
Generated
Many tools CodeSmith
OR Mappings
Microsoft ADO.NET Entity Framework
LINQ
ASP.NET MVC
![Page 6: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/6.jpg)
Only if it makes sense
Common pattern books Fowler, Martin (2002). Patterns of Enterprise Application
Architecture
Gang of Four (1995). Design Patterns: Elements of Reusable Object-Oriented Software
New patterns always coming out so stay on top of it http://martinfowler.com/bliki/FluentInterface.html
![Page 7: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/7.jpg)
![Page 8: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/8.jpg)
Located @ http://jobs.devcow.com
![Page 9: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/9.jpg)
Usually are built around interaction Blogs
Wikis
Comments
RSS
Mashups
![Page 10: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/10.jpg)
XML format of data
Most common in blogs
Use with any list of data Events
Announcements
Lists
Pull data and format in RSS standard
Good integration point for other apps to consume
![Page 11: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/11.jpg)
Tag Content to make it more relevant
Display tags per item or collectively
Helps discover similar data
Provides metadata for organization and discovery
Allows author to describe content
Tag Clouds are the most common display
![Page 12: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/12.jpg)
Assemble multiple sources together
Mashups are built with many blocks
Blocks provide Input
Output
No difference between display and data provider
Connect to LOB systems
![Page 13: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/13.jpg)
Visit @ http://www.codeplex.com/mashup
![Page 14: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/14.jpg)
REpresentational State Transfer Architectural style for distributed hypermedia systems,
introduced by Roy Fielding (2000)
Client-Server Stateless communication Cacheable
Uniform interface for resources Layered
![Page 15: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/15.jpg)
Resources (nouns) Identified by a URI, For example:
http://yousite/users/admin
Uniform interface (verbs) Small fixed set:
Create, Read, Update, Delete
State Representations data and state transferred between client and server
Transferred through web options XML, JSON, Atom, XHTML, ...
![Page 16: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/16.jpg)
CRUD methods map to web requests Create POST/ PUT
Read GET
Update PUT
Delete DELETE
Send data in an XML payload
Set the HTTP Header properties
![Page 17: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/17.jpg)
Blog Collection /bloggroup/ - container for blog
/bloggroup/{id}/blog - 1 blog
/bloggroup/{id}/blog/posts
URI Templates are URIs with variables within the URI syntax.
Records can be returned in any standard web format
![Page 18: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/18.jpg)
A good rest client API is a set of wrappers
Usually built with Javascript or scripting languages
Authentication with API key
Parameters are passed in URI/URL
![Page 19: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/19.jpg)
http://api.meetup.com/groups1.xml2/?zip=11211&topic=moms3&order=members4&key=ABDE12456AB23244455
groups -- the method you're calling, in this case a request for groups xml -- the format of the response. Each method has a list of supported
formats args -- zip & topic limit the results by geography and area of interest order -- how to order the results, in this case by # of members. To
reverse the sorting order, you include the parameter "desc=desc" or "desc=true".
key -- your unique API key
• Formats JSON JavaScript Object Notation XML A simple XML format with the exact same fields as the json
response. KML Keyhole markup language RSS RSS 2.0 ATOM
![Page 20: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/20.jpg)
View @ http://www.codeplex.com/meetup
![Page 21: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/21.jpg)
![Page 22: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/22.jpg)
http://reports.communityserver.com/demo/
![Page 23: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/23.jpg)
Integration to Community Server via web parts in SharePoint
Features include: Activity streams – tracks discussions, documents, and
blogs
Blogs & forums – work inside of SharePoint, Community Server, or Email
![Page 25: Building social and RESTful frameworks](https://reader033.vdocument.in/reader033/viewer/2022051412/54b708574a795912448b46ae/html5/thumbnails/25.jpg)
Brendon Schwartz
http://blogs.sharepointguys.com/brendon
Senior Software Engineer
Telligent