On 3/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> This might be a stupid idea... but I might be willing to work with someone 
> who understands Python web development to work on a better intro tutorial.  
> The current tutorials are rather cryptic and hard to understand, as they 
> assume you know what a lot of things are that they are talking about.  I was 
> thinking about taking a rough tutorial on how to make something in Python 
> (say a simple webpage?) and then ask questions as I go along about the many 
> things that are not explained... then modify the tutorial to include 
> explanations and new code samples to make it easier to understand.

If you can make a list of what questions you have after reading
tutorials (and include the tutorials' URLs, which may be scattered on
several sites), that will help us to see what's missing.

"Python web programming" is too big a topic to address in a few
tutorials.  The best one can do is an overview of the different types
of frameworks.  You have to focus on one type at a time.  The types I
can think of offhand are:

CGI:  'os.environ' for input, 'print' for output.  Some of the minimal
mod_python frameworks are close to this.  Not used much in large
applications (one hopes).

file-based: Apache finds a controller file and passes it to a Python
framework.  This is how PHP works.  PSP and Webware do this in Python,
but they're not used much for recent applications.

class-based: The controllers are arranged in Python class hierarchies
rather than files.  The relationship between the "/foo" vs the
"/foo/bar" controllers is not inheritance but a  framework-specific
mechanism.  In Quixote the parent contains a reference to the child.
In TurboGears, CherryPy maintains a tree of controllers.  In Pylons,
Routes dispatches to an arbitrarily controller.  Paste has its config
file and some basic dispatching support, but it's too low level to
call it "class-based".

Twisted frameworks are class-based, but Twisted is so unique you have
to learn it separately.

Zope/Plone is more object-based than class-based, using an object
database and web interface to build the site.  It also needs to be
studied separately.

Django I don't know well enough to say where it belongs, though I
assume it's class-based.

> BTW, Mike, what's this Python site of yours?

I was talking about the Pylons site, http://pylonshq.com/ .

> Ever noticed how most documentation sites have some kind of copyright or 
> copyleft attached to it?  Other than the rare Creative Commons site, I have 
> yet to see any documentation sites dedicated to a kind of "public domain" 
> documentation  -- you know, something with no strings attached - completely 
> free for all -- akin to the free source licenses for code (MIT, BSD, public 
> domain).  I really would like to have something like this for programmers -- 
> a site with tutorials, documentations, and quick function references, etc.... 
>  Who knows, perhaps all the people working on the various Python web 
> frameworks would like to convert over their documentation to this and allow 
> others to add to it.

There's some preliminary discussion about a central site documenting
all the frameworks and utility packages and everything else related to
Python web programming, but that's a way off.  Even if it did exist,
each project would have to agree to participate.  There would be the
usual disagreements about the best content management system and
whether it does what each project needs.

All the Python-related documentation I've seen has been freely
redistributable and derivable, so I don't see a problem with the
licenses.

You're confusing several different kinds of licenses.  Public domain
content has no copyright at all, so there's no license involved.
That's different from the "really free" licenses (MIT, BSD).  By
copyleft I assume you mean one of the GNU licenses, which have more
restrictions.and are written in four-page legalese.  (The restrictions
are meant to benefit the consumer and the public, but they are
restrictions nonetheless, and can cause problems in a variety of
situations.)  Most Python libraries have a "really free" license
following Python's lead, so they can be used anywhere Python is
without hassle.

MIT, BSD, and GPL are software licenses, so they don't necessarily
work well for book-like content.  E.g., modifying source code has
quite different ramifications to the user than modifying text.

--
Mike Orr <[EMAIL PROTECTED]>


-- 
Mike Orr <[EMAIL PROTECTED]>

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to