On Sun, 2003-02-23 at 00:11, Randall Smith wrote:
> I'm new to servlet jargon, so please excuse me if I show my ignorance. 
>  It looks like with webware, I can create a psp file that, when 
> requested, can call on a servlet, which using various classes does the 
> dirty work and returns the results to the psp file for display.  Is this 
> correct?  Is webware the best open source application server available 
> to work in this manner?  I would appreciate any advice on which 
> direction I should take.  Thanks.

There's several techniques that people use with Webware.

Since you want to use PSP, I think generally the best way to mix PSP
with servlets is to have the PSP page inherit from a servlet. 
Essentially a PSP file is compiled into a servlet, and each servlet is a
class definition, and those classes can inherit from each other.  So you
might define a method in your (normal Python) servlet superclass, and
then use that method in your PSP servlet.

You'll also want another servlet class that's abstract, and used as the
superclass for all the other servlets in your application.  By
convention it's usually called SitePage.  You can put global logic in
that class.

And of course you can use all the normal Python techniques, including
writing modules and libraries that aren't tied to Webware or the servlet
model.  I think it makes sense to write many of your most important
abstractions in this way (often called business objects).  I generally
try to put the bulk of my logic in these classes, though often my
servlets are fatter than they should be when I first write them.

  Ian




-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to