ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Brendon Schwartz
bschwartz@devcowsoftware.com
http://blogs.sharepointguys.com/brendon
Senior Software Engineer
Telligent
Brendon Schwartz
Senior 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
ï‚— Create Entities based on domain
  ï‚— Examples:
     ï‚— Company
     ï‚— Order
     ï‚— Users

ï‚— Entities usually have data access method
ï‚— Lazy load any large objects
ï‚— Have base classes
  ï‚— Page Class in web
  ï‚— Stream class for input/output
ï‚— Design your system by determining
  ï‚— Interfaces
  ï‚— Abstract classes
  ï‚— Base class implementations
ï‚— Different options
  ï‚— Manually
  ï‚— Automated
  ï‚— Generated
ï‚— Many tools
  ï‚— CodeSmith
  ï‚— OR Mappings
  ï‚— Microsoft ADO.NET Entity Framework
  ï‚— LINQ
  ï‚— ASP.NET MVC
ï‚— 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
Building social and RESTful frameworks
Located @ http://jobs.devcow.com
ï‚— Usually are built around interaction
  ï‚— Blogs
  ï‚— Wikis
  ï‚— Comments
  ï‚— RSS
  ï‚— Mashups
ï‚— 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
ï‚— 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
ï‚— 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
Visit @ http://www.codeplex.com/mashup
ï‚— REpresentational State Transfer
  ï‚— Architectural style for distributed hypermedia systems,
    introduced by Roy Fielding (2000)
  ï‚— Client-Server
  ï‚— Stateless communication
  ï‚— Cacheable
  ï‚— Uniform interface for resources
  ï‚— Layered
ï‚— 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, ...
ï‚— 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
ï‚— 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
ï‚— 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
http://api.meetup.com/groups1.xml2/?zip=11211&topic=moms3&order=me
  mbers4&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
View @ http://www.codeplex.com/meetup
Building social and RESTful frameworks
http://reports.communityserver.com/demo/
ï‚— 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
Building social and RESTful frameworks
Brendon Schwartz
bschwartz@devcowsoftware.com
http://blogs.sharepointguys.com/brendon
Senior Software Engineer
Telligent

More Related Content

Building social and RESTful frameworks

  • 2. Brendon Schwartz Senior 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
  • 3. ï‚— Create Entities based on domain ï‚— Examples: ï‚— Company ï‚— Order ï‚— Users ï‚— Entities usually have data access method ï‚— Lazy load any large objects
  • 4. ï‚— Have base classes ï‚— Page Class in web ï‚— Stream class for input/output ï‚— Design your system by determining ï‚— Interfaces ï‚— Abstract classes ï‚— Base class implementations
  • 5. ï‚— Different options ï‚— Manually ï‚— Automated ï‚— Generated ï‚— Many tools ï‚— CodeSmith ï‚— OR Mappings ï‚— Microsoft ADO.NET Entity Framework ï‚— LINQ ï‚— ASP.NET MVC
  • 6. ï‚— 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
  • 9. ï‚— Usually are built around interaction ï‚— Blogs ï‚— Wikis ï‚— Comments ï‚— RSS ï‚— Mashups
  • 10. ï‚— 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
  • 11. ï‚— 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
  • 12. ï‚— 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
  • 14. ï‚— REpresentational State Transfer ï‚— Architectural style for distributed hypermedia systems, introduced by Roy Fielding (2000) ï‚— Client-Server ï‚— Stateless communication ï‚— Cacheable ï‚— Uniform interface for resources ï‚— Layered
  • 15. ï‚— 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, ...
  • 16. ï‚— 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
  • 17. ï‚— 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
  • 18. ï‚— 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
  • 19. http://api.meetup.com/groups1.xml2/?zip=11211&topic=moms3&order=me mbers4&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
  • 23. ï‚— 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