Slide 1

Slide 1 text

Manos Web apps for the lazy hacker Jérémie Laval http://blog.neteril.org http://twitter.com/jeremie_laval IRC garuma on #manos @ GIMPNet.org

Slide 2

Slide 2 text

Personal context Manos Taking a tour: Apachaï Closing note Background 2 / 23

Slide 3

Slide 3 text

Personal context Manos Taking a tour: Apachaï Closing note Background ¤ Doing HTML pages when I was young 2 / 23

Slide 4

Slide 4 text

Personal context Manos Taking a tour: Apachaï Closing note Background ¤ Doing HTML pages when I was young ¤ Sprinkled ugly PHP to make it dynamic 2 / 23

Slide 5

Slide 5 text

Personal context Manos Taking a tour: Apachaï Closing note Background ¤ Doing HTML pages when I was young ¤ Sprinkled ugly PHP to make it dynamic ¤ 2 / 23

Slide 6

Slide 6 text

Personal context Manos Taking a tour: Apachaï Closing note Background ¤ Doing HTML pages when I was young ¤ Sprinkled ugly PHP to make it dynamic ¤ ¤ Moved on to C# / desktop coding 2 / 23

Slide 7

Slide 7 text

Personal context Manos Taking a tour: Apachaï Closing note Background Disclaimer 3 / 23

Slide 8

Slide 8 text

Personal context Manos Taking a tour: Apachaï Closing note But wait, web has gotten better 4 / 23

Slide 9

Slide 9 text

Personal context Manos Taking a tour: Apachaï Closing note But wait, web has gotten better ¤ HTML 5, is that a title? 4 / 23

Slide 10

Slide 10 text

Personal context Manos Taking a tour: Apachaï Closing note But wait, web has gotten better ¤ HTML 5, is that a title? ¤ CSS 3, non-designer best friend 4 / 23

Slide 11

Slide 11 text

Personal context Manos Taking a tour: Apachaï Closing note But wait, web has gotten better ¤ HTML 5, is that a title? ¤ CSS 3, non-designer best friend ¤ Javascript, more than animated cursor 4 / 23

Slide 12

Slide 12 text

Personal context Manos Taking a tour: Apachaï Closing note But wait, web has gotten better ¤ HTML 5, is that a title? ¤ CSS 3, non-designer best friend ¤ Javascript, more than animated cursor What about .NET web application frameworks? 4 / 23

Slide 13

Slide 13 text

Personal context Manos Taking a tour: Apachaï Closing note Once upon a time... Someone was wrong on the Internet 5 / 23

Slide 14

Slide 14 text

Personal context Manos Taking a tour: Apachaï Closing note They created 6 / 23

Slide 15

Slide 15 text

Personal context Manos Taking a tour: Apachaï Closing note They created ASP 6 / 23

Slide 16

Slide 16 text

Personal context Manos Taking a tour: Apachaï Closing note They created ASP (Hint: VBScript as a default language) 6 / 23

Slide 17

Slide 17 text

Personal context Manos Taking a tour: Apachaï Closing note Hmmm... 7 / 23

Slide 18

Slide 18 text

Personal context Manos Taking a tour: Apachaï Closing note Tried to fix it ASP 8 / 23

Slide 19

Slide 19 text

Personal context Manos Taking a tour: Apachaï Closing note Hmmm... 9 / 23

Slide 20

Slide 20 text

Personal context Manos Taking a tour: Apachaï Closing note Truth told It's apparently better today 10 / 23

Slide 21

Slide 21 text

Personal context Manos Taking a tour: Apachaï Closing note In real (hacker) life All too bloated 11 / 23

Slide 22

Slide 22 text

Personal context Manos Taking a tour: Apachaï Closing note What I wanted 12 / 23

Slide 23

Slide 23 text

Personal context Manos Taking a tour: Apachaï Closing note What I wanted ¤ KISS (Keep It Simple Stupid) 12 / 23

Slide 24

Slide 24 text

Personal context Manos Taking a tour: Apachaï Closing note What I wanted ¤ KISS (Keep It Simple Stupid) ¤ Let me code my way 12 / 23

Slide 25

Slide 25 text

Personal context Manos Taking a tour: Apachaï Closing note What I wanted ¤ KISS (Keep It Simple Stupid) ¤ Let me code my way ¤ Integrate with existing stuff 12 / 23

Slide 26

Slide 26 text

Personal context Manos Taking a tour: Apachaï Closing note What I wanted ¤ KISS (Keep It Simple Stupid) ¤ Let me code my way ¤ Integrate with existing stuff What I really need is a lib that talks HTTP 12 / 23

Slide 27

Slide 27 text

Personal context Manos Taking a tour: Apachaï Closing note What I wanted ¤ KISS (Keep It Simple Stupid) ¤ Let me code my way ¤ Integrate with existing stuff What I really need is a lib that talks HTTP But a bit more sophisticated than HttpListener 12 / 23

Slide 28

Slide 28 text

Personal context Manos Taking a tour: Apachaï Closing note But have no fear A hero came 13 / 23

Slide 29

Slide 29 text

Personal context Manos Taking a tour: Apachaï Closing note Often pictured as 14 / 23

Slide 30

Slide 30 text

Personal context Manos Taking a tour: Apachaï Closing note But for real ( Jackson Harper, Manos creator and cartel manager during his free time ) 15 / 23

Slide 31

