[Rt-commit] r2570 - in experiments/Bamboo: doc ex/trivial/html
autrijus at bestpractical.com
autrijus at bestpractical.com
Sun Apr 3 08:50:35 EDT 2005
Author: autrijus
Date: Sun Apr 3 08:50:35 2005
New Revision: 2570
Modified:
experiments/Bamboo/doc/notes
experiments/Bamboo/ex/trivial/html/Counter.html
experiments/Bamboo/ex/trivial/html/autohandler
Log:
* unbreak the app
Modified: experiments/Bamboo/doc/notes
==============================================================================
--- experiments/Bamboo/doc/notes (original)
+++ experiments/Bamboo/doc/notes Sun Apr 3 08:50:35 2005
@@ -189,16 +189,23 @@
* Facades register with the Controller
* Whenever a request comes in:
- * The virtual machine sets itself a clean state
- * The virtual machine validates that all ops are runnable?
- * For each op, the virtual machine validates all op parameters
+ * The virtual machine cleans up the lexical pad
+ * Global "persistent" objects/classes may still remain, like $dbh
+ * Useful in FastCGI/ModPerl environments
+ * The virtual machine loads the ops:
+ * From the action-specific components
+ * From the HTTP GET/POST query string
+ * From other sources that has a loader backend defined
+ * The virtual machine compiles the ops:
+ * Validates that all ops are runnable
+ * Type-checks the validity of op parameters
* If any parameter isn't valid, throw an error
* In a webby context, this should give us the option of an error page
* OR a page redisplay with all fields "saved" and errors highlighted
* The virtual machine runs all ops
* The view renders, possibly calling back into the VM
- * The virtual machine clears itself
+ * The host application may invoke the VM again, or instrument it some more
Modified: experiments/Bamboo/ex/trivial/html/Counter.html
==============================================================================
--- experiments/Bamboo/ex/trivial/html/Counter.html (original)
+++ experiments/Bamboo/ex/trivial/html/Counter.html Sun Apr 3 08:50:35 2005
@@ -1,8 +1,9 @@
%# View
-Current counter is <% $::c->{cnt}->get('value') %>.
+Current <a href="Counter.html">counter</a> is <% $::c->{cnt}->get('value') %>.
<form method="post">
+<%DOC>
<& $::c->update->links_as_html( text => "Update me" ) &>
<& c->freeze_as_html &>
@@ -14,7 +15,6 @@
<input name="<% $::c->{cnt}->call('increment') %>"
type="hidden">
-
<input name="<% $::c->{cnt}->curry_call('increment_by') %>"
type="input">
@@ -24,8 +24,10 @@
<input name="<% $::c->{cnt}->curry_set('foo') %>"
value="<% $::c->{cnt}->get('foo') %>"
type="input">
+</%DOC>
-<input name="<% $::c->{cnt}->call('increment') %>"
+
+<input name="<% $::c->{cnt}->call('reset') %>"
type="submit"
value="reset counter">
@@ -38,5 +40,5 @@
# -- attributes
#-- classes
# -- "new"
-Operations => [ 'new Counter cnt', 'call cnt increment', 'new string foo', 'set foo _ "whatever"' ]
+Operations => [ 'new Counter cnt', 'call cnt increment' ]
</%ATTR>
Modified: experiments/Bamboo/ex/trivial/html/autohandler
==============================================================================
--- experiments/Bamboo/ex/trivial/html/autohandler (original)
+++ experiments/Bamboo/ex/trivial/html/autohandler Sun Apr 3 08:50:35 2005
@@ -3,6 +3,7 @@
use Counter;
# Model
+{
package Bamboo;
our $VERSION = '0.01';
@@ -28,14 +29,14 @@
$::seq++;
join('-' => 'Bamboo', Bamboo->VERSION, $::seq, "call", $self->class, $self->label, $method);
}
-
+}
# Bamboo::Controller
Bamboo::Controller->run( $m->fetch_next->attr('Operations') );
Bamboo::Controller->run( Bamboo::Controller->extract(\%ARGS) );
$m->notes( x => 1 );
-$m->subexec("/another_url.html", %some_other_args);
+# $m->subexec("/another_url.html", %some_other_args);
$m->notes( 'x' );
$m->call_next; $m->abort;
More information about the Rt-commit
mailing list