Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The power of Web-standards

Yusuke Wada
October 20, 2023

The power of Web-standards

Deno Fest - 2023.10.20 @Tokyo Akihabara
Yusuke Wada

Yusuke Wada

October 20, 2023
Tweet

More Decks by Yusuke Wada

Other Decks in Programming

Transcript

  1. ࣗݾ঺հ w :VTVLF8BEB࿨ా༟հ w %FWFMPQFS"EWPDBUF!$MPVE fl BSF w $SFBUPSPG)POP w

    $PGPVOEFSPG#PLFUF w 8FCGSBNFXPSLEFWFMPQFS w IUUQTHJUIVCDPNZVTVLFCF
  2. Web-standards w +BWB4DSJQUͷ؀ڥͰڞ௨Ͱ࢖ΘΕΔͭͭ͋Δ8FCܥͷ"1* w ΋ͪΖΜ%FOP΋ʂ w ϒϥ΢βͷ"1*ΛαʔόʔαΠυͰ΋࢖͑ΔΑ͏ʹ͠Α͏ͱ͍ͯ͠Δ w 8JOUFS$(ͰσΟεΧογϣϯ͞Ε͍ͯΔ w

    8FCJOUFSPQFSBCMF3VOUJNFT$PNNVOJUZ(SPVQ w ϒϥ΢βҎ֎ͷ؀ڥ w ʮ8FC૬ޓӡ༻ՄೳʯΛ໨ࢦ͢ IUUQTXJOUFSDHPSHΑΓ ٞ࿦ʹࢀՃͯ͠Δͷ͸͜Ε͚ͩͰ͸ͳ͍
  3. ͦͷଞ w )FBEFST w 63-4FBSDI1BSBNT w 'PSN%BUB w #MPC w

    3FBEBCMF4USFBN w 5FYU%FDPEFS w BUPC CUPB  w ʜ ࠷খݶͰ਌͠Έ΍͍͢API
  4. Hono w 8FCTUBOEBSETͷ"1*ͷΈΛ࢖ͬͨ8FCϑϨʔϜϫʔΫ w ֎෦ϥΠϒϥϦ΁ͷґଘ͸ w ೥݄͔Β։ൃͯ͠໿೥ w ౰ॳ͸$MPVE fl

    BSF8PSLFSTͰಈ͔ͨ͢Ίʹͭ͘ΒΕͨ w ͦͷޙɺ'BTUMZ$PNQVUF!&EHFɺ%FOPɺ#VOɺ/PEFKTͷॱ൪ͰରԠ w ͦͷܦݧ͔Βɺ8FCTUBOEBSETʹ͍ͭͯޠΔ Hono - The Web Framework built on Web Standards https://hono.dev/
  5. ϑϨʔϜϫʔΫͱWebαʔό Catalyst CGI::Application Jifty Mojo Perl Hackers Hub #1 -WEB+DB

    PRESS 2010.02.24 https://gihyo.jp/dev/serial/01/perl-hackers-hub/000101 Apache lighttpd nginx HTTP::Server::Simple ͱ͹͠·͢…
  6. PSGIʹΑΔΠϯλʔϑΣʔεڞ௨Խ Catalyst CGI::Application Jifty Mojo Apache lighttpd nginx HTTP::Server::Simple PSGI

    Perl Hackers Hub #1 -WEB+DB PRESS 2010.02.24 https://gihyo.jp/dev/serial/01/perl-hackers-hub/000101 ͱ͹͠·͢…
  7. 2. ΄ͱΜͲͷϥϯλΠϜͰ࣮૷͞Ε͍ͯΔ w ຊ౰ʹ)POP͸Ͳ͜Ͱ΋ಈ͘ $MPVE fl BSF8PSLFST 'BTUMZ$PNQVUF!&EHF %FOP #VO

    -BHPO /PEFKT 7FSCBM "84-BNCEB -BNCEB!&EHF create-hono Ͱ͸12ͷςϯϓϨʔτ͕࢖͑Δ
  8. ૬ޓӡ༻Մೳ https://github.com/honojs/hono/pull/1558 w )POPͷςετ͸$MPVE fl BSFͷ؀ڥΛ࢖͍ͬͯͨ w ͦΕΛ֎ͨ͠/PEFKT΁ͷҠߦ w ΍ͬͨ͜ͱ͸ҎԼ͚ͩ

    w OPEFDSZQUPΛDSZQUP΁Ϛοϐϯά w $BDIF"1*ͷϞοΫ w .%ͷςετΛεΩοϓ w XPSLFSEʹ͸͋Δ͕8FC$SZQUPελϯμʔυͰ͸ͳ͍ w ϥϯλΠϜΩʔΛXPSLFSE͔ΒOPEF΁มߋ
  9. 1. ؀ڥม਺ w ͍ΘΏΔγεςϜͷ؀ڥม਺͚ͩͰ͸ͳ͍ʢྫ$MPVE fl BSF8PSLFSTʣ w $MPVE fl BSFADFOW50,&/A

    w %FOPA%FOPFOWA w #VOAQSPDFTTFOWAPSA#VOFOWA w /PEFKTAQSPDFTTFOWA w 'BTUMZŠͦ΋ͦ΋Ϣʔβʔ͕஋Ληοτ͢Δ΋ͷͰ͸ͳ͍ w A'"45-:@)045/".&A A'"45-:@101A A'"45-:@3&(*0/Aʜ w Ҏલɺ&EHF%JDUJPOBSZΛ࢖ͬͯ50,&/Λѻͬͨ͜ͱ͕͋Δ w A$PO fi H4UPSFAͱ͍͏ͷ͕͋ΔΒ͍͠
  10. ϥϯλΠϜΩʔ w 8JOUFS$(͕ʮ3VOUJNF,FZT4QFDJ fi DBUJPOʯΛ͍ͭͬͯ͘Δ w IUUQTSVOUJNFLFZTQSPQPTBMXJOUFSDHPSH w OPEF w

    EFOP w CVO w XPSLFSE$MPVE fl BSF8PSLFST w GBTUMZ w FEHFMJHIU7FSDFM&EHF'VODUJPOT w MBHPO w ʜ
  11. 2. ϑΝΠϧγεςϜ w ֤ϥϯλΠϜ͝ͱʹϑΝΠϧγεςϜ΁ͷΞΫηεํ๏͕ҧ͏ w %FOPA%FOPPQFO A w #VOA#VO fi

    MF A w ͦ΋ͦ΋ϑΝΠϧγεςϜ͕ͳ͍ʜ w $MPVE fl BSF7FSDFM"84ʜ w ϑΝΠϧγεςϜ͡Όͳ͍ετϨʔδ w $MPVE fl BSF,73 w 7FSDFM#MPC w "NB[PO4
  12. ελϯμʔυͳ͸͚ͣͩͲಉ͡͡Όͳ͍΋ͷ w ελϯμʔυͬΆ͍͚ͲϛχϚϜίϞϯʹ͸ೖͬͯͳ͍΋ͷ w IUUQTDPNNPONJOBQJQSPQPTBMXJOUFSDHPSH w $BDIF"1*$MPVE fl BSFɺ%FOPͷΈ w

    63-1BUUFSO#VOͰ͸࣮૷͠ͳ͍ w ࣮૷͕ϛεͬͯΔ w #VO3FRVFTUΦϒδΣΫτΛDMPOF ͯ͠KTPO ͢Δͱى͖Δόά w ಠ࣮ࣗ૷ w $MPVE fl BSF3FRVFTUΠϯελϯεͷDG w 3FBDUͷGFUDIʁ