A call for inter-plugin communication

Andre Garzia andre at andregarzia.com
Mon Feb 13 11:15:04 EST 2012


Hey Folks,

I've been wondering why most of the plugins for LC do not publish an API
that developers (and other plugins) can call. Since the addition of
"dispatch", plugin developers could provide an API in the form of
dispatchable calls, it would be great. The plugins could dispatch some
calls to a registered object. This way we could start to exchange data
between our plugins. For example, I could build a "Dropbox IDE service
plugin", all plugins wanting to save stuff to dropbox could do it thru my
service plugin.

In mock xtalk script could go like:

dispatch "register_plugin" to stack "dropbox_service"

put "blablabla" into tParamsA["content"]
put "file.txt" into tParamsA["filename"]
dispatch "save_file" to stack "dropbox_service" with tParamsA

This would save other developers the need to implement dropbox on their own
for usage inside the IDE. Other useful cases could be for installers,
Developers who build Installers maker tools, could provide a set of APIs
that we could call, for example from inside standaloneSaved message. People
who build color pickers, could provide an API so that we could call their
pickers.

I am not saying that we need inter-plugin communications on standalones. I
think it is useful to have this kind of technology inside the IDE where we
have a dozen plugins that don't talk to each other.

Anyone care for a comment?

Cheer
andre


-- 
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.



More information about the use-livecode mailing list