API를 준비하는 금성인을 위한 안내서
장동수 / 아임인LAB / 개발실 / KTH

                           1
눈에 보이는 API (1)




                 2
눈에 보이는 API (2)




                 3
눈에 보이는 API (3)
그러나...

그것은...

API 문서일 뿐...

눈에 보이는 것이...

API의 전부는 아니랍니다...
OTL


                    4
API란?
Application Programming Interface
Application Program
  a program that gives a computer instructions
  that provide the user with tools
  to accomplish a task
Interface: inter + face; 얼굴과 얼굴 사이?!
  a surface forming a common boundary
  between two things


                                                 5
장치와 장치 사이




            6
사람과 사람 사이




            7
사람과 프로그램 사이




              8
프로그램과 프로그램 사이
     (응용) 프로그램




        API

    (시스템) 프로그램




                 9
서비스와 서비스 사이
     (매시업) 서비스




      Open API

     (플랫폼) 서비스




                 10
화성인 용어 사전 (1)


라이브러리(Library)

툴킷(Toolkit)

프레임웍(Framework)




                  11
화성인 용어 사전 (2)

프로시져 호출(Procedure Call)

시스템 호출(System Call)

프로세스간 통신(IPC; Inter-process Communication)

로컬 프로시져 호출(LPC; Local Procedure Call)

원격 프로시져 호출(RPC; Remote Procedure Call)



                                             12
화성인 용어 사전 (3)
프로토콜(Protocol)
TCP/IP, Socket, HTTP
Open API, Cross-Domain
REST, JSON, JSONP
SOAP, XML
Authentication &
Authorization, OAuth


                         13
