Widget vs. Utility vs. Interaction

Widget vs. Utility vs. Interaction


Hey all,
In working on the digitalbush.com maskedinput port this weekend, I
noticed that Josh Bush had written a great, little utility function
simply coined 'caret'. This function consits 28 lines and allows one
to set the caret position for an input, and also get the start and end
position of selected text within an input. (input being text input or
textarea) It's extremely useful for this plugin, and could see it
being useful in a situation like the 'Multiple Cities' demo for the
autocomplete plugin. It works quite while and is something that could
be added immediately if desired.
This begs a few questions, however:
1 - Are we welcoming new, small utilities like this into jq-ui?
2 - What exactly defines a utility?
3 - How do they (the three) differ in code/implentation?
4 - Are there any guidelines for what the code for a utility should
look like, or any particular style a utility should adhere to?
I found the answer to #2 here
http://jqueryui.pbwiki.com/Language-styleguide?SearchFor=utility&sp=15
in the 'Common terms' at the bottom, above the comments. I feel that
this could use some more specificity, and perhaps a dedicated page.
#3 seems somewhat straightforward, as a widget utilizes the widget
framework in place. But that still leaves the implementation of a
utility and interaction plugin.
Please do share any thoughts or facts about this. Any information will
be very helpful as I (and others) get further into development and
increase our contributions.
Thanks,
Andrew