KEMBAR78
Introduction to API Design: REST and Java | PPT
Introduction to API Design: REST and Java Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii
What is an API? Specifies a  boundary  between 2 systems What you can do What you can't do The boundary is defined by: Functions you can invoke Objects passed & returned APIs can exist: Within a single program Between independent programs
Advantages of APIs Simplifies design by creating partitions Enables change without "ripple effect" Enables multiple implementations Enables development to scale Larger development teams Concurrent development
Disadvantages of APIs Increases implementation complexity Creates boundaries that can make certain changes hard to accomplish Can impede performance optimization
Kinds of APIs Within a program Separates components. Creates "public" and "private" areas. Between programs Specifies a "protocol" How to send and receive information.
Example in-Program API:  Java Collections Framework Interface java.util.Collection boolean add (Object o) void clear() boolean equals(Object o) boolean isEmpty() This API is implemented by: HashSet, LinkedList, TreeSet, etc.
 
Example between-program (REST)API: Twitter The Twitter API is a RESTful protocol: http://api.twitter.com/ version /statuses/public_timeline. format Operations: GET Formats: json, xml, rss, atom Authentication: none Parameters: trim_user, include_entities
 
Example between-program (REST)API: WattDepot
The Solar Decathlon iHale System
The Solar Decathlon iHale System Within-program  between-program
On to the demo

Introduction to API Design: REST and Java

  • 1.
    Introduction to APIDesign: REST and Java Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii
  • 2.
    What is anAPI? Specifies a boundary between 2 systems What you can do What you can't do The boundary is defined by: Functions you can invoke Objects passed & returned APIs can exist: Within a single program Between independent programs
  • 3.
    Advantages of APIsSimplifies design by creating partitions Enables change without "ripple effect" Enables multiple implementations Enables development to scale Larger development teams Concurrent development
  • 4.
    Disadvantages of APIsIncreases implementation complexity Creates boundaries that can make certain changes hard to accomplish Can impede performance optimization
  • 5.
    Kinds of APIsWithin a program Separates components. Creates "public" and "private" areas. Between programs Specifies a "protocol" How to send and receive information.
  • 6.
    Example in-Program API: Java Collections Framework Interface java.util.Collection boolean add (Object o) void clear() boolean equals(Object o) boolean isEmpty() This API is implemented by: HashSet, LinkedList, TreeSet, etc.
  • 7.
  • 8.
    Example between-program (REST)API:Twitter The Twitter API is a RESTful protocol: http://api.twitter.com/ version /statuses/public_timeline. format Operations: GET Formats: json, xml, rss, atom Authentication: none Parameters: trim_user, include_entities
  • 9.
  • 10.
  • 11.
    The Solar DecathloniHale System
  • 12.
    The Solar DecathloniHale System Within-program between-program
  • 13.