Dmitri wrote:
> Hello
>
> I’ve been playing around with pidget for like 3 hours and I want to
> say that it’s a cool thing. However, I found it to be very very
> limited. I found out that pidget is only good for making forms with a
> large amount of fields. I also found pidget to be very inflexible
> since I couldn’t change the field name, or button name. For me, pidget
> was extremely annoying when I had to create a login page with one
> submit button, and fields for username and password. Pidget did not
> have the option to mask the password field with asterisks.
>
> Maybe I’m missing something, but is pidget only useful for making big
> forms and that’s it? Is pidget still far from being fully functional?
> If so, what could I expect from a fully functional pidget?
>
> Thanks
>
> Dmitri
>
You bring up some good points. Pidget definately makes a lot more sense
for big complex forms then it does for small simple forms. The main
reason we began work on this library was to provide consistency and
customizability of forms across large projects.
Also, I agree that the naming issue is a problem. Right now the only way
to access data across a post is to use databindings. In retrospect I
think databindings were basically a bad idea (I came up with them; I can
bash them). At least in their current incarnation they certainly are.
Originally when I came up with the idea I was looking for a way to
encapsulate the saving and retrieving of data to and from data sources
(flatfiles, database, LDAP, etc.). Databindings were a general purpose
solution to this problem. You could associate a set of widgets with a
databinding and then call a method on the databinding and then the
databinding would load the data from a data source into the widgets. The
data bindings themselves could be named and then used to retrieve data
from a post. They handled saving all the information about the widgets.
However I think they would probably be a real pain to use. I think a
better approach would be to allow pidgets themselves to be named. Oh,
another thing which I neglected to mention above, data bindings where
also there because it is difficult to name a widget which has other
widgets nested within it. For example, if you have to calendar widgets
on a screen and they both have text box contained within them named
"Foo" then you might end up with a naming conflict. The solution to this
is to tell widgets who their parent widget is so they can then use the
name of their parent widget in conjunction with their own name to
generate a name which is unique across an entire form. Then after a post
there can be static method associated with each widget to retrieve the
data which it represents.
Sorry if that was confusing. Ask question and I'll try to answer them as
best I can. Hopefully I'll get a chance to implement those ideas pretty
soon and then everything will be more clear.
Oh and as far as the current status of Pidget goes. I would say it is in
the early stages of development. Though, it has much potential, as
judged by it's creators. :)
--
David "Spartacus" Whittington
|