Hi !
It's great to have such good advices. Please continue :)
"make it more YUI-like", I like the idea !
a) Define your own namespace: definitely a todo (add an alias for
backward compatibility ?)
b) Use more of YAHOO.lang: done for every typeof (on the svn)
c) make field extend YAHOO.widget.Element: I didn't considered it
first because the component
was beta. But now that I look closer at the Element API, it seems
like an urging thing to do :)
d) Include the version number in your distribution folder: done
e) Field options should be handled through AttributeProvider: I
consider this as a part of c)
f) be skinnable: inputEx CSS is still incomplete and needs a lot of re-
factoring anyway.
(Memo: Add a skinname like in yui-skin-sam)
g) make group options "groupable": very good idea ! :)
h) If groups were enclosed in a fieldset element, a legend property
could be added: todo, make it optional ?
i) enclose each object definition in an anonymous function so as to
define shortcuts inside: yes ! However I have an issue with my API-
documentation
tool (JSDoc Toolkit). It won't be able to recognize the classes and
methods correctly.
I asked on the mailing-list (
http://tech.groups.yahoo.com/group/ydn-
javascript/message/29192)
if there was a way to use YUI documentation tool.
I might switch to jGrouseDoc as Denis suggested in response.
j) same issue as i). I started like that, but ended up writing all the
blabla.prototype for each
method because of my doc tool :(
k) use the YUI.Loader: Dav Glass proposed his help to help me do that
(
http://groups.google.com/group/inputex/browse_thread/thread/
1692d9222175e343)
l) Use more shortcuts within your methods: would be a part of c)
m & n) use CSS floats instead of tables to order elements
make classNames out of field names so users can tailor fields/
groups/form
might be included in the CSS re-factoring
Summary:
--------
1) Make inputEx.Field extend YAHOO.widget.Element:
- events => EventProvider
- field options => AttributeProvider
- use shortcuts
2) CSS:
- skinnable
- use CSS floats instead of tables to order elements
- make classNames out of field names so users can tailor fields/
groups/form
3) Optimization:
- switch to jGrouseDoc
- enclose components in anonymous functions
- use prototype={} or YAHOO.extend(...,...,{ methods: });
4) Other
- YAHOO.namespace
- make group options "groupable"
- fieldset in forms
- YUI Loader
Eric