From: Mark P. <mar...@mo...> - 2008-01-04 00:24:42
|
I am, at long last, playing around with using Webware for html pages that are information submission forms. I would like to create a dozen or so information request forms that are validated before being accepted. I can see that KidKit is loaded but I don't see how to invoke its examples. I tried adding line in Application.config... Contexts['KidKit'] = WebwarePath + '/KidKit' That displayed a link in the main page. Clicking the link gave a 404 error. Is there a BDU example of this somewhere? Along the same lines, I was playing with Ian Bicking's FunFormKit. I read through the pages about FunFormKit and didn't find a comment as to where to place the files, so I placed the FunFormKit directory in a working directory using MakeAppWorkDir.py. It is at the same level as Main.py. I added this line to Application.config: Contexts['FunFormKit'] = 'FunFormKit/Examples' I am getting an error, here is the tail end of the trace back: File "/opt/Webware-0.9.4/WebKit/AppServer.py", line 264, in plugIn [edit] raise KeyError, name KeyError: 'FunFormKit' Examples has __init__.py but it is empty. So, a couple of questions... - Is there a BDU example showing how to set up FunFormKit, KidKit, etc. ? - Is there a current favorite for a baker's dozen of validated forms? Many thanks, in advance, - Mark Phillips |
From: Christoph Z. <ci...@on...> - 2008-01-04 08:15:33
|
Mark Phillips wrote: > I am, at long last, playing around with using Webware for html pages > that are information submission forms. I would like to create a dozen > or so information request forms that are validated before being > accepted. > > I can see that KidKit is loaded but I don't see how to invoke its > examples. I tried adding line in Application.config... > > Contexts['KidKit'] = WebwarePath + '/KidKit' Don't do that. The KidKit plugin is loaded automatically if you have Kid installed, and you should see the KidKit example pages along with the other example pages e.g. for PSP. But KidKit is not the right thing for form validation anyway. > Along the same lines, I was playing with Ian Bicking's FunFormKit. I > read through the pages about FunFormKit and didn't find a comment as > to where to place the files, so I placed the FunFormKit directory in > a working directory using MakeAppWorkDir.py. It is at the same level > as Main.py. I added this line to Application.config: > > Contexts['FunFormKit'] = 'FunFormKit/Examples' I think you are confusing Plug-Ins and Contexts. KidKit and FunFormKit are both examples of Webware Plug-Ins. They are usually installed directly in the Webware directory, at the same level as the "WebKit" directory (you can control which Plug-Ins are loaded from where with two AppServer.config settings). The Contexts usually only contain your actual Webware servlets. Concerning form creation and validation, you can try out FormKit, FunFormKit und FormEncode. A while ago I was planning to integrate FormKit back into Webware, or create a better replacement, but never found the time. -- Chris |
From: Mark P. <mar...@mo...> - 2008-01-04 15:36:41
|
On Jan 4, 2008, at 12:15 AM, Christoph Zwerschke wrote: > I think you are confusing Plug-Ins and Contexts. KidKit and FunFormKit > are both examples of Webware Plug-Ins. They are usually installed > directly in the Webware directory, at the same level as the "WebKit" > directory (you can control which Plug-Ins are loaded from where with > two AppServer.config settings). The Contexts usually only contain your > actual Webware servlets. Thank you, Chris. So to exercise a plug-in, I need to set up a context that includes files that sub-class a plug? I am trying to get from Main.py to, say, the Register.py example in FunFormKit. Do I simply copy the register.py into the context directory and add an href link to it from Main.py? Is "http://dalchemy.com/opensource/formkit/" a good url for FormKit? - Mark |
From: Christoph Z. <ci...@on...> - 2008-01-04 16:13:53
|
Mark Phillips wrote: > So to exercise a plug-in, I need to set up a context that includes > files that sub-class a plug? Depends on what the plug-in provides. FunFormKit provides stuff for form generation and validation, plus a mixin-class for WebKit servlets: http://funformkit.sourceforge.net/FunFormKit/Docs/UserGuide.html#servlet-interface Please note that FunFormKit is somewhat outdated and not maintained any more - has been superseeded with FormEncode which is not a Webware plug-in but of course you can also use it with Webware. > I am trying to get from Main.py to, say, the Register.py example in > FunFormKit. Do I simply copy the register.py into the context > directory and add an href link to it from Main.py? Right. You can then modify Register.py according to your needs. > Is "http://dalchemy.com/opensource/formkit/" a good url for FormKit? Yes. FormKit is not really actively maintained either. -- Chris |
From: Mark P. <mar...@mo...> - 2008-01-04 23:55:54
|
On Jan 4, 2008, at 8:13 AM, Christoph Zwerschke wrote: > Please note that FunFormKit is somewhat outdated and not maintained > any > more - has been superseeded with FormEncode which is not a Webware > plug-in but of course you can also use it with Webware. [snip] > FormKit is not really actively maintained either. Is this sort of thing passe at this point? What approach is up to date? - Mark |
From: Christoph Z. <ci...@on...> - 2008-01-05 08:03:20
|
Mark Phillips wrote: > On Jan 4, 2008, at 8:13 AM, Christoph Zwerschke wrote: > >> Please note that FunFormKit is somewhat outdated and not maintained >> any >> more - has been superseeded with FormEncode which is not a Webware >> plug-in but of course you can also use it with Webware. > [snip] >> FormKit is not really actively maintained either. > > Is this sort of thing passe at this point? What approach is up to date? Since the whole Webware approach is kind of passee that's difficult to answer ;-) My approach is to do my own form creation and validation directly in the servlets, with some common methods in my base classes. -- Chris |
From: Matt F. <mat...@gm...> - 2008-01-18 14:44:35
|
On Jan 4, 2008 6:55 PM, Mark Phillips <mar...@mo...> wrote: > > > FormKit is not really actively maintained either. > > Is this sort of thing passe at this point? What approach is up to date? > As one of the two authors of FK, I can confirm this. I don't know that it's passe, we are still using it extensively on past (running) projects. In the present and the future, I have invested time using ToscaWidgets with FormEncode in Pylons. I had integrated FK into Pylons, and it worked fine; I was hoping that TW would bring lots of great widgets from a larger widget library, including client-side framework integration and stuff like that. At this point, I'd say that it was a poor investment to learn over just making more FK stuff for Pylons... I'd say that TW is a big nasty mess; the hardest library to understand that I've ever seen, and I'm pretty familiar with Twisted! It works mostly, but when something doesn't work, good luck finding out where or why. I'm not sure how form processing could have gotten that complicated... it's pretty much strings in and strings out. If anyone wants to take FormKit and integrate it, fix it, overhaul it, by all means, it's there for the taking. -- Matt |
From: Mark P. <mar...@mo...> - 2008-01-19 15:34:08
|
On Jan 18, 2008, at 6:44 AM, Matt Feifarek wrote: > I don't know that it's passe, we are still using it extensively on > past (running) projects. In the present and the future, I have > invested time using ToscaWidgets with FormEncode in Pylons. Thanks for the comment, Matt. It helps me in making a decision. - Mark |
From: Ian B. <ia...@co...> - 2008-01-21 19:38:26
|
Matt Feifarek wrote: > On Jan 4, 2008 6:55 PM, Mark Phillips <mar...@mo... > <mailto:mar...@mo...>> wrote: > > > > FormKit is not really actively maintained either. > > Is this sort of thing passe at this point? What approach is up to date? > > > As one of the two authors of FK, I can confirm this. > > I don't know that it's passe, we are still using it extensively on past > (running) projects. In the present and the future, I have invested time > using ToscaWidgets with FormEncode in Pylons. > > I had integrated FK into Pylons, and it worked fine; I was hoping that > TW would bring lots of great widgets from a larger widget library, > including client-side framework integration and stuff like that. > > At this point, I'd say that it was a poor investment to learn over just > making more FK stuff for Pylons... I'd say that TW is a big nasty mess; > the hardest library to understand that I've ever seen, and I'm pretty > familiar with Twisted! It works mostly, but when something doesn't work, > good luck finding out where or why. I'm not sure how form processing > could have gotten that complicated... it's pretty much strings in and > strings out. The option no one seems to consider, but which I continue to advocate, is using FormEncode with htmlfill and ad hoc templates to generate the actual HTML forms (because once you take out the value filling, error filling, and validation, it's easy to generate HTML forms). Ian |
From: Matt F. <mat...@gm...> - 2008-01-28 17:24:20
|
On Jan 20, 2008 8:33 PM, Ian Bicking <ia...@co...> wrote: > The option no one seems to consider, but which I continue to advocate, > is using FormEncode with htmlfill and ad hoc templates to generate the > actual HTML forms (because once you take out the value filling, error > filling, and validation, it's easy to generate HTML forms). > Yeah, your position on that is well-known ;-) It's a philosophy I agree with, but my practical needs trumped philosophy, and I was hoping that ToscaWidgets would make my life easier. Doh. I tried pure formencode for a project, but what I ended up with was a giant if-elseif-else tree in every single controller action. And crazy complicated conditional logic in every single template. I guess I never figured out how to get htmlfill to work; the docs[1] made it sound fishy, and it seemed just too "magic" for me. I didn't like the idea of leaving markers in the template for errors. I guess I should try again. P.S. I am sick of this problem. Forms suck. I'd submit that people who "don't like the web" in your earlier blog post probably just really don't like html forms. [1] http://wiki.pylonshq.com/display/pylonsdocs/Form+Handling |
From: Ian B. <ia...@co...> - 2008-01-29 04:51:59
|
Matt Feifarek wrote: > On Jan 20, 2008 8:33 PM, Ian Bicking <ia...@co... > <mailto:ia...@co...>> wrote: > > The option no one seems to consider, but which I continue to advocate, > is using FormEncode with htmlfill and ad hoc templates to generate the > actual HTML forms (because once you take out the value filling, error > filling, and validation, it's easy to generate HTML forms). > > > > Yeah, your position on that is well-known ;-) It's a philosophy I agree > with, but my practical needs trumped philosophy, and I was hoping that > ToscaWidgets would make my life easier. Doh. > > I tried pure formencode for a project, but what I ended up with was a > giant if-elseif-else tree in every single controller action. And crazy > complicated conditional logic in every single template. I guess I never > figured out how to get htmlfill to work; the docs[1] made it sound > fishy, and it seemed just too "magic" for me. I didn't like the idea of > leaving markers in the template for errors. I guess I should try again. You don't technically have to leave markers in the templates; if you don't leave them there they are put in automatically right before the field with the error. The @validate decorator in Pylons helps with some of this. But anything that effects control flow is tricky to work with. Ian |