ããªãã è¨ã£ã¦ãã°ãã£ãã¼ã¯å®ã¯ããå®æãã¦ããã ãã©ããªãããµã³ãã«ã¢ããªã®ã¤ãããä½ã£ã¦ããã¡ã«æ®µã ã¬ããªãã¬ã¼ã ã¯ã¼ã¯ã¨åãã¦ãã¦ã大ããã¢ããªãããªãã®ã«ä¸èº«ã¯æå¤ã¨è¤éã§ããããã°ã ãããã¿ãããªãã¨ã«ãªã£ã¦ãã¾ã£ãã ãã¼ãããå ¬éãã¦ããããã©åèã«ãªããã¼ããªãã¤ã飽ãããªã¼ã¨ãæã£ã¦å¥ã®éã³ãå§ãããæå¤ã¨ãã£ã¡ã楽ãããªã£ã¦ãã¡ãã£ã¦ããããªãã®ãåºæ¥ãã faultier's Asagao at master - GitHub ä½ãã Plackã使ã£ã¦Sinatraã£ã½ãæãã§Webã¢ããªãæ¸ããé°å²æ°ã®ãã¬ã¼ã ã¯ã¼ã¯ã¿ãããªï¼å¼±ã ããï¼ãä¸å¿README.jaãèªãã¨ã©ããªãã®ãã¯ä½ã¨ãªãä¼ããããããªãããããããã¥ã¡ã³ãã¨ãµã³ãã«ã¢ããªãããã¯ä½ã£ã¦ã¿ããã¨ã¯æãã¾ãããä½ãã§ããã試ãã¦ã¿ãéã«ã¯ã½ã¼ã¹èªãã§ãã ãããï¼è¿½è¨ï¼ç°¡åãªãµã³ãã«ã³ã¼ãã¨ããã¥ã¡ã³
Sinatraã¯ããã§ããã¦ã§ãã¢ããªéçºç¨ãã¬ã¼ã ã¯ã¼ã¯ã ã¨æããåã«ãæ¸ããããURLããå¼ã³åºãããã¡ã½ããã決å®ããã¨ãããããã§ãã¦ããããä¾åããã©ã¤ãã©ãªãRackã ããªã®ã§ä½¿ãããããbeforeãã£ã«ã¿ã®åå¨ãstatus, content_typeã¨ãã£ãã¡ã½ãããªã©ãç´°ããã¨ããã¾ã§éçºããããããããã«ä½ããã¦ããããã«æããã ããããSinatraã¯Rubyã§æ¸ããã¦ããã®ã§ãä»ã®è¨èªã§ã¯ä½¿ããªãã趣å³ã§æ¸ãã¦ãããªãRubyã使ãã°ãã話ãªã®ã ããä»äºã ã¨ããããããªããã¨ãããã ããã ããã§ãSinatraã«ä¼¼ãæãã§ä½¿ããããªãã¬ã¼ã ã¯ã¼ã¯ãæ¢ãã¦ã¿ãã â»ã³ã¡ã³ãæ¬ãªã©ã§æãã¦ããã ãããã®ãããã¤ã追å ãã¾ãããæè¬ï¼ sinatra-on-perl perlç¨ http://code.google.com/p/sinatra/ ååã®éããããªãS
ãµãã¨ã¯å½¼å¥³ã®èªå® è¿ããæ¹åå°é§ åã®ã¹ã¼ãã¼ãã¼ã±ããã§å¾ ã¡åãããããã彼女ã¯èªè»¢è»ã§å¾ãã追ãã¤ãã¨è¨ããåã¯å¤§ããªã³ã¤ã³ãã¼ãã³ã°ã¸è»ãåãããç èãä¸æ¬å¸ã£ã¦ããã¹ã¼ãã¼ãã¼ã±ããã¸åããã¨ãã²ã£ãããªãã«ä¸»å©¦çãªå¥³æ§ããã°ãã¡ãããå ¥ãå£ãåºããå ¥ã£ãããã¦ãããæå»ã¯åå¾5æã«ãªããæè¨ããç®ãä¸ããã¨ãå¾ ããã¡ãã£ãããã¨å¤§ãã¦æªã³ãã¦ãªãæ§åã§ãµããæã¶ãã§ãã£ã¦ããã ã礼ã«æçãä½ãã¨ã¯ããããµãã®å®¶ã«ã¯é£æãåå足ãã¦ããªããããããããã¦ã¹ã¼ãã¼ãã¼ã±ããã«å¯ããã¨ã«ãªã£ãããµãã¯éèã³ã¼ãã¼ããç²¾èã³ã¼ãã¼ã¾ã§ãã¾ãã§åªç§ãªã«ã¼ããã«å°ãããããã«ç¡é§ãªãç¹æ¤ãã¦ãã£ãã欲ããé£æãããã¨ã2ç§éç¨åº¦ããããåè¦ããä¸åº¦æã«åã£ããããããããè±èãããè¿·ããã¨ãªãåãæã£ã¦ããã«ã´ã«æ¾ãè¾¼ãã ãæå¾ã«ã¢ã«ã³ã¼ã«é£²æãå·ãããã¦ããæ£ã®åã¸è¡ãã¨ãç§ã飲ãããã¨ã
Herokuã¯Ruby on Railsã®ã¯ã©ã¦ãç°å¢ãæä¾ãã¦ããWebãµã¼ãã¹ã ãæè¿ã§ã¯herokuã³ãã³ãã«ãã£ã¦ã³ãã³ãä¸ã¤ã§ãããã¤ãå®äºããæ軽ãã«ãªã£ã¦ãããããã«ãããµã¼ãã®ã¡ã³ããã³ã¹ããã¼ã¿ãã¼ã¹ã®ãã¨ãªã©ä¸åèããã«éçºã ãã«å°å¿µã§ããã Herokuä¸ã§Sinatraãåãã ã ãä½ã§ãRailsã¨ããã®ã¯æå¤ã¨é¢åã ãRailsã§ã¯éåéãããããæãããSinatraãHerokuä¸ã§å±éãã¦ã¿ããã ä»åç´¹ä»ããããªã¼ã¦ã§ã¢ã¯Heroku Sinatra AppãHerokuä¸ã§Sinatraã¢ããªã±ã¼ã·ã§ã³ãå±éãããµã³ãã«ã¢ããªã±ã¼ã·ã§ã³ã ãã½ã¼ã¹ã³ã¼ãã¯å ¬éããã¦ãããã©ã¤ã»ã³ã¹ã¯æè¨ããã¦ããªãã®ã§ã注æããã ãããã Heroku Sinatra Appã¯Herokuåãã¨ã¯è¨ããã®ã®ãç¹ã«ç¹æ®ãªãã¨ã¯ãã¦ããªããHerokuãSinatraã«ã対
http://github.com/spiritloose/Schenker åã« Ruby ã® Sinatra ã触ã£ã¦ã¿ã¦ãããªã¨ããã£ãã®ã§æè¿ä½ãå§ããã ã²ã¨ã¨ããæ©è½ã¯ããã£ã¦ããã®ã§å ¬éãã¦ã¿ãã HTTP::Engine + HTTP::Engine::Middleware + HTTPx::Dispatcher + Sinatra風ã¤ã³ã¿ã¼ãã§ã¼ã¹ ã¿ãããªæãã®ãã¬ã¼ã ã¯ã¼ã¯ãã£ã¦ãããDSLã # myapp.pl #!/usr/bin/env perl package MyApp; use Schenker; get '/' => sub { 'Hello, world!'; }; get '/hello/:name' => sub { my $args = shift; "Hello, $args->{name}!"; }; 㧠`./myapp.pl` ããã¨å
ã¯ããã« ããªãã¯ãRubyãã¨èãã¦æåã«ä½ãæãæµ®ãã¹ã¾ããï¼ããªãã¸ã§ã¯ãæåã¹ã¯ãªããè¨èªã§ãããã¨ãããã°ã©ãã³ã°ã®ã楽ããããéè¦ãã¦è¨è¨ãããè¨èªã§ãããã¨ãæè¿æ°ãããã¼ã¸ã§ã³ã§ãã1.9.1ããªãªã¼ã¹ããããã¨â¦â¦ã Rubyã«ã¯ãããããªç¹å¾´ãããã¾ãããRubyã¨ããåèªããããã«ãRuby on Railsããæãåºãæ¹ãå¤ãã®ã§ã¯ãªãã§ãããããRuby on Railsï¼ä»¥ä¸Railsï¼ã¯2004å¹´ã«å ¬éãããRubyç¨ã®Webã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã§ããã®çç£æ§ã®é«ããã注ç®ãæµ´ã³ãRubyã®ååãåºãããã¨ã«ã大ããè²¢ç®ãã¾ããã ã§ãããJavaãPHPãPerlãPythonãªã©ãä»ã®è¨èªã®ä¸çã§ã¯ããã¤ãã®ãã¬ã¼ã ã¯ã¼ã¯ããã®ããåã£ã¦ããã®ã«å¯¾ããRubyã®ä¸çã«ããã¦ã¯Railsã®å®æ度ã®é«ããããé·ããã©ã¤ãã«ä¸å¨ã®ç¶æ³ãç¶ãã¦ãã¾ããã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}