zn
play

Zn Tuesday 22 May 12 Zn Pharo Conference May 2012 Sven Van - PowerPoint PPT Presentation

Zn Tuesday 22 May 12 Zn Pharo Conference May 2012 Sven Van Caekenberghe Tuesday 22 May 12 Zinc HTTP Components Tuesday 22 May 12 started Sept 2010 included in Pharo 1.3, 1.4, 2.0 Tuesday 22 May 12 WWW HTTP Tuesday 22 May 12 [ | ]


  1. Zn Tuesday 22 May 12

  2. Zn Pharo Conference May 2012 Sven Van Caekenberghe Tuesday 22 May 12

  3. Zinc HTTP Components Tuesday 22 May 12

  4. started Sept 2010 included in Pharo 1.3, 1.4, 2.0 Tuesday 22 May 12

  5. WWW HTTP Tuesday 22 May 12

  6. [ | ] Understandability Tuesday 22 May 12

  7. HTTP Framework Tuesday 22 May 12

  8. Client / Server Tuesday 22 May 12

  9. Request Client Server Response Tuesday 22 May 12

  10. Model Tuesday 22 May 12

  11. ZnRequest ZnClient ZnServer ZnResponse Tuesday 22 May 12

  12. ZnRequest Tuesday 22 May 12

  13. ZnRequest ZnRequestLine ZnHeaders ZnMessage ZnEntity Tuesday 22 May 12

  14. ZnRequest ZnRequestLine ZnHeaders ZnMessage Tuesday 22 May 12

  15. ZnRequest ZnRequestLine Verb URI ZnHeaders ZnMessage key:value * ZnEntity type/length/content Tuesday 22 May 12

  16. ZnResponse Tuesday 22 May 12

  17. ZnRespone ZnStatusLine ZnHeaders ZnMessage ZnEntity Tuesday 22 May 12

  18. ZnResponse ZnStatusLine ZnHeaders ZnMessage Tuesday 22 May 12

  19. ZnResponse ZnStatusLine Code Reason ZnHeaders ZnMessage key:value * ZnEntity type/length/content Tuesday 22 May 12

  20. example Tuesday 22 May 12

  21. ZnClient new get: ‘http://zn.stfx.eu/zn/small.html’. Tuesday 22 May 12

  22. ZnRequest GET /zn/small.html HTTP/1.1 Host: zn.stfx.eu ZnMessage User-Agent: Zinc... Tuesday 22 May 12

  23. ZnResponse HTTP/1.1 200 OK Date: Tue, 08 May.. ZnMessage Server: Zinc... text/html, 113B <html>...</html> Tuesday 22 May 12

  24. Framework Tuesday 22 May 12

  25. Core Tuesday 22 May 12

  26. Zinc-HTTP-Core • ZnMessage • ZnRequest • ZnResponse • ZnHeaders • ZnRequestLine • ZnStatusLine Tuesday 22 May 12

  27. Zinc-HTTP-Core • ZnEntity • ZnStringEntity • ZnByteArrayEntity • ZnStreamingEntity Tuesday 22 May 12

  28. Zinc-HTTP-Core • ZnEntity • ZnMultiPartFormDataEntity • ZnApplicationFormUrlEncodedEntity • ZnMimePart Tuesday 22 May 12

  29. Support Tuesday 22 May 12

  30. Zinc-HTTP-Support • ZnUrl • ZnMimeType Tuesday 22 May 12

  31. Zinc-HTTP-Support • Networking • Authentication & Authorization • Sessions, Cookies • Constants, Parameters, Settings • Utils Tuesday 22 May 12

  32. Streaming Tuesday 22 May 12

  33. Zinc-HTTP-Streaming • Binary IO • Bivalent Output • Character Encoding/Decoding • Chunked, Gzip Transfer Tuesday 22 May 12

  34. Exceptions Tuesday 22 May 12

  35. Zinc-HTTP-Exceptions • Protocol specific • Implementation Limits • Parsing Errors Tuesday 22 May 12

  36. Logging Tuesday 22 May 12

  37. Zinc-HTTP-Logging • Announcement based • Destinations • Transcript • File • Stdout • Memory Tuesday 22 May 12

  38. Client Tuesday 22 May 12

  39. Zinc-HTTP-Client-Server • ZnClient • build requests • execute requests • process responses • manage state Tuesday 22 May 12

  40. Correct HTTP Client Use • ZnClient offers • URI construction • error handling • retry management • response handling • accept/content-type matching Tuesday 22 May 12

  41. MCHttpRepository>>allFileNames | index | self displayProgress: 'Updating ', self description during: [ index := ZnClient new systemPolicy; beOneShot; signalProgress: true; accept: ZnMimeType text; ifFail: [ :exception | self error: 'Could not access ', location, ': ', exception printString ]; url: self locationWithTrailingSlash; queryAt: 'C' put: 'M;O=D'; username: self user password: self password; get ]. ^ self parseFileNamesFromStream: index readStream Tuesday 22 May 12

  42. Smalltalk HTTP Scripting • ZnClient does • streaming downloads & uploads • follows redirects • write/read content representations • proxies, cookies, sessions • authentication, login, ... Tuesday 22 May 12

  43. Server Tuesday 22 May 12

  44. Zinc-HTTP-Client-Server • ZnServer • run protocol • infrastructure • delegate #handleRequest: • delegate #authenticateRequest:do: Tuesday 22 May 12

  45. Zinc-HTTP-Client-Server • ZnServer • ZnDefaultServerDelegate • ZnStaticFileServerDelegate • ZnMonticelloServerDelegate Tuesday 22 May 12

  46. Seaside Tuesday 22 May 12

  47. ZnZincServerAdaptor default in/for Pharo complete Seaside3 functionality efficient binary data transfer Tuesday 22 May 12

  48. Documentation Tuesday 22 May 12

  49. Zn Paper / PBE2 Chapter Class / Method Comments 220+ Unit & Functional Tests QA = CI + IDE + Production Tuesday 22 May 12

  50. http://zn.stfx.eu Zinc HTTP Components Tuesday 22 May 12

  51. Zn May the source be with you Tuesday 22 May 12

  52. Zn Tuesday 22 May 12

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend