Interfacing dispatch
Reported by bahuvrihi | March 9th, 2009 @ 10:57 AM
The bindings for Ubiquity and the TapServer must be very simple.
- Determine what inputs are natural for Ubiquity
- Dispatch natural inputs to the Server
- Server returns a JSON with instructions for how to handle results
Results should only be handled in a small variety of ways. Currently:
- Inject a script into the DOM
- Run a script in Ubiquity (default if not JSON... the script will simply evaluate?)
Examples:
{inject: true, script: blah}
{inject: false, script: blah}
{script: blah}
"blah" // may be a bad idea...
This provides maximum flexibility, without an explosion in possibilities. Server-side a script can be made to inject HTML, redirect, etc.
A server-side issue remains regarding how to dispatch requests
and generate the response JSON. Middleware may be the answer for
the default server.
- Default server gets wrapped in middleware that adds a flag: env[tap.ubiquity] = true
- If response has header indicating JSON, then return
- If not, cache and send JSON asking for a redirect to pickup cache (ie the request is made and a new tab is opened or the page simply redirects)
Comments and changes to this ticket
-
bahuvrihi March 15th, 2009 @ 11:13 PM
- State changed from new to invalid
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Interaction with Tap from Ubiquity.