Re: [Perl-widget-developer] XSP PerForm taglib (fwd)
Status: Alpha
Brought to you by:
spadkins
From: Matt S. <ma...@se...> - 2001-06-11 10:31:20
|
On Mon, 11 Jun 2001, Gunther Birznieks wrote: > My initial reaction is that I think this is much more complex than a widget > library that produces HTML and it's even less clear to me that XML is a > good delivery mechanism for abstracting forms. What XML gains you is parsability, so you can generate code easier when you just stick widgets on the form. > I truly believe that when you make an app into an HTML app vs a WML app vs > anything else that the screens are significantly different. Well that's fair enough, and you can do that too with this system. I believe you totally that WML and HTML forms are significantly different. The idea here though is to allow developers to use the same widget language for different forms. > I think that this XML stuff may be fine for content sites like newspapers, > but for an app it seems like it's a lot of work for much less gain than you > get on the pure content management side. I've changed the implementation a bit since I posted that, though you appear pretty set in stone about your ideas of a good widget system... So given a form as follows: <f:form name="mailinglist> <f:textfield name="email"/> <f:single-select name="type"/> <f:submit name="subscribe" value="Submit"/> <f:submit name="cancel" value="Cancel"/> </f:form> You can optionally (all functions are optional) supply the following subs: start_form_mailinglist end_form_mailinglist load_email validate_email load_type validate_type submit_subscribe submit_cancel I think (hope) the sub names are pretty self explanatory now. Each sub recieves a $ctxt object so you can maintain state. I'm thinking of including the form name in the widget callback subs somehow, so you can have widgets of the same name on the same page but in different forms. The return value of submit_* is a string that the library sends a redirect to. Anyway, this isn't the same goal as your Widget.pm library. You could never use that in AxKit/XSP because its designed very differently from any technology you are used to. So this is a simple way to do forms for people using AxKit, and I think it's a lot easier than the current methods (current methods available in AxKit/XSP, that is). Enjoy :-) -- <Matt/> /|| ** Founder and CTO ** ** http://axkit.com/ ** //|| ** AxKit.com Ltd ** ** XML Application Serving ** // || ** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** mod_perl news and resources: http://take23.org ** \\// //\\ // \\ |