diff --git a/basis/furnace/asides/asides-docs.factor b/basis/furnace/asides/asides-docs.factor index b977474b5f..c5b7bdd537 100644 --- a/basis/furnace/asides/asides-docs.factor +++ b/basis/furnace/asides/asides-docs.factor @@ -5,7 +5,7 @@ IN: furnace.asides HELP: { $values { "responder" "a responder" } - { "responder'" asides } + { "responder'" "a new responder" } } { $description "Creates a new " { $link asides } " responder wrapping an existing responder." } ; @@ -22,7 +22,7 @@ ARTICLE: "furnace.asides" "Furnace asides" $nl "To use asides, wrap your responder in an aside responder:" { $subsection } -"The aside responder must be wrapped inside a session responder (" { $link } "), which in turn must be wrapped inside a database persistence responder (" { $link } "). The " { $vocab-link "furnace.alloy" } " vocabulary combines all of these responders into one." +"The asides responder must be wrapped inside a session responder (" { $link } "), which in turn must be wrapped inside a database persistence responder (" { $link } "). The " { $vocab-link "furnace.alloy" } " vocabulary combines all of these responders into one." $nl "Saving the current page in an aside which propagates through " { $link } " responses:" { $subsection begin-aside } diff --git a/basis/furnace/boilerplate/boilerplate-docs.factor b/basis/furnace/boilerplate/boilerplate-docs.factor index f8054c8d16..ad983c8dc1 100644 --- a/basis/furnace/boilerplate/boilerplate-docs.factor +++ b/basis/furnace/boilerplate/boilerplate-docs.factor @@ -1,5 +1,3 @@ -! Copyright (C) 2008 Your name. -! See http://factorcode.org/license.txt for BSD license. USING: help.markup help.syntax io.streams.string http.server.dispatchers ; IN: furnace.boilerplate diff --git a/basis/furnace/conversations/conversations-docs.factor b/basis/furnace/conversations/conversations-docs.factor index 5e161f2457..60844fadae 100644 --- a/basis/furnace/conversations/conversations-docs.factor +++ b/basis/furnace/conversations/conversations-docs.factor @@ -1,6 +1,53 @@ -USING: help.markup help.syntax ; +USING: help.markup help.syntax urls http words kernel +furnace.sessions furnace.db ; IN: furnace.conversations -ARTICLE: "furnace.conversations" "Furnace conversation scope" +HELP: +{ $values + { "responder" "a responder" } + { "responder'" "a new responder" } +} +{ $description "Creates a new " { $link conversations } " responder wrapping an existing responder." } ; -; +HELP: begin-conversation +{ $description "Starts a new conversation scope. Values can be stored in the conversation scope with " { $link cset } ", and the conversation can be continued with " { $link } "." } ; + +HELP: end-conversation +{ $description "Ends the current conversation scope." } ; + +HELP: +{ $values { "url" url } { "response" response } } +{ $description "Creates an HTTP response which redirects the client to the specified URL while continuing the conversation. Any values set in the current conversation scope will be visible to the resonder handling the URL." } ; + +HELP: cget +{ $values { "key" symbol } { "value" object } } +{ $description "Outputs the value of a conversation variable." } ; + +HELP: cset +{ $values { "value" object } { "key" symbol } } +{ $description "Sets the value of a conversation variable." } ; + +HELP: cchange +{ $values { "key" symbol } { "quot" "a quotation with stack effect " { $snippet "( old -- new )" } } } +{ $description "Applies the quotation to the old value of the conversation variable, and assigns the resulting value back to the variable." } ; + +ARTICLE: "furnace.conversations" "Furnace conversation scope" +"The " { $vocab-link "furnace.conversations" } " vocabulary implements conversation scope, which allows data to be passed between requests on a finer level of granularity than session scope." +$nl +"Conversation scope is used by form validation to pass validation errors between requests." +$nl +"To use conversation scope, wrap your responder in an conversation responder:" +{ $subsection } +"The conversations responder must be wrapped inside a session responder (" { $link } "), which in turn must be wrapped inside a database persistence responder (" { $link } "). The " { $vocab-link "furnace.alloy" } " vocabulary combines all of these responders into one." +$nl +"Managing conversation scopes:" +{ $subsection begin-conversation } +{ $subsection end-conversation } +{ $subsection } +"Reading and writing conversation variables:" +{ $subsection cget } +{ $subsection cset } +{ $subsection cchange } +"Note that conversation scope is serialized as part of the session, which means that only serializable objects can be stored there. See " { $link "furnace.sessions.serialize" } " for details." ; + +ABOUT: "furnace.conversations" diff --git a/basis/furnace/furnace-docs.factor b/basis/furnace/furnace-docs.factor index 0e2e6c1f40..c49940cc74 100644 --- a/basis/furnace/furnace-docs.factor +++ b/basis/furnace/furnace-docs.factor @@ -166,10 +166,8 @@ ARTICLE: "furnace" "Furnace web framework" } "Major functionality:" { $subsection "furnace.actions" } -{ $subsection "furnace.syndication" } -{ $subsection "furnace.boilerplate" } -{ $subsection "furnace.db" } "Server-side state:" +{ $subsection "furnace.db" } { $subsection "furnace.sessions" } { $subsection "furnace.conversations" } { $subsection "furnace.asides" } @@ -180,8 +178,10 @@ ARTICLE: "furnace" "Furnace web framework" { $subsection "html.templates" } { $subsection "html.templates.chloe" } { $subsection "html.templates.fhtml" } +{ $subsection "furnace.boilerplate" } "Utilities:" { $subsection "furnace.alloy" } +{ $subsection "furnace.syndication" } { $subsection "furnace.json" } { $subsection "furnace.redirection" } { $subsection "furnace.referrer" } ; diff --git a/basis/furnace/sessions/sessions-docs.factor b/basis/furnace/sessions/sessions-docs.factor index 6ec77e00f5..f7aac7e2e9 100644 --- a/basis/furnace/sessions/sessions-docs.factor +++ b/basis/furnace/sessions/sessions-docs.factor @@ -1,22 +1,6 @@ -! Copyright (C) 2008 Your name. -! See http://factorcode.org/license.txt for BSD license. USING: help.markup help.syntax io.streams.string quotations strings ; IN: furnace.sessions -HELP: -{ $values - - { "cookie" null } -} -{ $description "" } ; - -HELP: -{ $values - { "id" null } - { "session" null } -} -{ $description "" } ; - HELP: { $values { "responder" null } @@ -24,98 +8,18 @@ HELP: } { $description "" } ; -HELP: begin-session -{ $values - - { "session" null } -} -{ $description "" } ; - -HELP: check-session -{ $values - { "state/f" null } - { "state/f" null } -} -{ $description "" } ; - -HELP: empty-session -{ $values - - { "session" null } -} -{ $description "" } ; - -HELP: existing-session -{ $values - { "path" "a pathname string" } { "session" null } - { "response" null } -} -{ $description "" } ; - -HELP: get-session -{ $values - { "id" null } - { "session" null } -} -{ $description "" } ; - -HELP: init-session -{ $values - { "session" null } -} -{ $description "" } ; - HELP: init-session* { $values { "responder" null } } { $description "" } ; -HELP: put-session-cookie -{ $values - { "response" null } - { "response'" null } -} -{ $description "" } ; - -HELP: remote-host -{ $values - - { "string" string } -} -{ $description "" } ; - -HELP: request-session -{ $values - - { "session/f" null } -} -{ $description "" } ; - -HELP: save-session-after -{ $values - { "session" null } -} -{ $description "" } ; - HELP: schange { $values { "key" null } { "quot" quotation } } { $description "" } ; -HELP: session -{ $description "" } ; - -HELP: session-changed -{ $description "" } ; - -HELP: session-id-key -{ $description "" } ; - -HELP: sessions -{ $description "" } ; - HELP: sget { $values { "key" null } @@ -129,21 +33,13 @@ HELP: sset } { $description "" } ; -HELP: touch-session -{ $values - { "session" null } -} -{ $description "" } ; +ARTICLE: "furnace.sessions.serialize" "Session state serialization" -HELP: verify-session -{ $values - { "session" null } - { "session" null } -} -{ $description "" } ; +; ARTICLE: "furnace.sessions" "Furnace sessions" { $vocab-link "furnace.sessions" } + ; ABOUT: "furnace.sessions" diff --git a/basis/furnace/syndication/syndication-docs.factor b/basis/furnace/syndication/syndication-docs.factor index 7a9ec57468..e68a5a2965 100644 --- a/basis/furnace/syndication/syndication-docs.factor +++ b/basis/furnace/syndication/syndication-docs.factor @@ -1,5 +1,3 @@ -! Copyright (C) 2008 Your name. -! See http://factorcode.org/license.txt for BSD license. USING: help.markup help.syntax io.streams.string kernel sequences strings urls ; IN: furnace.syndication