REST+JSON vs SOAP+XML
{
    "results" : [
       {
          "address_components" : [
             {
                "long_name" : "1600",
                "short_name" : "1600",
                "types" : [ "street_number" ]
             },
             {
                "long_name" : "Amphitheatre Pkwy",
                "short_name" : "Amphitheatre Pkwy",
                "types" : [ "route" ]
             },
             {
                "long_name" : "Mountain View",
                "short_name" : "Mountain View",
                "types" : [ "locality", "political" ]
             },
             {                                          14
REST+JSON vs SOAP+XML
<GeocodeResponse>
 <status>OK</status>
 <result>
  <type>street_address</type>
  <formatted_address>1600 Amphitheatre Pkwy, Mountain View, CA 9404
  <address_component>
   <long_name>1600</long_name>
   <short_name>1600</short_name>
   <type>street_number</type>
  </address_component>
  <address_component>
   <long_name>Amphitheatre Pkwy</long_name>
   <short_name>Amphitheatre Pkwy</short_name>
   <type>route</type>
  </address_component>
  <address_component>
   <long_name>Mountain View</long_name>
   <short_name>Mountain View</short_name>
   <type>locality</type>
   <type>political</type>                                        15
크로스 도메인
  http://a.com                      http://b.com

 one        two                three         four


         Same Origin                Cross Domain
           AJAX                         AJAX


                 http://a.com/one

                   웹 브라우져
                                                    16
크로스 도메인
  http://a.com                    http://b.com

 one        two                 three        four


        Cross Domain                  Same Origin
            AJAX                        AJAX


                 http://b.com/three

                   웹 브라우져
                                                    17
OpenAPI 문서 보기(1)
이름(Name)

  HTTP 주소(URL, URI, ...) + 메소
  드(GET, POST, PUT, DELETE, ...)

요청(Request)

  인자, 파라메터, Parameters,
  Arguments, ...

응답(Response)

  반환값, 리턴값, 결과값, Result,
  Return, ...



                                   18
OpenAPI 문서 보기(2)




    이름    요청       응답
                        19
화성인에게 API란?
외부 시스템이 내부 시스템이
제공하는 기능을 사용하기 위
해 지켜야 하는 규약 & 문서

그리고, 실제로 요청을 받고
응답을 하는 시스템의 맨 바깥
계층 & 코드 덩어리

그리고, 계층을 통해 규약에
맞춰 요청을 보내고 응답을 받
기 위한 코드 덩어리


                   20
금성인에게 API란
더 큰/좋은/잘나가는/전문
적인 서비스에 묻어가기

경쟁자를 파트너로 만들기

경쟁자에게 밀리지 않기

서비스 플랫폼으로 자리잡
고 돈 벌기



                 21
Putting It All Together...
         아임IN
       안드로이드앱
                                                  써드파티
                            아임IN 서버               앱/매시업

        아임IN
아임IN    Private                                  리뷰
iOS앱   OpenAPI
                                       아임IN
                                      OpenAPI 장소 찾기 아리맛
             가입/로그인                           발도장 찍기
             발도장 공유
             친구 찾기

       페이스북        트위터                 푸딩.투
       OpenAPI    OpenAPI              OpenAPI

                                                          22
화성인 따라잡기
“좋아요” 버튼 달기

페이스북 개발자 등록

OAuth 인증/승인

타임라인 가져오기

타임라인에 글 올리기

친구 목록 가져오기


              23
Q&A
That’s all Folks!




                    24

KTH_Detail day_화성에서 온 개발자 금성에서 온 기획자 시리즈_7차(1)_API_장동수_20120718

  • 1.
    API를 준비하는 금성인을위한 안내서 장동수 / 아임인LAB / 개발실 / KTH 1
  • 2.
  • 3.
  • 4.
    눈에 보이는 API(3) 그러나... 그것은... API 문서일 뿐... 눈에 보이는 것이... API의 전부는 아니랍니다... OTL 4
  • 5.
    API란? Application Programming Interface ApplicationProgram a program that gives a computer instructions that provide the user with tools to accomplish a task Interface: inter + face; 얼굴과 얼굴 사이?! a surface forming a common boundary between two things 5
  • 6.
  • 7.
  • 8.
  • 9.
    프로그램과 프로그램 사이 (응용) 프로그램 API (시스템) 프로그램 9
  • 10.
    서비스와 서비스 사이 (매시업) 서비스 Open API (플랫폼) 서비스 10
  • 11.
    화성인 용어 사전(1) 라이브러리(Library) 툴킷(Toolkit) 프레임웍(Framework) 11
  • 12.
    화성인 용어 사전(2) 프로시져 호출(Procedure Call) 시스템 호출(System Call) 프로세스간 통신(IPC; Inter-process Communication) 로컬 프로시져 호출(LPC; Local Procedure Call) 원격 프로시져 호출(RPC; Remote Procedure Call) 12
  • 13.
    화성인 용어 사전(3) 프로토콜(Protocol) TCP/IP, Socket, HTTP Open API, Cross-Domain REST, JSON, JSONP SOAP, XML Authentication & Authorization, OAuth 13
  • 14.
    REST+JSON vs SOAP+XML { "results" : [ { "address_components" : [ { "long_name" : "1600", "short_name" : "1600", "types" : [ "street_number" ] }, { "long_name" : "Amphitheatre Pkwy", "short_name" : "Amphitheatre Pkwy", "types" : [ "route" ] }, { "long_name" : "Mountain View", "short_name" : "Mountain View", "types" : [ "locality", "political" ] }, { 14
  • 15.
    REST+JSON vs SOAP+XML <GeocodeResponse>  <status>OK</status>  <result>  <type>street_address</type>   <formatted_address>1600 Amphitheatre Pkwy, Mountain View, CA 9404   <address_component>    <long_name>1600</long_name>    <short_name>1600</short_name>    <type>street_number</type>   </address_component>   <address_component>    <long_name>Amphitheatre Pkwy</long_name>    <short_name>Amphitheatre Pkwy</short_name>    <type>route</type>   </address_component>   <address_component>    <long_name>Mountain View</long_name>    <short_name>Mountain View</short_name>    <type>locality</type>    <type>political</type> 15
  • 16.
    크로스 도메인 http://a.com http://b.com one two three four Same Origin Cross Domain AJAX AJAX http://a.com/one 웹 브라우져 16
  • 17.
    크로스 도메인 http://a.com http://b.com one two three four Cross Domain Same Origin AJAX AJAX http://b.com/three 웹 브라우져 17
  • 18.
    OpenAPI 문서 보기(1) 이름(Name) HTTP 주소(URL, URI, ...) + 메소 드(GET, POST, PUT, DELETE, ...) 요청(Request) 인자, 파라메터, Parameters, Arguments, ... 응답(Response) 반환값, 리턴값, 결과값, Result, Return, ... 18
  • 19.
    OpenAPI 문서 보기(2) 이름 요청 응답 19
  • 20.
    화성인에게 API란? 외부 시스템이내부 시스템이 제공하는 기능을 사용하기 위 해 지켜야 하는 규약 & 문서 그리고, 실제로 요청을 받고 응답을 하는 시스템의 맨 바깥 계층 & 코드 덩어리 그리고, 계층을 통해 규약에 맞춰 요청을 보내고 응답을 받 기 위한 코드 덩어리 20
  • 21.
    금성인에게 API란 더 큰/좋은/잘나가는/전문 적인서비스에 묻어가기 경쟁자를 파트너로 만들기 경쟁자에게 밀리지 않기 서비스 플랫폼으로 자리잡 고 돈 벌기 21
  • 22.
    Putting It AllTogether... 아임IN 안드로이드앱 써드파티 아임IN 서버 앱/매시업 아임IN 아임IN Private 리뷰 iOS앱 OpenAPI 아임IN OpenAPI 장소 찾기 아리맛 가입/로그인 발도장 찍기 발도장 공유 친구 찾기 페이스북 트위터 푸딩.투 OpenAPI OpenAPI OpenAPI 22
  • 23.
    화성인 따라잡기 “좋아요” 버튼달기 페이스북 개발자 등록 OAuth 인증/승인 타임라인 가져오기 타임라인에 글 올리기 친구 목록 가져오기 23
  • 24.