diff --git a/README.md b/README.md index 5583676..9f70a31 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Bot building superpowers. ## Documentation * [How it Works](docs/index.md) -* [FlowScript](docs/flowscript.md) +* [The DeepDialog Scripting Language](docs/scripting.md) ## Example @@ -81,7 +81,7 @@ Step by step instructions - or checkout the starter bot: #### 1. Write Dialogs -Checkout the [FlowScript](docs/flowscript.md) for a high-level approach +Checkout [DeepDialog Script](docs/scripting.md) for a high-level approach to writing dynamic conversations. ```javascript diff --git a/docs/index.md b/docs/index.md index 96900e4..59ddb39 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,9 +4,9 @@ DeepDialog helps you write more sophisticated chatbots. Currently, you can connect to Facebook, Twitter, WhatsApp, Kik and many other services through Smooch.io. -## FlowScript +## DeepDialog Script -[FlowScript](./flowscript.md) is a high level language that makes it easy to script conversational flows. The rest of this document explains how the DeepDialog service works and describes the core service objects. +[DDS](./scripting.md) is a high level language that makes it easy to script conversational flows. The rest of this document explains how the DeepDialog service works and describes the core service objects. ### Dialogs: Functions for Conversational Logic diff --git a/docs/flowscript.md b/docs/scripting.md similarity index 95% rename from docs/flowscript.md rename to docs/scripting.md index e2508ef..5ecbd6b 100644 --- a/docs/flowscript.md +++ b/docs/scripting.md @@ -1,14 +1,14 @@ -# FlowScript +# DeepDialog Scripting Language ## Overview -FlowScript is a Node.js DSL that lets a chatbot developer write dynamic conversational flows. A flow is a sequence of commands for the bot to execute, such as sending messages with images and/or buttons, branching logic, loops and calling reusable conversational procedures, called dialogs. +The DeepDialog Script (DDS) is a Node.js DSL that lets a chatbot developer write dynamic conversational flows. A flow is a sequence of commands for the bot to execute, such as sending messages with images and/or buttons, branching logic, loops and calling reusable conversational procedures, called dialogs. -A single flow might encompass several interactions with a user, mediated by several HTTP requests on the bot server occurring over minutes, hours or days. In FlowScript you script these interactions in the order they happen in a conversation. The FlowScript compiler generates methods in the bot web server that handle each interaction that makes up a conversation. +A single flow might encompass several interactions with a user, mediated by several HTTP requests on the bot server occurring over minutes, hours or days. In DDS you write these interactions in the order they happen in a conversation. The script compiler generates methods in the bot web server that handle each interaction that makes up a conversation. This frees you from worrying about low-level details and keeps your conversational logic in a readable form, instead of scattered over several separate controller methods. The web server itself is [stateless](https://en.wikipedia.org/wiki/Service_statelessness_principle ) - all conversation state is stored in the DeepDialog backend. This means you can write your bot using familiar control flow structures, yet scale it like a traditional web service. -Dialogs and Sessions are the main building blocks of FlowScript. Dialogs are analogous to functions: they contain program logic which is run on your bot server. Like functions, they take parameters when started and return a value on completion. The DeepDialog backend provides the storage for managing the dialog call stack, including local and global variables. These capabilities are abstracted by the Session. Each session tracks the state of a conversation with an endpoint. This is usually a user, but could be a chatroom. +Dialogs and Sessions are the main building blocks of DDS. Dialogs are analogous to functions: they contain program logic which is run on your bot server. Like functions, they take parameters when started and return a value on completion. The DeepDialog backend provides the storage for managing the dialog call stack, including local and global variables. These capabilities are abstracted by the Session. Each session tracks the state of a conversation with an endpoint. This is usually a user, but could be a chatroom. In practical terms, a flow is a Javascript Array, and commands are Javascript Objects or functions. This means a developer can generate flows programmatically. Parts of the conversation can be generated dynamically by replacing part of the conversation tree with a function. For example, you can dynamically generate action buttons by providing a function to the `actions` parameter of a message command. If you need to, you can also access the DeepDialog API directly using a function placed inside a flow. See the documentation [here](./index.md). @@ -295,7 +295,7 @@ Note that strings returned by handlers will not be interpolated. Within a handl ## Command Types -The most basic kind of command is sending a message to the user. FlowScript provides commands for each of the message types supported by the DeepDialog API's messageSend endpoint. +The most basic kind of command is sending a message to the user. DScript provides commands for each of the message types supported by the DeepDialog API's messageSend endpoint. ### text Command diff --git a/src/flowdialog.js b/src/flowdialog.js index 0610a42..2c2ae4e 100644 --- a/src/flowdialog.js +++ b/src/flowdialog.js @@ -68,7 +68,7 @@ import log, {stringify} from './log'; /** -* FlowDialog - Allows users to script flows. See the [documentation on github](https://github.com/aneilbaboo/deepdialog-node-client/blob/aneil/flowDialog/docs/flowscript.md) +* FlowDialog - Allows users to script flows. See the [documentation on github](https://github.com/aneilbaboo/deepdialog-node-client/blob/aneil/flowDialog/docs/scripting.md) * @extends Dialog */ export default class FlowDialog extends Dialog { diff --git a/tests/flowdialog.test.js b/tests/flowdialog.test.js index 0f027b7..f068677 100644 --- a/tests/flowdialog.test.js +++ b/tests/flowdialog.test.js @@ -23,7 +23,7 @@ import FlowDialog, { } from '../src/flowdialog'; import {$} from '../src/dollar-operator'; -describe('FlowScript', function () { +describe('DeepDialog Script', function () { var sandbox; beforeEach(function () {