Skip to:Content
|
Bottom
Cover image for Python web programming
Title:
Python web programming
Personal Author:
Publication Information:
Indianapolis, Ind. : New Riders, 2002
ISBN:
9780735710900
Added Author:

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010106575 QA76.73.P98 H64 2002 Open Access Book Book
Searching...

On Order

Summary

Summary

Python Web Programming is a practical introduction to building networked systems in the object-oriented framework of the Python language. It shows how to leverage the powerful Python libraries to build systems with less programming effort and easier maintenance. It leaves involved discussion of the Python language by itself to other books and dives right into using Python within web enables applications.

This book is intended for programmers who have experience with other programming languages (such a C or C++) and has some experience with building web-based systems. It is for the serious programmer who does not want a basic introductory to the language.

All code developed in the book will be available on the newriders.com website. This is an incredible asset because the Python language allows for modular programming between systems, thus readers in their projects can use code created in the book.


Author Notes

Steve Holden is a consultant, advising on system and network architectures and the design and implementation of programmed web systems for commercial clients. His client base includes GlobalPhone, an international telecommunications company, and the Prometric division of Thomson Learning. He was the technical lead on the major redesign of the National Science Foundation's web site in 1997.

Steve also teaches classes on TCP/IP, UNIX security, web security, intranet technologies, and database topics for Learning Tree International. Steve has spent time on both sides of the "academic divide" and was an early researcher into the integration of text, graphics, and databases while teaching commercial computing topics at Manchester University. This research led Steve to form Desktop Connection Limited, the first UK reseller of Frame Technology's (now Adobe's) FrameMaker software. His customers included British Telecom, British Aerospace, British Gas, and Sun Microsystems.

Steve was born and raised in the UK, and has traveled throughout Europe and the USA on teaching assignments. He now lives with his wife, Dorothy, in Fairfax, Virginia, where when not consulting, teaching, or writing, he enjoys looking for worthwhile American beers, entertaining friends and family, and reading science fiction.


Table of Contents

I Why Python, and How?p. 1
1 The Python Languagep. 3
Where Python Came Fromp. 4
Where Python Is Goingp. 14
What Use Is Pythonp. 17
Summaryp. 20
2 An Introduction to Pythonp. 21
Using the Interpreterp. 21
Python Syntaxp. 25
Python Statementsp. 45
Defining Functionsp. 52
Major Built-in Functions and Methodsp. 60
Modules in Pythonp. 68
Exception Handlingp. 77
Summaryp. 83
3 Object-Orientationp. 85
Data in Pythonp. 87
Data Structures in Pythonp. 88
Defining Classesp. 91
The class Statementp. 95
Jython: A Unique Blend of Two Languagesp. 106
Summaryp. 109
II Network Programming in Pythonp. 111
4 Client/Server Conceptsp. 113
Functions of the Four Internet Protocol Layersp. 113
Connectionless Versus Connection-Oriented Networkingp. 118
The Concept of a Network Socketp. 119
Network Programming Conceptsp. 119
The socket Libraryp. 122
Connectionless Client Structuresp. 125
Connection-Oriented Client Structuresp. 127
Summaryp. 128
5 Available Client Librariesp. 129
File Transferp. 130
Dealing with Mailp. 148
nntplib: Receiving Network Newsp. 167
httplib: Writing Web Clientsp. 174
Summaryp. 193
6 A Server Framework Libraryp. 195
Server Structuresp. 195
SocketServer Librariesp. 196
Writing Servers with the SocketServer Modulep. 197
HTTP Server Modulesp. 209
Summaryp. 217
7 Asynchronous Servicesp. 219
Synchronous Limitationsp. 219
The asyncore Modulep. 224
asynchat: Handling Structured Conversationsp. 233
Summaryp. 239
III Database Programming in Pythonp. 241
8 Relational Database Principlesp. 243
What Is a Database?p. 244
Data Modeling and Database Designp. 244
Semantic Integrity: Applying Business Rulesp. 265
Physical Design Considerationsp. 267
Summaryp. 270
9 Client/Server Database Architecturesp. 271
The Client/Server Nature of Modern Relational Databasesp. 271
Stored Proceduresp. 290
Triggersp. 292
Summaryp. 293
10 The Python Database Interfacep. 295
Database Interfacesp. 295
The Underlying Interface Modelp. 296
Some Database Modulesp. 303
A Simple Database-Driven Webp. 306
SQL/Python Communicationp. 310
Summaryp. 314
11 Adapting the Python Interface to Database Productsp. 315
What Help Are Standards?p. 316
Available Database Modulesp. 317
SQL Adaptation Layer Tasksp. 318
Adapting Specific DB Modules and Enginesp. 330
Web Server Interaction with Database Programsp. 333
Maintaining Data in Python CGI Scriptsp. 334
Generalizing Data Maintenancep. 341
Summaryp. 347
IV XML and Pythonp. 349
12 A Bird's-Eye View of XMLp. 351
Backgroundp. 351
Shortcomings of HTMLp. 352
XMLp. 353
DTDsp. 359
Physical Structure and Entitiesp. 361
XML Namespacesp. 364
Validating Versus Nonvalidating XML Parsingp. 367
Summaryp. 367
13 XML Processingp. 369
Installing the Softwarep. 369
Creating XML Documentsp. 370
Validating XML Documentsp. 373
XML Parsing with Regular Expressionsp. 375
An Introduction to XML Parsing with expatp. 377
XML Processing with SAX and DOMp. 390
Other Python XML Packagesp. 398
Summaryp. 406
14 SAX: The Simple API for XMLp. 409
Introduction to SAXp. 409
SAX Utilitiesp. 424
Summaryp. 425
V Integrated Web Applications in Pythonp. 427
15 Building Small, Efficient Python Web Systemsp. 429
Why Build It Yourself?p. 429
Critical Self-Assessmentp. 430
The Significance of Style and Simplicityp. 430
A Note on Complexityp. 431
Planning Interactive Web Systemsp. 442
Summaryp. 448
16 Web Application Frameworksp. 449
Information Sourcesp. 450
Web Server Architecturesp. 450
HTML (and XML) Generationp. 489
Component Interaction: Choose Your Modelp. 496
Summaryp. 498
17 AWeFUL: An Object-Oriented Web Site Frameworkp. 499
Why Another Framework?p. 499
Framework Requirementsp. 500
The AWeFUL Framework Structurep. 502
The Framework Codep. 503
Summaryp. 523
18 A Web Application--PythonTeach.comp. 525
The Company Missionp. 525
Structure of the Applicationp. 526
Request Handling Logicp. 527
Content Generation Logicp. 528
The Site Structurep. 537
Summaryp. 592
VI Appendixesp. 595
A Changes Since Python 2.0p. 597
Introduction to Changes in Python 2.1p. 598
Introduction to Changes in Python 2.2p. 608
B Glossaryp. 619
Indexp. 635
Go to:Top of Page