[Rt-commit] r2555 - in experiments/Bamboo: doc ex/trivial/html

autrijus at bestpractical.com autrijus at bestpractical.com
Fri Apr 1 07:24:53 EST 2005


Author: autrijus
Date: Fri Apr  1 07:24:53 2005
New Revision: 2555

Modified:
   experiments/Bamboo/doc/notes
   experiments/Bamboo/ex/trivial/html/Counter.html
   experiments/Bamboo/ex/trivial/html/autohandler
Log:
* some more notes

Modified: experiments/Bamboo/doc/notes
==============================================================================
--- experiments/Bamboo/doc/notes	(original)
+++ experiments/Bamboo/doc/notes	Fri Apr  1 07:24:53 2005
@@ -5,6 +5,27 @@
     - ...write it back -- done implicitly to disk
    - display the counter
 
+
+{-
+- calculate the dispatcher
+- call it with %ARGS sent over by HTTP POST/GET
+- render its output
+- transform/skin it somewhat
+-}
+
+{-
+- first get %ARGS
+- retrieve bytecode from args
+- run url-to-action mapping (specific to the host)
+ - Catalyst-Plugin-Bamboo
+ - MasonX::Bamboo
+ - HTTP::Server::Simple::Mason::Bamboo
+ - Maypole-Bamboo
+ - Kwiki-Bamboo
+-}
+
+
+
 Model:
  - "Counter" class (inside facade)
  - request -> counter.html

Modified: experiments/Bamboo/ex/trivial/html/Counter.html
==============================================================================
--- experiments/Bamboo/ex/trivial/html/Counter.html	(original)
+++ experiments/Bamboo/ex/trivial/html/Counter.html	Fri Apr  1 07:24:53 2005
@@ -2,16 +2,41 @@
 Current counter is <% $::c->{cnt}->get('value') %>.
 
 <form method="post">
+
+<& $::c->update->links_as_html( text => "Update me" ) &>
+
+<& c->freeze_as_html &>
+
+<input name="<% $::c->{cnt}->freeze %>" type="hidden">
+
 <input name="<% $::c->{cnt}->call('reset') %>"
        type="hidden">
+
 <input name="<% $::c->{cnt}->call('increment') %>"
        type="hidden">
+
+<input name="<% $::c->{cnt}->curry_call('increment_by') %>"
+       type="input">
+
+<input name="<% $::c->{cnt}->curry_call('increment_by') %>"
+       type="input">
+
+<input name="<% $::c->{cnt}->curry_set('foo') %>"
+       value="<% $::c->{cnt}->get('foo') %>"
+       type="input">
+
 <input name="<% $::c->{cnt}->call('increment') %>"
        type="submit"
        value="reset counter">
+
 </form>
 
 %# Action
 <%ATTR>
-Operations => [ 'new Counter cnt', 'call cnt increment' ]
+#-- labels
+# -- methods
+# -- attributes
+#-- classes
+# -- "new"
+Operations => [ 'new Counter cnt', 'call cnt increment', 'new string foo', 'set foo _ "whatever"' ]
 </%ATTR>

Modified: experiments/Bamboo/ex/trivial/html/autohandler
==============================================================================
--- experiments/Bamboo/ex/trivial/html/autohandler	(original)
+++ experiments/Bamboo/ex/trivial/html/autohandler	Fri Apr  1 07:24:53 2005
@@ -2,9 +2,47 @@
 # Controller
 Controller->run( $m->fetch_next->attr('Operations') );
 Controller->run( Controller->extract(\%ARGS) );
+
+....
+$m->notes( x => 1 );
+$m->subexec("/another_url.html", %some_other_args);
+$m->notes( 'x' );
+....
+
 $m->call_next; $m->abort;
 </%PERL>
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 <%INIT>
 # Model
 {
@@ -70,6 +108,15 @@
 
     package Counter;
 
+    # Object
+    #     :attributes
+    #         - GET
+    #         - PUT
+    #         - DELETE
+    #     :methods
+    #         - call
+    #             - RC (result code)
+
     use YAML;
     use HTTP::Status;
     use fields qw( value );


More information about the Rt-commit mailing list