[EMAIL PROTECTED] wrote:
> Well, according to the documentation, the webware community is
> supposed to be pretty helpful.  :)   I wonder if you all could help
> me without me having to spend long amounts of time trying to find the
> info myself?

Just to prove that the documentation is not completely outdate, I'll try 
to give some answers to get you started...

> *) As I understand it, Python is not primarily a web language, but
> there are ways to use Python for websites.

Right.

> Some documentation seems to suggest that Python's web development
> ability is actually better than others (like PHP).

At least it is better for larger projects. PHP is good for quickly 
creating dynamic web pages, but gets problematic for larger projects. 
Maybe you should start with PHP or even stay with PHP if you only want 
to hack up some simple pages. On the other hand, learning Python may be 
helpful for you anyway because you can use it in other contexts, too.

> *) Is Webware the only way to website work in Python?

By far not. There are many web frameworks in Python that you can choose 
from (contrary to the situation in Ruby). Webware is one of the oldest.

> Is it the best way?

"Best" depends on what kind of website you are planning and on many 
other things. If there would be a clear answer to what is the "best" web 
framework, then there would not be such diversity. It's certainly not a 
bad way since it is already around for a long time and is kind of a 
"tested" solution. With other words, it's not the "bleeding edge" - 
which is not necessarily something bad as the word "bleeding" suggests.

> *) Can I program website entirely in script? I won't have to compile
> anything at any point will I?

True. Python scripts are "compiled" to bytecode when first loaded, but 
that is something that happens automatically, you don't need to care.

> *) Licensing: Am I correct in that both the Python and Webware
> licences are essentially MIT license?

For Python see here: http://www.python.org/doc/Copyright.html

Quote: "The gist of it is that Python is absolutely free, even for 
commercial use (including resale). There is no GNU-like "copyleft" 
restriction." (see also the clarifications on that page).

For Webware see here: http://www.w4py.org/Docs/Copyright.html

The idea was that Webware is licensed under the same terms as Python, 
though Python meanwhile has a new license. I don't think that is 
something to worry about.

> Is Python really a good choice for web dev -- over say other scripted
> languages like Ruby, PHP, Perl, etc...?

Certainly.

> *) Are there high level frameworks for making database stuff much
> much easier (like CakePHP, Ruby on Rails)?

You can try out SQLObject and SQLAlchemy which you can use together with 
Webware if you like, though they are not "integrated" into the framework 
in any way. Other frameworks like TurboGears have them integrated; 
Django uses its own object-relational mapper.

If you are using Webware, you may also consider using its "MiddleKit":
http://www.w4py.org/MiddleKit/Docs/QuickStart.html
This is already packaged with Webware.

> *) Can you still easily go low level without jumping through lots of
> hoops (like http headers, encoding, etc...)?

Yes. Webware uses an inheritance concept where you can overwrite on any 
level. You are not even bound to HTML and HTTP in Webware.

> Part 1: Setting up python for web development on a local machine. In
> order to do anything, Python will need to be setup on a local Windows
> machine.  Can someone provide the info needed to do this? The system
> will be using Windows XP Home, Apache for the server, and PostgreSQL
> for the database. 
> 1) What do I need to do to setup Python? What do I download?

http://www.python.org/ftp/python/2.5/python-2.5.msi

> Where are the step by step instructions for setting it up?

There is only one step: Double click the above file.

>  2) Does webware need to be setup separately?  If, so where are the
> instructions (literally step by step)?

http://www.w4py.org/WebKit/Docs/InstallGuide.html

Unpack the Webware archive to any directory. Open a CMD window, cd to 
that directory and run "python install.py". You will need to enter some 
password for the admin interface (you can change that later). Now you 
can already try it out using the built-in webserver by running the 
AppServer.bat script inside the WebKit subdirectory and pointing your 
web browser to localhost:8080. Try out some of the Examples, e.g. 
"ShowTime". Click on "View source of Examples" to see how the 
corresponding Python servlet in Webware looks like.

> 3) Where are the instructions for getting webware and/or python to
> work with Apache?

http://www.w4py.org/WebKit/Docs/InstallGuide.html#apache

You need to decide which adapter you want to use to connect to Apache. I 
recommend mod_webkit. See also here:
http://wiki.w4py.org/web-server-integration.html

> for getting it to work with the PostgreSQL database?

Webware is actually independent of any database, except you are using 
MiddleKit (see http://www.w4py.org/MiddleKit/Docs/ then).

Basically, get the PostgreSQL binary for Win (postgresql-8.2.0-1.zip)
from here: http://www.postgresql.org/ftp/binary/v8.2.0/win32/

Run the windows installer and set up PostgreSQL as a Windows service.

You will also need to install a Python interface to PostgreSQL, e.g.
psycopg2: download from
http://www.stickpeople.com/projects/python/win-psycopg/
or PyGreSQL: download from
ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-3.8.1.win32-py2.5.exe

If you are using PyGreSQL, I recommend installing DBUtils as well when 
you really want to go productive with many users (but you can do that 
later): http://www.webwareforpython.org/DBUtils

Then you can simply use the database from your Python servlets via the 
dbapi2 interface of psycopg2 or PyGreSQL, or using the classic pg 
interface of PyGreSQL.

Or, you install SQLObject or SQLAlchemy as ORM. But for first 
experiments, I recommend working with SQL only.

Concerning database integrations, see also here:
http://wiki.w4py.org/database-integration.html

You may also consider using SQLite instead of PostgreSQL. This comes 
already pacaked with Python 2.5.

> 1) Where is the really newbie tutorial for making a very simple hello
> world Python web app?

With Webware or without Webware (e.g. simple CGI)?

Concerning CGI, you can go to http://www.awaretek.com/python/, click on 
"CGI Programming with Python" for a nice newbie audio tutorial.

Concerning Webware, a beginner tutorial is here:
http://www.w4py.org/WebKit/Docs/Tutorial.html
It is somewhat more than "Hello World" but that would be pretty boring 
anyway.

> 2) Where is the documenation for web development for Python (with all
> the functions and objects, etc...)?

Again, this depends on the web framework you want to use.

But basically, your main documentation is the Python documentation:
http://www.python.org/doc/
The library reference is the part you will use most frequently:
http://docs.python.org/lib/lib.html

It makes sense to read one or more newbie tuorials first, e.g:
http://docs.python.org/tut/tut.html
There are many more tutorials you can choose from:
http://www.awaretek.com/tutorials.html

Concerning Webware for Python, see the above tutorial. It will also be 
helpful to read some of the papers here:
http://www.webwareforpython.org/Papers/
The documentation for the WebKit comonent (the core of Webware) is here:
http://www.webwareforpython.org/WebKit/Docs/

> Part 3: More questions. 1) Is there some other stuff that I should
> read first, like about other types of web development frameworks that
> you can pick from for Python?

First you need to become familiar with Python itself; see the tutorials 
above. I think it will good if you pick one not too complex framework 
first (like Webware) and write a simple application. Then you can go and 
compare with other frameworks.

Of course, you also need to make sure you understand HTML and CSS well 
enough. If you want to develop new style "web 2.0" applications you will 
also have to be familiar with Javascript and probably some library such 
as dojo, mochikit, pygwt.

> 2) Is there any kind of rapid development framework for web
> development (like Ruby on Rails, PHP Cake, etc...) or am I looking at
> it?

Yes I think most of the Python web frameworks including Webware fall 
under that category.

Hope that helps you or others to get started...

-- Christoph

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to