From: Geoffrey T. <gta...@na...> - 2002-10-31 00:22:58
|
I just checked into CVS a couple of fixes that make auto-reload work properly on Windows too. (But not when running as a service. That will require a more ambitious change to the way ThreadedAppServerService.py works. It's on my to-do list but I can't say that I'll get to it anytime soon.) So I say go ahead and deprecate OneShot. - Geoff > -----Original Message----- > From: Ian Bicking [mailto:ia...@co...] > Sent: Wednesday, October 30, 2002 5:39 PM > To: Webware discuss > Subject: [Webware-discuss] Deprecating OneShot.cgi > > > I posted a question about this to the -devel list, but to > finalize it -- > does anyone object if OneShot is deprecated? The auto-reload feature > just added to CVS is vastly superior in all ways, IMHO. OneShot is a > source of bugs, strange corner cases, and confusion to new users. > > If deprecated, I will take all mention of it out of the docs, take it > out of MakeAppWorkDir.py, and put a warning message at the top of the > file, but OneShot will remain around in body if not in > spirit, at least > for 0.8. > > Ian > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > _______________________________________________ > Webware-discuss mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webware-discuss > |
From: Tim R. <ti...@pr...> - 2002-10-31 18:43:10
|
On Wed, 30 Oct 2002 16:38:41 -0600, Ian Bicking <ia...@co...> > >I posted a question about this to the -devel list, but to finalize it -- >does anyone object if OneShot is deprecated? The auto-reload feature >just added to CVS is vastly superior in all ways, IMHO. OneShot is a >source of bugs, strange corner cases, and confusion to new users. > >If deprecated, I will take all mention of it out of the docs, take it >out of MakeAppWorkDir.py, and put a warning message at the top of the >file, but OneShot will remain around in body if not in spirit, at least >for 0.8. My feelings are not particularly strong, but I wonder if we shouldn't let the auto-reload code age for more than a week before we kill OneShot. I don't think anyone is willing to certify the auto-reload code as "bug free", or even to certify that it has fewer bugs that OneShot: we just haven't had the experience. I use OneShot.cgi for development work because it gives me the perception of lower complexity, as well as lower impact on a lightly used web site. I know that each page runs with a "clean slate". I haven't tried the auto-reload feature (and I suspect very few of us have), so I don't know how I will feel about it, but I think it's a little early to yank OneShot out of the docs. Why don't we target that for 0.9? By the way, numerologists in the group should be amused by the subject line of the most recent digest, quoted here: Subject: Webware-discuss digest, Vol 1 #1111 - 11 msgs My only regret is that it came out one day before 11/1... -- - Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |
From: Ian B. <ia...@co...> - 2002-10-31 19:42:50
|
On Thu, 2002-10-31 at 12:43, Tim Roberts wrote: > My feelings are not particularly strong, but I wonder if we shouldn't let the > auto-reload code age for more than a week before we kill OneShot. I don't > think anyone is willing to certify the auto-reload code as "bug free", or > even to certify that it has fewer bugs that OneShot: we just haven't had the > experience. The real reason I brought up the deprecation for right now isn't because of auto-reload, but because I'm going through documentation and don't want to spend time documenting things I don't think people should use. Plus looking at documentation reminds me of things that exist that I'd forgotten about (like CGIWrapper). > I use OneShot.cgi for development work because it gives me the perception of > lower complexity, as well as lower impact on a lightly used web site. I know > that each page runs with a "clean slate". This is part of why I think OneShot should be deprecated -- it presents a different environment than you'd find in a running site. The development environment should be as close to the production environment as practically possible. I guess I've always thought OneShot was a hack, and it's not so much that auto-reload is a sure-fire replacement, but that OneShot has needed to go for a long time and auto-reload finally offers a replacement. Deprecating OneShot means experienced users will still have access to OneShot, but new users won't know it exists. I think a lot of new users either get the false impression that Webware is really slow because of OneShot, or that they can run it in a pure CGI environment using OneShot (i.e., your typical commercial host). Hopefully we can actually remove OneShot when auto-reload has been tested more, which will probably be after 0.8 -- it's the new-user experience that this level of deprecation is directed at. > I haven't tried the auto-reload > feature (and I suspect very few of us have), so I don't know how I will feel > about it Try it, I think you'll find it very pleasant. Ian |
From: Luke O. <lu...@me...> - 2002-11-01 01:30:51
|
I'll only add, we still use OneShot.cgi EXTENSIVELY on our development server, and will continue to do so for the near future, as our main dev server is win2K running as a service. But I absolutely vote for deprecating it, as it really feels like a hack, and has lead to late-found bugs due to the differences. We'll continue to use it secretly, probably put some time towards getting AutoReload to work as a service, and be happy. Remove it from the docs! Yay! - Luke |
From: Chuck E. <ChuckEsterbrook@StockAlerts.com> - 2002-11-05 07:53:47
|
I delivered a project for pay on a box that I had NO control over. OneShot was the ONLY way that I could get it working. Because the box was fast and the traffic was fairly low, it worked like a charm. I believe OneShot is still useful for this purpose. I have to veto the "deprecation" because if we deprecate it, then new developments will break it, and it will also be forgotten about in the docs. Regarding the newbie problems, we can now direct them to use the auto-reload feature, and also point out that OneShot is extremely slow and a last resort. -Chuck On Thursday 31 October 2002 11:43 am, Ian Bicking wrote: > On Thu, 2002-10-31 at 12:43, Tim Roberts wrote: > > My feelings are not particularly strong, but I wonder if we > > shouldn't let the auto-reload code age for more than a week before > > we kill OneShot. I don't think anyone is willing to certify the > > auto-reload code as "bug free", or even to certify that it has > > fewer bugs that OneShot: we just haven't had the experience. > > The real reason I brought up the deprecation for right now isn't > because of auto-reload, but because I'm going through documentation > and don't want to spend time documenting things I don't think people > should use. Plus looking at documentation reminds me of things that > exist that I'd forgotten about (like CGIWrapper). > > > I use OneShot.cgi for development work because it gives me the > > perception of lower complexity, as well as lower impact on a > > lightly used web site. I know that each page runs with a "clean > > slate". > > This is part of why I think OneShot should be deprecated -- it > presents a different environment than you'd find in a running site. > The development environment should be as close to the production > environment as practically possible. > > I guess I've always thought OneShot was a hack, and it's not so much > that auto-reload is a sure-fire replacement, but that OneShot has > needed to go for a long time and auto-reload finally offers a > replacement. > > Deprecating OneShot means experienced users will still have access to > OneShot, but new users won't know it exists. I think a lot of new > users either get the false impression that Webware is really slow > because of OneShot, or that they can run it in a pure CGI environment > using OneShot (i.e., your typical commercial host). Hopefully we can > actually remove OneShot when auto-reload has been tested more, which > will probably be after 0.8 -- it's the new-user experience that this > level of deprecation is directed at. > > > I haven't tried the auto-reload > > feature (and I suspect very few of us have), so I don't know how I > > will feel about it > > Try it, I think you'll find it very pleasant. > > Ian > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > _______________________________________________ > Webware-discuss mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webware-discuss |
From: Ian B. <ia...@co...> - 2002-11-05 08:37:22
|
On Tue, 2002-11-05 at 01:53, Chuck Esterbrook wrote: > I delivered a project for pay on a box that I had NO control over. > OneShot was the ONLY way that I could get it working. Because the box > was fast and the traffic was fairly low, it worked like a charm. > > I believe OneShot is still useful for this purpose. > > I have to veto the "deprecation" because if we deprecate it, then new > developments will break it, and it will also be forgotten about in the > docs. > > Regarding the newbie problems, we can now direct them to use the > auto-reload feature, and also point out that OneShot is extremely slow > and a last resort. Okay. I don't have any desire to document OneShot for new users -- I'd probably just want to leave it out of the user guide (or only have a very small note), and move what documentation there is to the reference documentation. Ian |
From: Chuck E. <ChuckEsterbrook@StockAlerts.com> - 2002-11-05 09:19:57
|
On Tuesday 05 November 2002 12:38 am, Ian Bicking wrote: > Okay. I don't have any desire to document OneShot for new users -- > I'd probably just want to leave it out of the user guide (or only > have a very small note), and move what documentation there is to the > reference documentation. > > Ian Basically fine by me. The User's Guide could say something short like: If you're stuck with a CGI-enabled web server that you have no control over (as if often the case with many host providers), consider using _OneShot.cgi_. This can work if your traffic is light enough and the hardware is fast enough. With _OneShot.cgi_ being a link to the section in the Install Guide. -Chuck |
From: <jo...@cy...> - 2002-10-31 18:53:58
|
Hi all I have a problem / question<BR> <BR> when pages are generated via an _action_ the <body> tags are not written correctly. However the same content written without using the _action_ method will write the <body> tages. For example (since this probably does not make sense)<BR> <BR> if my file is functest.py <BR> <BR> from WebKit.Page import Page<BR> class functest(Page):<BR> def writeContent(self):<BR> if self.request().hasField('func2'):<BR> self.func1(1)<BR> else:<BR> self.write('')<BR> <BR> def func1(self, trans):<BR> self.write('funct')<BR> <BR> def actions(self):<BR> return Page.actions(self) + ['func1']<BR> <BR> Then <BR> functest.py?_action_=funct1 Will not have a body tag <BR> <BR> where as<BR> <BR> functest.py?func2=1 will print the body tag<BR> <BR> <BR> How should I handel this to print the page correctly? <BR> BTW I am using webware 0.7 apache 2.0.43 wkcgi.exe and python 2.2.1 on winxppro<BR> <BR> thanks<BR> <BR> Jose<BR> |
From: Aaron H. <aaron@MetroNY.com> - 2002-10-31 19:39:38
|
The action function OVERRIDES self.writeHTML(), so your entire page/layout is not called. the only output of the action in your case will be funct You may need to set some variable and then call self.writeHTML() def func1(self, trans): self.msg='funct was called' self.writeHTML() def writeContent(self): if self.msg: self.writeln('<h1>%s</h1>'%self.msg) self.msg=None # clear msg, or it will live for the next call of this servlet. -Aaron ps. Becuase I never do anything the 'right' way - I prepare the page in preAction, and then all of my action calls just call self.writeHTML jo...@cy... wrote: > Hi all I have a problem / question > > when pages are generated via an _action_ the <body> tags are not written > correctly. However the same content written without using the _action_ > method will write the <body> tages. For example (since this probably > does not make sense) > > if my file is functest.py > > from WebKit.Page import Page > class functest(Page): > def writeContent(self): > if self.request().hasField('func2'): > self.func1(1) > else: > self.write('') > > def func1(self, trans): > self.write('funct') > > def actions(self): > return Page.actions(self) + ['func1'] > > Then > functest.py?_action_=funct1 Will not have a body tag > > where as > > functest.py?func2=1 will print the body tag > > > How should I handel this to print the page correctly? > BTW I am using webware 0.7 apache 2.0.43 wkcgi.exe and python 2.2.1 on > winxppro > > thanks > > Jose > ------------------------------------------------------- This sf.net > email is sponsored by: Influence the future of Java(TM) technology. Join > the Java Community Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > _______________________________________________ Webware-discuss mailing > list Web...@li... > https://lists.sourceforge.net/lists/listinfo/webware-discuss |
From: Frank B. <fb...@fo...> - 2002-10-31 22:43:12
|
Hi, Aaron Held hat gesagt: // Aaron Held wrote: > The action function OVERRIDES self.writeHTML(), so your entire > page/layout is not called. > > the only output of the action in your case will be > funct > > You may need to set some variable and then call > self.writeHTML() > > def func1(self, trans): > self.msg='funct was called' > self.writeHTML() Actually I have found, that this results in two times the head generated: <html> <head> <title>TheTitle</title> </head> <html> <head> <title>TheTitle</title> </head> TheBody </html> </html> That is why I always use self.writeBody() inside actions now. Or is it a bug? One can test with this code and "View Source" after submitting: # ---- action test: Main.py from WebKit.Page import Page class Main(Page): def __init__(self): Page.__init__(self) self.msg='Choose:' def actions(self): return Page.actions(self) + ['WriteBD', 'WriteHT'] def WriteBD(self): self.msg="BD called" self.writeBody() def WriteHT(self): self.msg="HT called" self.writeHTML() def writeContent(self): self.writeln(self.msg) self.writeln(""" <form method="post"> <input type="submit" name="_action_" value="WriteBD"> </form> <form method="post"> <input type="submit" name="_action_" value="WriteHT"> </form> """) # ---- action test ciao -- Frank Barknecht _ ______footils.org__ |
From: jose <jo...@cy...> - 2002-11-01 03:41:46
|
Thanks for the advice, After reading you email I made some changes to the preaction and postaction methods and that did the trick. Jose -----Original Message----- From: Aaron Held [mailto:aaron@MetroNY.com] Sent: Thursday, October 31, 2002 11:39 AM To: jo...@cy... Cc: web...@li... Subject: Re: [Webware-discuss] body tag and Posts The action function OVERRIDES self.writeHTML(), so your entire page/layout is not called. the only output of the action in your case will be funct You may need to set some variable and then call self.writeHTML() def func1(self, trans): self.msg='funct was called' self.writeHTML() def writeContent(self): if self.msg: self.writeln('<h1>%s</h1>'%self.msg) self.msg=None # clear msg, or it will live for the next call of this servlet. -Aaron ps. Becuase I never do anything the 'right' way - I prepare the page in preAction, and then all of my action calls just call self.writeHTML jo...@cy... wrote: > Hi all I have a problem / question > > when pages are generated via an _action_ the <body> tags are not > written > correctly. However the same content written without using the _action_ > method will write the <body> tages. For example (since this probably > does not make sense) > > if my file is functest.py > > from WebKit.Page import Page > class functest(Page): > def writeContent(self): > if self.request().hasField('func2'): > self.func1(1) > else: > self.write('') > > def func1(self, trans): > self.write('funct') > > def actions(self): > return Page.actions(self) + ['func1'] > > Then > functest.py?_action_=funct1 Will not have a body tag > > where as > > functest.py?func2=1 will print the body tag > > > How should I handel this to print the page correctly? > BTW I am using webware 0.7 apache 2.0.43 wkcgi.exe and python 2.2.1 on > winxppro > > thanks > > Jose > ------------------------------------------------------- This sf.net > email is sponsored by: Influence the future of Java(TM) technology. Join > the Java Community Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > _______________________________________________ Webware-discuss mailing > list Web...@li... > https://lists.sourceforge.net/lists/listinfo/webware-discuss |
From: Geoffrey T. <gta...@na...> - 2002-11-01 15:27:09
|
My plan for getting autoreload to work as an NT service was to split the service into 2 processes -- a "controller" that plays the role of AppServer.bat, and the actual app server as a child process. The service process would fire off a child process to run the appserver, then wait for it to exit, and start it up again if the exit code was 3. Does this sound reasonable? - Geoff > -----Original Message----- > From: Luke Opperman [mailto:lu...@me...] > Sent: Thursday, October 31, 2002 8:24 PM > To: Webware discuss > Subject: Re: [Webware-discuss] Deprecating OneShot.cgi > > > I'll only add, we still use OneShot.cgi EXTENSIVELY on our > development server, > and will continue to do so for the near future, as our main > dev server is win2K > running as a service. > > But I absolutely vote for deprecating it, as it really feels > like a hack, and > has lead to late-found bugs due to the differences. We'll > continue to use it > secretly, probably put some time towards getting AutoReload > to work as a > service, and be happy. > > Remove it from the docs! Yay! > > - Luke > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > _______________________________________________ > Webware-discuss mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webware-discuss > |
From: Jason H. <ja...@pe...> - 2002-10-31 04:59:24
|
On Wed, 2002-10-30 at 18:22, Geoffrey Talvola wrote: > I just checked into CVS a couple of fixes that make auto-reload work > properly on Windows too. Thanks for doing this, Geoff. -- Jason D. Hildebrand ja...@pe... |