YUI: Where are forms?
I am comparing ExtJS and YUI. Th开发者_Go百科ey seem pretty much tied on the technical side. ExtJs costs money, not much. But YUI is free.
Maybe I am missing something obvious, but ExtJs lets you define forms. I didn't see forms in YUI. Where are they?
YUI doesn't have a form component that is similar to the stuff in EXTJS. You'd have to build it yourself (either from markup, or your own JS).
ExtJS has FormPanels (a container of the widgets that make up a form), a FormLayout (a vehicle to help the developer place labels and input elements in a panel), and a BasicForm (encapsulates the DOM element at the heart of the FormPanel class). I have seen developers confuse these classes; be warned. :-)
For forms work with yui I recommend taking a look at http://javascript.neyric.com/inputex/
It offers a simple json based way for defining your forms with validation and all that jazz.
精彩评论