[Rt-commit] r2560 - in experiments/Bamboo: . doc
jesse at bestpractical.com
jesse at bestpractical.com
Sat Apr 2 02:52:04 EST 2005
Author: jesse
Date: Sat Apr 2 02:52:04 2005
New Revision: 2560
Modified:
experiments/Bamboo/ (props changed)
experiments/Bamboo/doc/notes
Log:
r11464 at hualien: jesse | 2005-04-02 15:51:14 +0800
* Transcribed autrijus application model
* Designed a simple Flickr style REST API that we can publish all objects with
Modified: experiments/Bamboo/doc/notes
==============================================================================
--- experiments/Bamboo/doc/notes (original)
+++ experiments/Bamboo/doc/notes Sat Apr 2 02:52:04 2005
@@ -158,4 +158,80 @@
<input type="hidden" name="0-Bamboo::-0-Meta-OnSuccessNextPage" value="product_list.html">
+- Why bamboo is so flexible
+
+ - Doesn't replace your existing MVC framework.
+ - Means you never have to parse form parameters again
+ - Abstracts out redundant "controller" code from your web apps
+ - Makes it easy to web publish whole objects and APIs, not just
+ simple getters/setters.
+
+
+
+
+- Architecture
+
+
+
+- Facade Objects / Classes REGISTER with the Controller
+
+
+- Bamboo comes with Facade classes that can automatically introspect:
+
+ Class::DBI
+ Perl6::Subs
+ DBIx::SearchBuilder
+ Tangram
+
+
+- A typical runtime:
+
+* 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
+ * 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
+
+
+
+
+
+- Alternate simple REST controller.
+
+
+POST /Bamboo/Counter/increment
+
+Returns 200 OK on success
+
+ 401 Unauthorized if the counter is locked
+
+ 404 if there's no such method?
+
+
+
+
+POST /Bamboo/Counter/set
+value = 5
+
+Ditto above
+
+
+GET /Bamboo/Counter/current_count
+
+Status: ditto above
+
+Return values:
+
+ <count>5</count>
+
+The perl implementation of bamboo expects the facade classes with return
+values to return a perl hash of data. We then serialize it a simple XML tree.
More information about the Rt-commit
mailing list