Brian Cherne schrieb:
> On 3/26/07, *Jörn Zaefferer* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> 
> wrote:
>
>     Unfortuanetely, Javadoc is a bit limited for documenting jQuery
>     plugins.
>     For example, most plugins offer "options", that is, they accept a
>     object
>     whose properties are used to override any set defaults. How do you
>     document all these options via Javadoc?
>
>
> That is a very good question and a serious limitation. Do you think no 
> standard is better than an incomplete standard? Maybe someone should 
> come up with jQueryDoc ;-)
We are pretty close to scriptdoc, but not the same. I wonder if John 
could move the efforts around scriptdoc to the jQuery community, that 
could help alot to bring both forward.
> And back to Howard's initial message: Is there a standard for plug-ins 
> to follow?
I've read a lot of plugin code since I came to jQuery, and wrote some 
parts of the current plugin authoring guide. That was more an approach 
to document standards, instead of actually standarizing anything. Of 
course those change pretty fast, and currently I consider the guide to 
be out of date on several parts. Mainly because my own coding style 
changed a lot, as you can observe by comparing my tooltip plugin and the 
accordion or the treeview ;)

There is one important convention that every plugin should, maybe even 
must stick to: Provide sensible defaults for every option, and make it 
possible to customize as much as reasonable. The result is that everyone 
can start using a plugin withou reading too much or any documentation at 
all.
That sets the inital barrier very low, something I consider very 
important. I hate having to give up using some great framework or 
software just because its too hard to get it working the first time and 
I lack the time to do it.
By providing lots of options, based on actual requirements or requests, 
a plugin can be pushed around to do anything you like it to. After 
figuring out how to use a plugin, its easy to learn how to customize it.
I'm adding additonal features to my plugins once there are one or two 
requests for it, seems to work pretty well so far.

I hope that babbling about my own experiences on those could answer your 
question a bit.

-- 
Jörn Zaefferer

http://bassistance.de


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to