diff options
Diffstat (limited to 'static/talks/ox_yapc_na_2011')
86 files changed, 5149 insertions, 0 deletions
diff --git a/static/talks/ox_yapc_na_2011/001.html b/static/talks/ox_yapc_na_2011/001.html new file mode 100644 index 0000000..8198145 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/001.html @@ -0,0 +1,55 @@ +<html> +<head> +<title>001</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "002" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + OX + The hardest working two letters in Perl + + Jesse Luehrs, Infinity Interactive + + http://github.com/stevan/OX/ + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/002.html b/static/talks/ox_yapc_na_2011/002.html new file mode 100644 index 0000000..a44596b --- /dev/null +++ b/static/talks/ox_yapc_na_2011/002.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>002</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "001" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "002b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + history + + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/002b.html b/static/talks/ox_yapc_na_2011/002b.html new file mode 100644 index 0000000..9cbf8e7 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/002b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>002b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "002" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "002c" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + history + + * custom app-specific stuff + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/002c.html b/static/talks/ox_yapc_na_2011/002c.html new file mode 100644 index 0000000..e08e3b4 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/002c.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>002c</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "002b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "002d" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + history + + * custom app-specific stuff + * CGI::Application + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/002d.html b/static/talks/ox_yapc_na_2011/002d.html new file mode 100644 index 0000000..a91e7c0 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/002d.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>002d</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "002c" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "002z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + history + + * custom app-specific stuff + * CGI::Application + * Catalyst + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/002z.html b/static/talks/ox_yapc_na_2011/002z.html new file mode 100644 index 0000000..8bd3718 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/002z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>002z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "002d" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "003" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + history + + * custom app-specific stuff + * CGI::Application + * Catalyst + * Plack + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/003.html b/static/talks/ox_yapc_na_2011/003.html new file mode 100644 index 0000000..28fe492 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/003.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>003</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "002z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "004" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + OX - the web anti-framework + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/004.html b/static/talks/ox_yapc_na_2011/004.html new file mode 100644 index 0000000..d8f8072 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/004.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>004</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "003" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "005" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + Stevan + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/005.html b/static/talks/ox_yapc_na_2011/005.html new file mode 100644 index 0000000..0125c6a --- /dev/null +++ b/static/talks/ox_yapc_na_2011/005.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>005</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "004" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "005b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + what is OX? + + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/005b.html b/static/talks/ox_yapc_na_2011/005b.html new file mode 100644 index 0000000..1cda024 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/005b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>005b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "005" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "005c" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + what is OX? + + * Bread::Board + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/005c.html b/static/talks/ox_yapc_na_2011/005c.html new file mode 100644 index 0000000..5fcee53 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/005c.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>005c</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "005b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "005d" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + what is OX? + + * Bread::Board + * Path::Router + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/005d.html b/static/talks/ox_yapc_na_2011/005d.html new file mode 100644 index 0000000..4f7227b --- /dev/null +++ b/static/talks/ox_yapc_na_2011/005d.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>005d</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "005c" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "005z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + what is OX? + + * Bread::Board + * Path::Router + * Plack + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/005z.html b/static/talks/ox_yapc_na_2011/005z.html new file mode 100644 index 0000000..d95cb8c --- /dev/null +++ b/static/talks/ox_yapc_na_2011/005z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>005z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "005d" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "006.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + what is OX? + + * Bread::Board + * Path::Router + * Plack + * EXPERIMENTAL + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/006.pl.html b/static/talks/ox_yapc_na_2011/006.pl.html new file mode 100644 index 0000000..ffc70df --- /dev/null +++ b/static/talks/ox_yapc_na_2011/006.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>006.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "005z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "007" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + # app.psgi + use OX; + + my $counter = 0; + + router as { + route '/' => sub { $counter }; + route '/inc' => sub { ++$counter }; + route '/dec' => sub { --$counter }; + route '/reset' => sub { $counter = 0 }; + route '/set/:num' => sub { $counter = $_[1] }, ( + num => { isa => 'Int' }, + ); + }; + + xo; + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/007.html b/static/talks/ox_yapc_na_2011/007.html new file mode 100644 index 0000000..06c5585 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/007.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>007</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "006.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "007z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + Bread::Board + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/007z.html b/static/talks/ox_yapc_na_2011/007z.html new file mode 100644 index 0000000..23f6e50 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/007z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>007z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "007" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "008" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + Bread::Board + control your object's construction + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/008.html b/static/talks/ox_yapc_na_2011/008.html new file mode 100644 index 0000000..32a4897 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/008.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>008</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "007z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "008b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + Bread::Board has containers, containers contain services + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/008b.html b/static/talks/ox_yapc_na_2011/008b.html new file mode 100644 index 0000000..e65cc9f --- /dev/null +++ b/static/talks/ox_yapc_na_2011/008b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>008b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "008" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "008z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + Bread::Board has containers, containers contain services + an OX application is a Bread::Board container + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/008z.html b/static/talks/ox_yapc_na_2011/008z.html new file mode 100644 index 0000000..8146d28 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/008z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>008z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "008b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "009" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + Bread::Board has containers, containers contain services + an OX application is a Bread::Board container + all application objects are services in the container + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/009.html b/static/talks/ox_yapc_na_2011/009.html new file mode 100644 index 0000000..db93d88 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/009.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>009</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "008z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "009b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + services can depend on other services + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/009b.html b/static/talks/ox_yapc_na_2011/009b.html new file mode 100644 index 0000000..4b99ddc --- /dev/null +++ b/static/talks/ox_yapc_na_2011/009b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>009b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "009" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "009z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + services can depend on other services + dependencies are resolved first + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/009z.html b/static/talks/ox_yapc_na_2011/009z.html new file mode 100644 index 0000000..b0399ec --- /dev/null +++ b/static/talks/ox_yapc_na_2011/009z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>009z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "009b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "010" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + services can depend on other services + dependencies are resolved first + passed as constructor parameters to the requested service + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/010.html b/static/talks/ox_yapc_na_2011/010.html new file mode 100644 index 0000000..bc6cc44 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/010.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>010</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "009z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "011.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + at minimum, the router and the app coderef itself are services + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/011.pl.html b/static/talks/ox_yapc_na_2011/011.pl.html new file mode 100644 index 0000000..8ee8bbf --- /dev/null +++ b/static/talks/ox_yapc_na_2011/011.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>011.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "010" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "012.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + package App; + use OX; + + has model => (is => 'ro', isa => 'Model'); + has view => (is => 'ro', isa => 'View'); + has controller => ( + is => 'ro', + isa => 'Controller', + dependencies => ['model', 'view'], + ); + + router as { + route '/' => 'root.index'; + route '/inc' => 'root.inc'; + route '/dec' => 'root.dec'; + route '/reset' => 'root.reset'; + route '/set/:num' => 'root.set', ( + num => { isa => 'Int' }, + ); + }, (root => 'controller'); + + __PACKAGE__->meta->make_immutable; + 1; + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/012.pl.html b/static/talks/ox_yapc_na_2011/012.pl.html new file mode 100644 index 0000000..96cd998 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/012.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>012.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "011.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "013" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + package Controller; + use Moose; + + has view => (is => 'ro', isa => 'View', required => 1); + has model => (is => 'ro', isa => 'Model', required => 1); + + sub index { } + sub inc { my $self = shift; $self->model->inc } + sub dec { my $self = shift; $self->model->dec } + sub reset { my $self = shift; $self->model->reset } + sub set { my $self = shift; $self->model->set($_[1]) } + + around [qw(index inc dec set reset)] => sub { + my $orig = shift; + my $self = shift; + $self->$orig(@_); + return $self->view->render($self->model->count); + }; + + __PACKAGE__->meta->make_immutable; + 1; + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/013.html b/static/talks/ox_yapc_na_2011/013.html new file mode 100644 index 0000000..5f408cd --- /dev/null +++ b/static/talks/ox_yapc_na_2011/013.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>013</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "012.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "013b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + Path::Router + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/013b.html b/static/talks/ox_yapc_na_2011/013b.html new file mode 100644 index 0000000..3f95de1 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/013b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>013b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "013" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "013z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + Path::Router + translate incoming urls into structured data + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/013z.html b/static/talks/ox_yapc_na_2011/013z.html new file mode 100644 index 0000000..34098f6 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/013z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>013z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "013b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "014.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + Path::Router + translate incoming urls into structured data + also translate structured data into urls + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/014.pl.html b/static/talks/ox_yapc_na_2011/014.pl.html new file mode 100644 index 0000000..6a12f3f --- /dev/null +++ b/static/talks/ox_yapc_na_2011/014.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>014.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "013z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "015" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + route '/set/:num' => 'root.set', ( + num => { isa => 'Int' }, + ); + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/015.html b/static/talks/ox_yapc_na_2011/015.html new file mode 100644 index 0000000..face2c8 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/015.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>015</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "014.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "015z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + /set/23 -> { num => 23 } + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/015z.html b/static/talks/ox_yapc_na_2011/015z.html new file mode 100644 index 0000000..a1e9d1a --- /dev/null +++ b/static/talks/ox_yapc_na_2011/015z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>015z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "015" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "016" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + /set/23 -> { num => 23 } + not just the hashref, but also the code to call for this path + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/016.html b/static/talks/ox_yapc_na_2011/016.html new file mode 100644 index 0000000..31324a0 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/016.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>016</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "015z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "017.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + bidirectional + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/017.pl.html b/static/talks/ox_yapc_na_2011/017.pl.html new file mode 100644 index 0000000..33b08a3 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/017.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>017.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "016" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "018" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + $router->uri_for({num => 23}); # '/set/23' + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/018.html b/static/talks/ox_yapc_na_2011/018.html new file mode 100644 index 0000000..c5cf4d8 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/018.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>018</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "017.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "018b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + this translation is controlled by OX, and is pluggable + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/018b.html b/static/talks/ox_yapc_na_2011/018b.html new file mode 100644 index 0000000..a4b87a2 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/018b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>018b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "018" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "018z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + this translation is controlled by OX, and is pluggable + already seen examples + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/018z.html b/static/talks/ox_yapc_na_2011/018z.html new file mode 100644 index 0000000..b95a595 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/018z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>018z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "018b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "019.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + this translation is controlled by OX, and is pluggable + already seen examples + route '/' => sub { ... } + route '/' => 'root.index' + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/019.pl.html b/static/talks/ox_yapc_na_2011/019.pl.html new file mode 100644 index 0000000..c9f6863 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/019.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>019.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "018z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "020" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + has root => (is => 'ro', isa => 'Controller'); + + router ['HTTPMethod'] => as { + route '/' => 'root'; + }, (root => 'root'); + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/020.html b/static/talks/ox_yapc_na_2011/020.html new file mode 100644 index 0000000..ac93b16 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/020.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>020</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "019.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "020z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + GET request for '/' will call Controller::get + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/020z.html b/static/talks/ox_yapc_na_2011/020z.html new file mode 100644 index 0000000..7956fa7 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/020z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>020z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "020" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "021" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + GET request for '/' will call Controller::get + POST request for '/' will call Controller::post + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/021.html b/static/talks/ox_yapc_na_2011/021.html new file mode 100644 index 0000000..244af7c --- /dev/null +++ b/static/talks/ox_yapc_na_2011/021.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>021</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "020z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "022.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + this is just the sugar layer + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/022.pl.html b/static/talks/ox_yapc_na_2011/022.pl.html new file mode 100644 index 0000000..fc6ae76 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/022.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>022.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "021" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "023" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + package App; + use OX; + + sub configure_router { ... } + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/023.html b/static/talks/ox_yapc_na_2011/023.html new file mode 100644 index 0000000..2692e5a --- /dev/null +++ b/static/talks/ox_yapc_na_2011/023.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>023</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "022.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "024.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + or, you can replace the router entirely + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/024.pl.html b/static/talks/ox_yapc_na_2011/024.pl.html new file mode 100644 index 0000000..c2ebc7d --- /dev/null +++ b/static/talks/ox_yapc_na_2011/024.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>024.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "023" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "025" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + router 'My::Custom::Router::Class'; + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/025.html b/static/talks/ox_yapc_na_2011/025.html new file mode 100644 index 0000000..8c0336d --- /dev/null +++ b/static/talks/ox_yapc_na_2011/025.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>025</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "024.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "026" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + Plack + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/026.html b/static/talks/ox_yapc_na_2011/026.html new file mode 100644 index 0000000..5d47883 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/026.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>026</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "025" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "026z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + OX applications provide the Plack::Component api + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/026z.html b/static/talks/ox_yapc_na_2011/026z.html new file mode 100644 index 0000000..f24de1c --- /dev/null +++ b/static/talks/ox_yapc_na_2011/026z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>026z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "026" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "027" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + OX applications provide the Plack::Component api + ->prepare_app + ->call + ->to_app + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/027.html b/static/talks/ox_yapc_na_2011/027.html new file mode 100644 index 0000000..162825b --- /dev/null +++ b/static/talks/ox_yapc_na_2011/027.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>027</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "026z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "027b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + two types of middleware + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/027b.html b/static/talks/ox_yapc_na_2011/027b.html new file mode 100644 index 0000000..d8e2b59 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/027b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>027b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "027" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "027z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + two types of middleware + deployment (Stacktrace, ReverseProxy) + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/027z.html b/static/talks/ox_yapc_na_2011/027z.html new file mode 100644 index 0000000..8e97a48 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/027z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>027z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "027b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "028" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + two types of middleware + deployment (Stacktrace, ReverseProxy) + app-specific (Session) + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/028.html b/static/talks/ox_yapc_na_2011/028.html new file mode 100644 index 0000000..5368ab5 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/028.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>028</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "027z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "029.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + your application class should be able to declare app-specific middleware + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/029.pl.html b/static/talks/ox_yapc_na_2011/029.pl.html new file mode 100644 index 0000000..44456c7 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/029.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>029.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "028" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "030.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + router as { + wrap 'Plack::Middleware::Session'; + route '/' => ...; + }; + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/030.pl.html b/static/talks/ox_yapc_na_2011/030.pl.html new file mode 100644 index 0000000..eb4f260 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/030.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>030.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "029.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "031" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + has session_store => ( + is => 'ro', + isa => 'Str', + value => 'File', + ); + + router as { + wrap 'Plack::Middleware::Session' => ( + store => 'session_store', + ); + route '/' => ...; + }; + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/031.html b/static/talks/ox_yapc_na_2011/031.html new file mode 100644 index 0000000..3ac17bc --- /dev/null +++ b/static/talks/ox_yapc_na_2011/031.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>031</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "030.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "032.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + again, this is just the sugar layer + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/032.pl.html b/static/talks/ox_yapc_na_2011/032.pl.html new file mode 100644 index 0000000..f300495 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/032.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>032.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "031" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "033.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + package App; + use Moose; + extends 'OX::Application'; + + sub configure_router { + ... + } + + sub app_from_router { + ... + } + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/033.pl.html b/static/talks/ox_yapc_na_2011/033.pl.html new file mode 100644 index 0000000..927e723 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/033.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>033.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "032.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "034" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + package App; + use Moose; + use Bread::Board; + extends 'OX::Application'; + + sub BUILD { + my $self = shift; + container $self => as { + ... + }; + } + + sub configure_router { + ... + } + + sub app_from_router { + ... + } + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/034.html b/static/talks/ox_yapc_na_2011/034.html new file mode 100644 index 0000000..bbebf8f --- /dev/null +++ b/static/talks/ox_yapc_na_2011/034.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>034</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "033.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "035" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + benefits of OX + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/035.html b/static/talks/ox_yapc_na_2011/035.html new file mode 100644 index 0000000..233541a --- /dev/null +++ b/static/talks/ox_yapc_na_2011/035.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>035</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "034" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "035z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + reuse + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/035z.html b/static/talks/ox_yapc_na_2011/035z.html new file mode 100644 index 0000000..3d8e626 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/035z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>035z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "035" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "036.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + reuse + no wrapper classes required + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/036.pl.html b/static/talks/ox_yapc_na_2011/036.pl.html new file mode 100644 index 0000000..f9deefe --- /dev/null +++ b/static/talks/ox_yapc_na_2011/036.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>036.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "035z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "037.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + package App; + use OX; + + has model => (is => 'ro', isa => 'KiokuX::Model'); + has view => (is => 'ro', isa => 'Template'); + + ... + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/037.pl.html b/static/talks/ox_yapc_na_2011/037.pl.html new file mode 100644 index 0000000..d7aab4e --- /dev/null +++ b/static/talks/ox_yapc_na_2011/037.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>037.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "036.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "038" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + package App; + use OX; + + has dsn => (is => 'ro', isa => 'Str', default => 'dbi:sqlite:app.sqlite'); + has root => (is => 'ro', isa => 'Str', default => 'root/templates'); + + has model => ( + is => 'ro', + isa => 'KiokuX::Model', + dependencies => ['dsn'], + ); + has view => ( + is => 'ro', + isa => 'Template', + dependencies => { INCLUDE_PATH => 'root' }, + ); + + ... + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/038.html b/static/talks/ox_yapc_na_2011/038.html new file mode 100644 index 0000000..3ff5b17 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/038.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>038</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "037.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "039.pl" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + application classes are decoupled, and can be used independently + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/039.pl.html b/static/talks/ox_yapc_na_2011/039.pl.html new file mode 100644 index 0000000..8e6d00e --- /dev/null +++ b/static/talks/ox_yapc_na_2011/039.pl.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>039.pl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "038" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "040" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + App->new->model + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/040.html b/static/talks/ox_yapc_na_2011/040.html new file mode 100644 index 0000000..8f4847e --- /dev/null +++ b/static/talks/ox_yapc_na_2011/040.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>040</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "039.pl" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "040b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + get the model object exactly as it would be initialized within the app + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/040b.html b/static/talks/ox_yapc_na_2011/040b.html new file mode 100644 index 0000000..35596db --- /dev/null +++ b/static/talks/ox_yapc_na_2011/040b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>040b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "040" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "040z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + get the model object exactly as it would be initialized within the app + except without initializing the app + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/040z.html b/static/talks/ox_yapc_na_2011/040z.html new file mode 100644 index 0000000..f962fb6 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/040z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>040z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "040b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "041" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + get the model object exactly as it would be initialized within the app + except without initializing the app + very useful for standalone scripts + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/041.html b/static/talks/ox_yapc_na_2011/041.html new file mode 100644 index 0000000..e69e4a1 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/041.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>041</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "040z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "042" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + App->new(dsn => 'dbi:SQLite::memory:')->to_app + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/042.html b/static/talks/ox_yapc_na_2011/042.html new file mode 100644 index 0000000..6902569 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/042.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>042</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "041" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "042b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + override specific bits of the application at initialization time + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/042b.html b/static/talks/ox_yapc_na_2011/042b.html new file mode 100644 index 0000000..23f6979 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/042b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>042b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "042" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "042z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + override specific bits of the application at initialization time + makes testing very easy + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/042z.html b/static/talks/ox_yapc_na_2011/042z.html new file mode 100644 index 0000000..9fd7517 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/042z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>042z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "042b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "043" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + override specific bits of the application at initialization time + makes testing very easy + simple way to fit in mock objects, or adjust configuration for tests + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/043.html b/static/talks/ox_yapc_na_2011/043.html new file mode 100644 index 0000000..775474b --- /dev/null +++ b/static/talks/ox_yapc_na_2011/043.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>043</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "042z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "043b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + the entire structure is just building on existing technology + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/043b.html b/static/talks/ox_yapc_na_2011/043b.html new file mode 100644 index 0000000..287e7fa --- /dev/null +++ b/static/talks/ox_yapc_na_2011/043b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>043b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "043" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "043c" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + the entire structure is just building on existing technology + applications can use roles and inheritance + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/043c.html b/static/talks/ox_yapc_na_2011/043c.html new file mode 100644 index 0000000..eabf5e3 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/043c.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>043c</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "043b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "043z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + the entire structure is just building on existing technology + applications can use roles and inheritance + middleware just works + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/043z.html b/static/talks/ox_yapc_na_2011/043z.html new file mode 100644 index 0000000..6e92ab1 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/043z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>043z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "043c" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "044" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + the entire structure is just building on existing technology + applications can use roles and inheritance + middleware just works + components are just normal classes, can be built however you want + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/044.html b/static/talks/ox_yapc_na_2011/044.html new file mode 100644 index 0000000..7815a60 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/044.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>044</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "043z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "045" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + TODO + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/045.html b/static/talks/ox_yapc_na_2011/045.html new file mode 100644 index 0000000..6ec60ab --- /dev/null +++ b/static/talks/ox_yapc_na_2011/045.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>045</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "044" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "045z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + nested applications need work + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/045z.html b/static/talks/ox_yapc_na_2011/045z.html new file mode 100644 index 0000000..6fd7376 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/045z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>045z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "045" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "046" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + nested applications need work + in particular, how can services be shared? + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/046.html b/static/talks/ox_yapc_na_2011/046.html new file mode 100644 index 0000000..15ed09d --- /dev/null +++ b/static/talks/ox_yapc_na_2011/046.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>046</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "045z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "046z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + bread::board subcontainers + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/046z.html b/static/talks/ox_yapc_na_2011/046z.html new file mode 100644 index 0000000..652c406 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/046z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>046z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "046" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "047" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + bread::board subcontainers + need a syntax for this + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/047.html b/static/talks/ox_yapc_na_2011/047.html new file mode 100644 index 0000000..4c34c12 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/047.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>047</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "046z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "047z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + more extensible routebuilders + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/047z.html b/static/talks/ox_yapc_na_2011/047z.html new file mode 100644 index 0000000..552e354 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/047z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>047z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "047" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "048" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + + more extensible routebuilders + want a way to let the controller object control the dispatching + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/048.html b/static/talks/ox_yapc_na_2011/048.html new file mode 100644 index 0000000..6ea3361 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/048.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>048</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "047z" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "048b" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + cleaner underlying foundation + + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/048b.html b/static/talks/ox_yapc_na_2011/048b.html new file mode 100644 index 0000000..91346df --- /dev/null +++ b/static/talks/ox_yapc_na_2011/048b.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>048b</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "048" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "048z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + cleaner underlying foundation + more ways to customize the router + + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/048z.html b/static/talks/ox_yapc_na_2011/048z.html new file mode 100644 index 0000000..d33c48b --- /dev/null +++ b/static/talks/ox_yapc_na_2011/048z.html @@ -0,0 +1,56 @@ +<html> +<head> +<title>048z</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "048b" + ".html"; + return false; + } + if (keynum == 13 || keynum == 32) { + window.location = "049" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + cleaner underlying foundation + more ways to customize the router + more ways to customize the container + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/049.html b/static/talks/ox_yapc_na_2011/049.html new file mode 100644 index 0000000..110f4cf --- /dev/null +++ b/static/talks/ox_yapc_na_2011/049.html @@ -0,0 +1,52 @@ +<html> +<head> +<title>049</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 8) { + window.location = "048z" + ".html"; + return false; + } + if (keynum == 73 || keynum == 105) { + window.location = "index.html"; + return false; + } + return true; +} +</script> +</head> +<body onkeypress="return navigate(event)"> +<pre> + + + + + + + + + + + Any questions? + + http://github.com/stevan/OX/ + + + + + + + + + + + + + + +</pre> +</body> diff --git a/static/talks/ox_yapc_na_2011/index.html b/static/talks/ox_yapc_na_2011/index.html new file mode 100644 index 0000000..3687174 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/index.html @@ -0,0 +1,84 @@ +<html> +<head> +<title>OX - The hardest working two letters in Perl</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<script> +function navigate(e) { + var keynum = (window.event) // IE + ? e.keyCode + : e.which; + if (keynum == 13 || keynum == 32) { + window.location = "001.html"; + return false; + } + return true; +} +</script> +<style> +body { + font-family: sans-serif; +} +h4 { + color: #888; +} +</style> +</head> +<body> +<h4>Use SPACEBAR to peruse the slides or click one to start...<h4> +<h1>OX - The hardest working two letters in Perl</h1> +<ul> +<li><a href="001.html">OX</a></li> +<li><a href="002.html">history</a></li> +<li><a href="003.html">OX - the web anti-framework</a></li> +<li><a href="004.html">Stevan</a></li> +<li><a href="005.html">what is OX?</a></li> +<li><a href="006.pl.html"># app.psgi</a></li> +<li><a href="007.html">Bread::Board</a></li> +<li><a href="008.html">Bread::Board has containers, containers contain services</a></li> +<li><a href="009.html">services can depend on other services</a></li> +<li><a href="010.html">at minimum, the router and the app coderef itself are services</a></li> +<li><a href="011.pl.html">package App;</a></li> +<li><a href="012.pl.html">package Controller;</a></li> +<li><a href="013.html">Path::Router</a></li> +<li><a href="014.pl.html">route '/set/:num' => 'root.set', (</a></li> +<li><a href="015.html">/set/23 -> { num => 23 }</a></li> +<li><a href="016.html">bidirectional</a></li> +<li><a href="017.pl.html">$router->uri_for({num => 23}); # '/set/23'</a></li> +<li><a href="018.html">this translation is controlled by OX, and is pluggable</a></li> +<li><a href="019.pl.html">has root => (is => 'ro', isa => 'Controller');</a></li> +<li><a href="020.html">GET request for '/' will call Controller::get</a></li> +<li><a href="021.html">this is just the sugar layer</a></li> +<li><a href="022.pl.html">package App;</a></li> +<li><a href="023.html">or, you can replace the router entirely</a></li> +<li><a href="024.pl.html">router 'My::Custom::Router::Class';</a></li> +<li><a href="025.html">Plack</a></li> +<li><a href="026.html">OX applications provide the Plack::Component api</a></li> +<li><a href="027.html">two types of middleware</a></li> +<li><a href="028.html">your application class should be able to declare app-specific middleware</a></li> +<li><a href="029.pl.html">router as {</a></li> +<li><a href="030.pl.html">has session_store => (</a></li> +<li><a href="031.html">again, this is just the sugar layer</a></li> +<li><a href="032.pl.html">package App;</a></li> +<li><a href="033.pl.html">package App;</a></li> +<li><a href="034.html">benefits of OX</a></li> +<li><a href="035.html">reuse</a></li> +<li><a href="036.pl.html">package App;</a></li> +<li><a href="037.pl.html">package App;</a></li> +<li><a href="038.html">application classes are decoupled, and can be used independently</a></li> +<li><a href="039.pl.html">App->new->model</a></li> +<li><a href="040.html">get the model object exactly as it would be initialized within the app</a></li> +<li><a href="041.html">App->new(dsn => 'dbi:SQLite::memory:')->to_app</a></li> +<li><a href="042.html">override specific bits of the application at initialization time</a></li> +<li><a href="043.html">the entire structure is just building on existing technology</a></li> +<li><a href="044.html">TODO</a></li> +<li><a href="045.html">nested applications need work</a></li> +<li><a href="046.html">bread::board subcontainers</a></li> +<li><a href="047.html">more extensible routebuilders</a></li> +<li><a href="048.html">cleaner underlying foundation</a></li> +<li><a href="049.html">Any questions?</a></li> +</ul> +<p>This presentation was generated by <a +href="http://ingydotnet.github.com/vroom-pm">Vroom</a>. Use <SPACE> key to go +forward and <BACKSPACE> to go backwards. +</p> +</body> diff --git a/static/talks/ox_yapc_na_2011/slides.vroom b/static/talks/ox_yapc_na_2011/slides.vroom new file mode 100644 index 0000000..c013537 --- /dev/null +++ b/static/talks/ox_yapc_na_2011/slides.vroom @@ -0,0 +1,366 @@ +---- config +title: OX - The hardest working two letters in Perl +indent: 4 +height: 28 +width: 80 +skip: 0 +vimrc: colorscheme zellner + +---- center + +OX +The hardest working two letters in Perl + +Jesse Luehrs, Infinity Interactive + +http://github.com/stevan/OX/ + +---- + +== history + ++* custom app-specific stuff ++* CGI::Application ++* Catalyst ++* Plack + +---- center + +OX - the web anti-framework + +---- center + +== Stevan + +---- + +== what is OX? + ++* Bread::Board ++* Path::Router ++* Plack ++* EXPERIMENTAL + +---- perl,i4 + +---- include app.psgi + +---- + +Bread::Board ++control your object's construction + +---- + +Bread::Board has containers, containers contain services ++an OX application is a Bread::Board container ++all application objects are services in the container + +---- + +services can depend on other services ++dependencies are resolved first ++passed as constructor parameters to the requested service + +---- + +at minimum, the router and the app coderef itself are services + +---- perl,i4 + +package App; +use OX; + +has model => (is => 'ro', isa => 'Model'); +has view => (is => 'ro', isa => 'View'); +has controller => ( + is => 'ro', + isa => 'Controller', + dependencies => ['model', 'view'], +); + +router as { + route '/' => 'root.index'; + route '/inc' => 'root.inc'; + route '/dec' => 'root.dec'; + route '/reset' => 'root.reset'; + route '/set/:num' => 'root.set', ( + num => { isa => 'Int' }, + ); +}, (root => 'controller'); + +__PACKAGE__->meta->make_immutable; +1; + +---- perl,i4 + +package Controller; +use Moose; + +has view => (is => 'ro', isa => 'View', required => 1); +has model => (is => 'ro', isa => 'Model', required => 1); + +sub index { } +sub inc { my $self = shift; $self->model->inc } +sub dec { my $self = shift; $self->model->dec } +sub reset { my $self = shift; $self->model->reset } +sub set { my $self = shift; $self->model->set($_[1]) } + +around [qw(index inc dec set reset)] => sub { + my $orig = shift; + my $self = shift; + $self->$orig(@_); + return $self->view->render($self->model->count); +}; + +__PACKAGE__->meta->make_immutable; +1; + +---- + +Path::Router ++translate incoming urls into structured data ++also translate structured data into urls + +---- perl,i4 + +route '/set/:num' => 'root.set', ( + num => { isa => 'Int' }, +); + +---- + +/set/23 -> { num => 23 } ++not just the hashref, but also the code to call for this path + +---- + +bidirectional + +---- perl,i4 + +$router->uri_for({num => 23}); # '/set/23' + +---- + +this translation is controlled by OX, and is pluggable ++already seen examples ++route '/' => sub { ... } +route '/' => 'root.index' + +---- perl,i4 + +has root => (is => 'ro', isa => 'Controller'); + +router ['HTTPMethod'] => as { + route '/' => 'root'; +}, (root => 'root'); + +---- + +GET request for '/' will call Controller::get ++POST request for '/' will call Controller::post + +---- + +this is just the sugar layer + +---- perl,i4 + +package App; +use OX; + +sub configure_router { ... } + +---- + +or, you can replace the router entirely + +---- perl,i4 + +router 'My::Custom::Router::Class'; + +---- + +Plack + +---- + +OX applications provide the Plack::Component api ++->prepare_app +->call +->to_app + +---- + +two types of middleware ++deployment (Stacktrace, ReverseProxy) ++app-specific (Session) + +---- + +your application class should be able to declare app-specific middleware + +---- perl,i4 + +router as { + wrap 'Plack::Middleware::Session'; + route '/' => ...; +}; + +---- perl,i4 + +has session_store => ( + is => 'ro', + isa => 'Str', + value => 'File', +); + +router as { + wrap 'Plack::Middleware::Session' => ( + store => 'session_store', + ); + route '/' => ...; +}; + +---- + +again, this is just the sugar layer + +---- perl,i4 + +package App; +use Moose; +extends 'OX::Application'; + +sub configure_router { + ... +} + +sub app_from_router { + ... +} + +---- perl,i4 + +package App; +use Moose; +use Bread::Board; +extends 'OX::Application'; + +sub BUILD { + my $self = shift; + container $self => as { + ... + }; +} + +sub configure_router { + ... +} + +sub app_from_router { + ... +} + +---- + +benefits of OX + +---- + +reuse ++no wrapper classes required + +---- perl,i4 + +package App; +use OX; + +has model => (is => 'ro', isa => 'KiokuX::Model'); +has view => (is => 'ro', isa => 'Template'); + +... + +---- perl,i4 + +package App; +use OX; + +has dsn => (is => 'ro', isa => 'Str', default => 'dbi:sqlite:app.sqlite'); +has root => (is => 'ro', isa => 'Str', default => 'root/templates'); + +has model => ( + is => 'ro', + isa => 'KiokuX::Model', + dependencies => ['dsn'], +); +has view => ( + is => 'ro', + isa => 'Template', + dependencies => { INCLUDE_PATH => 'root' }, +); + +... + +---- + +application classes are decoupled, and can be used independently + +---- perl,i4 + +App->new->model + +---- + +get the model object exactly as it would be initialized within the app ++except without initializing the app ++very useful for standalone scripts + +---- + +App->new(dsn => 'dbi:SQLite::memory:')->to_app + +---- + +override specific bits of the application at initialization time ++makes testing very easy ++simple way to fit in mock objects, or adjust configuration for tests + +---- + +the entire structure is just building on existing technology ++applications can use roles and inheritance ++middleware just works ++components are just normal classes, can be built however you want + +---- + +TODO + +---- + +nested applications need work ++in particular, how can services be shared? + +---- + +bread::board subcontainers ++need a syntax for this + +---- + +more extensible routebuilders ++want a way to let the controller object control the dispatching + +---- + +cleaner underlying foundation ++more ways to customize the router ++more ways to customize the container + +---- center + +Any questions? + +http://github.com/stevan/OX/ |