Slide 31 text

Personal context Manos Taking a tour: Apachaï Closing note What's Manos in the end 16 / 23

Slide 32

Slide 32 text

Personal context Manos Taking a tour: Apachaï Closing note What's Manos in the end ¤ Standalone HTTP server 16 / 23

Slide 33

Slide 33 text

Personal context Manos Taking a tour: Apachaï Closing note What's Manos in the end ¤ Standalone HTTP server ¤ Evented IO 16 / 23

Slide 34

Slide 34 text

Personal context Manos Taking a tour: Apachaï Closing note What's Manos in the end ¤ Standalone HTTP server ¤ Evented IO ¤ Parse and produce plain old HTTP 16 / 23

Slide 35

Slide 35 text

Personal context Manos Taking a tour: Apachaï Closing note What's Manos in the end ¤ Standalone HTTP server ¤ Evented IO ¤ Parse and produce plain old HTTP ¤ Not tied to any content/template framework 16 / 23

Slide 36

Slide 36 text

Personal context Manos Taking a tour: Apachaï Closing note What's Manos in the end ¤ Standalone HTTP server ¤ Evented IO ¤ Parse and produce plain old HTTP ¤ Not tied to any content/template framework ¤ Code just with C# and a couple of attributes 16 / 23

Slide 37

Slide 37 text

Personal context Manos Taking a tour: Apachaï Closing note Bootstraping How it all begun $ manos -i apachai initing: apachai $ manos -b COMPILING SOLUTION: '0' '/home/jeremie/mono/manostest/apachai' /usr/local/lib/manos/Manos.dll $ cd apachai $ manos -s Running apachai.apachai on port 8080. 17 / 23

Slide 38

Slide 38 text

Personal context Manos Taking a tour: Apachaï Closing note Setting up handlers Simply getting a root page [Route ("/")] public void Index (IManosContext ctx) { Log.Info ("Woohoo, someone visited our website"); ctx.Response.SendFile (Path.Combine ("Templates", "base.html")); ctx.Response.End (); } 18 / 23

Slide 39

Slide 39 text

Personal context Manos Taking a tour: Apachaï Closing note Setting up handlers Route handling delegated to external modules public Apachai () { Route ("/Content/", (staticContent = new StaticContentModule ("Content"))); Route ("/Pictures/", new PictureContentModule ()); AddPipe (new Manos.Util.AccessLogger ("access.log")); } 19 / 23

Slide 40

Slide 40 text

Personal context Manos Taking a tour: Apachaï Closing note Giving back JSON Nothing special really [Route ("/visits")] public void Visits (IManosContext ctx) { var cookie = ctx.Request.Cookies.Get ("foobar-apachai"); if (string.IsNullOrEmpty (cookie)) { ctx.Response.StatusCode = 404; ctx.Response.End (); } else { var counter = visits[cookie]; ctx.Response.End (string.Format ("{{ \"count\" : {0} }}", counter)); } } 20 / 23

Slide 41

Slide 41 text

Personal context Manos Taking a tour: Apachaï Closing note What's Apachaï Picture uploading for the rest of us http://apch.fr 21 / 23

Slide 42

Slide 42 text

Personal context Manos Taking a tour: Apachaï Closing note What's Apachaï Picture uploading for the rest of us http://apch.fr ¤ Leverage TrollStation (Twitter) and Pinta (Effects) 21 / 23

Slide 43

Slide 43 text

Personal context Manos Taking a tour: Apachaï Closing note What's Apachaï Picture uploading for the rest of us http://apch.fr ¤ Leverage TrollStation (Twitter) and Pinta (Effects) ¤ TagLib# for metadata handling 21 / 23

Slide 44

Slide 44 text

Personal context Manos Taking a tour: Apachaï Closing note What's Apachaï Picture uploading for the rest of us http://apch.fr ¤ Leverage TrollStation (Twitter) and Pinta (Effects) ¤ TagLib# for metadata handling ¤ JSON and AJAX driven 21 / 23

Slide 45

Slide 45 text

Personal context Manos Taking a tour: Apachaï Closing note What's Apachaï Picture uploading for the rest of us http://apch.fr ¤ Leverage TrollStation (Twitter) and Pinta (Effects) ¤ TagLib# for metadata handling ¤ JSON and AJAX driven ¤ Redis backed 21 / 23

Slide 46

Slide 46 text

Personal context Manos Taking a tour: Apachaï Closing note What's Apachaï Picture uploading for the rest of us http://apch.fr ¤ Leverage TrollStation (Twitter) and Pinta (Effects) ¤ TagLib# for metadata handling ¤ JSON and AJAX driven ¤ Redis backed ¤ https://github.com/garuma/apachai 21 / 23

Slide 47

Slide 47 text

Personal context Manos Taking a tour: Apachaï Closing note Future driven processing 22 / 23

Slide 48

Slide 48 text

Personal context Manos Taking a tour: Apachaï Closing note Releasing season ¤ Manos 0.1.2 released! £ https://github.com/jacksonh/manos/tarball/v0.1.2 23 / 23

Slide 49

Slide 49 text

Personal context Manos Taking a tour: Apachaï Closing note Releasing season ¤ Manos 0.1.2 released! £ https://github.com/jacksonh/manos/tarball/v0.1.2 ¤ Apachaï 1.0 released! £ https://github.com/garuma/apachai/tarball/1.0 23 / 23