> Plugins, IMO, seem to be the weakest link when implemting jQuery, and > it would be great if there were some better models and guidelines for > plugin development that would make the end results better for > everyone.
Matt, I agree with most of what you said. But I don't agree that every function in every plugin should always be public. Like with any OO language, implementation details are hidden so that they can change without affecting the interface. Your public functions are your API and typically you want your API to remain fairly static over time. The wider the API the bigger the burden on you, the plugin author, to maintain and support it. And getting a wide API right the first time is hard to do (for non-trivial stuff). So there is a trade-off between the uber flexible/pluggable design and backward compat and/or future design constraints. I also agree that huge functions should be avoided. You mentioned blockUI, and that indeed is a good example of doing too much in one fn. I don't remember if you sent me a bug report for the line you had to change - I hope so! Thanks for the link to your context menu plugin. It looks excellent. Cheers!