rest yoluyla web servis geliştirme
DESCRIPTION
TRANSCRIPT
![Page 1: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/1.jpg)
REST yoluyla Web Servis Geliştirme
![Page 2: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/2.jpg)
Emir KarşıyakalıLead Developer at UBIT
twitter.com/EmirKarsiyakaligithub.com/emir
emir.im !
![Page 3: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/3.jpg)
API nedir?• Application Program Interface
![Page 4: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/4.jpg)
![Page 5: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/5.jpg)
API Teknikleri• REST (Representational State Transfer)
• Remote Procedure Calls (RPC)
• Simple Access Protocol (SOAP)
![Page 6: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/6.jpg)
RPC?• Kullanıcının prosedür isimlerini bilmeleri gerekiyor.
• Spesifik prosedür parametreleri ve istekleri var.
• Requires a URI per method/function (create, edit, delete)
![Page 7: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/7.jpg)
SOAP?• Çalışma Şekli ve Method’larımızı açığa çıkarıyor.
• XML tabanlı olduğu için verilerimizin boyutu artıyor.
• Bütün istekler POST aracılığı ile gidiyor.
![Page 8: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/8.jpg)
POST /InStock HTTP/1.1!Host: www.example.org!
Content-Type: application/soap+xml; charset=utf-8!Content-Length: nnn
Request Örneği:
![Page 9: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/9.jpg)
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn
Response Örneği
![Page 10: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/10.jpg)
REST• Data döner, methodlarınızı ortaya çıkarmaz.
• XML ve JSON kullanılabilir
• HTTP fiileri kullanılır
• Ajax (JS) dostu
• Stateless
• Cacheable
![Page 11: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/11.jpg)
HTTP Status Codes• 20x - Cool
• 30x - Ask that dude over there.
• 40x - You fucked up!
• 50x - We fucked up!
![Page 12: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/12.jpg)
HTTP Verbs• GET (Read)
• POST (Create)
• PUT (Update)
• DELETE (Delete)
• PATCH
![Page 13: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/13.jpg)
Argümanlar • REST API yazmak ve maintain etmek güç!
• REST güvenli değil.
• REST API’lar için herhangi bir standart yok!
![Page 14: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/14.jpg)
REST’in sundukları• Generality
• Familiarity
• Scalability
• Segmentation
• Speed
• Security
• Encapsulation
![Page 15: REST yoluyla Web Servis Geliştirme](https://reader034.vdocuments.pub/reader034/viewer/2022042606/547a768eb37959492b8b49a7/html5/thumbnails/15.jpg)
Teşekkürler!