What exactly is RESTful programming?

前端 未结 30 3262
Happy的楠姐
Happy的楠姐 2020-11-21 06:02

What exactly is RESTful programming?

30条回答
  •  旧时难觅i
    2020-11-21 06:24

    RESTful (Representational state transfer) API programming is writing web applications in any programming language by following 5 basic software architectural style principles:

    1. Resource (data, information).
    2. Unique global identifier (all resources are unique identified by URI).
    3. Uniform interface - use simple and standard interface (HTTP).
    4. Representation - all communication is done by representation (e.g. XML/JSON)
    5. Stateless (every request happens in complete isolation, it's easier to cache and load-balance),

    In other words you're writing simple point-to-point network applications over HTTP which uses verbs such as GET, POST, PUT or DELETE by implementing RESTful architecture which proposes standardization of the interface each “resource” exposes. It is nothing that using current features of the web in a simple and effective way (highly successful, proven and distributed architecture). It is an alternative to more complex mechanisms like SOAP, CORBA and RPC.

    RESTful programming conforms to Web architecture design and, if properly implemented, it allows you to take the full advantage of scalable Web infrastructure.

提交回复
热议问题