Intents - What a user wants to do
From bemoko developer wiki
An intent is the desire for a user to do something, whether that be search for nearest restaurants, look up the latest football scores or check your bank balance.
The intent may either be:
- A file name of resource found in the site folders
- For example a link to the resource downloads/mex_case_study.pdf in the site bemoko
- A named intent defined in the site-config.xml
- For example to access the intent name i in the site bemoko
- A named intent can be configured in the site-config.xml to hook into appropriate plugins, to access content or fire events, and define how the page should be rendered, e.g. which template to use to render.
Named intents & bemokoLive URIs
Named intents are included in a bemokoLive URIs, e.g.
- http://<domain>/[<application-context>/]<site>/<intent>/<parameters>?<query-string>
Multi-channel access
An intent is defined against a particular site which in turn provides well defined URL which a user can access to do what they want to do. This desire to do something, and the appropriate URL that the user should visit, is the same what ever the user context - i.e. the device being used (big screen, small screen), the channel accessing it (SMS, web browsing or voice) where the user is located or what the user preferences are. In this manner it is very easy to define single services that support multiple means of accessing them.
Intent API
See bemoko API for a background on the bemoko API
The intent can be accessed as follows
| API | plugin | template | expression |
|---|---|---|---|
| intent | Bemoko.intent | ${intent} | intent |
The follow properties are available on the intent object
| API | description |
|---|---|
| name | Name of the intent as specified in the URL |
| path | Path element of the URL, starting with a "/" and relative to the site intent |
| platformEndPoint | Platform endpoint i.e. base part of URL that includes the hostname, port (if not 80) and deployment context, e.g. http://localhost:8080/live |
| serverRelativeSiteEndPoint | Part of the URL starting with a "/" indicating where the site is mounted relative to the server name, for example if the URL was http://mysite.com/deploymentcontext/mysite/myintent, then the serverRelativeSiteEndPoint would be /deploymentcontext/mysite |
| siteEndPoint | Base URL to the site endpoint, for example if the URL was http://mysite.com/deploymentcontext/mysite/myintent, then the siteEndPoint would be http://mysite.com/deploymentcontext/mysite |
