[OpenAjaxInterop] Required parameters onPublish, onSubscribe

Howard Weingram weingram at tibco.com
Sun Dec 7 00:51:32 PST 2008


I would like to REQUIRE that the manager application provide an onPublish
and an onSubscribe function, even if these are dummy functions that simply
return true.  

My thinking is that if a developer wants to have this kind of non-security,
then s/he must at least say so definitively by providing a function that
always returns true.

If we instead make these functions optional (as they are now), it is easy to
simply forget to include one of them in the params object.

We already have an Error (BadParams) that covers the case where the params
object is invalid. 

Probably onSecurityAlert should be similar.

I have added (in the version I am editing) another params property called
scope, which is used as the scope when the onPublish, onSubscribe, etc.
callbacks are called. If no scope is provided, the default scope is the
"window" object. 

Let me know what you think, in particular about onPublish and onSubscribe
being required parameters.

Regards,
Howard

--
Howard Weingram      650.846.1000
Principal Architect  TIBCO Software Inc.

TIBCO PageBus(TM) delivers ultra-lightweight
publish-subscribe messaging for mash-ups.
Learn more at http://www.pagebus.org



More information about the interop mailing list