LINK DOWNLOAD MIỄN PHÍ TÀI LIỆU "Tài liệu Python 3 Web Development Beginner''''''''s Guide ppt": http://123doc.vn/document/1048561-tai-lieu-python-3-web-development-beginners-guide-ppt.htm
Michel Anders, aer his chemistry and physics studies where he spent more me on
computer simulaons than on real world experiments, the author found his real interests
lay with IT and Internet technology, and worked as an IT manager for several dierent
companies, including an Internet provider, a hospital, and a soware development company.
Aer his inial exposure to Python as the built-in scripng language of Blender, the popular
3D modeling and rendering suite, the language became his tool of choice for many projects.
He lives happily in a small converted farm, with his partner, three cats, and twelve goats.
This tranquil environment proved to be ideally suited to wring his rst book, Blender 2.49
Scripng (Packt Publishing, 978-1-849510-40-0).
He loves to help people with Blender and Python-related quesons and may be contacted as
'varkenvarken' at
http://www.blenderartists.org/ and maintains a blog on Python-
specic subjects at http://michelanders.blogspot.com/.
For Clemenne, always.
www.it-ebooks.info
About the Reviewers
Michael Driscoll has been programming Python since the Spring of 2006 and has
dabbled in other languages since the late ninees. He graduated from the University with
a Bachelors of Science degree, majoring in Management Informaon Systems. Michael
enjoys programming for fun and prot. His hobbies include Biblical apologecs, blogging
about Python at http://www.blog.pythonlibrary.org/, and learning photography.
Michael currently works for the local government, where he does programming with Python
as much as possible. Michael was also a Technical Reviewer for Python 3: Object Oriented
Programming by Dusty Phillips and Python Graphics Cookbook by Mike Ohlson de Fine (both
by Packt Publishing).
I would like to thank my friends and family for their support and the fun
mes they share with me. Most of all, I want to thank Jesus for saving me
from myself.
Róman Joost discovered open source soware in 1997. He is the project manager for
user documentaon for GNU Image Manipulaon Program (GIMP). Róman also helped with
German internaonalizaon of GIMP. He has been contribung to GIMP and Zope open
source projects for eight years.
Róman has a Diplom-Informaker (FH) from the University of Applied Sciences in Koethen
(Anhalt). He has worked for Zope companies—Gocept GmbH & Co in Germany, Infrae in
The Netherlands, and is currently working for a Zope company in Brisbane, Australia. For
relaxaon, he enjoys photography and digital painng with GIMP.
www.it-ebooks.info
Tomi Juhola is a soware development professional from Finland. He has a wide range of
development experience from embedded systems to modern distributed enterprise systems
in various roles such as tester, developer, consultant, and trainer.
Currently, he works in a nancial company and shares this me between development lead
dues and helping other projects to adopt Scrum and Agile methodologies. He likes to spend
his free me with new interesng development languages and frameworks.
He has reviewed conference proposals, a Python development book, and has also published
his own Master's theses on Agile embedded development.
Andrew Nicholson is a computer engineer with over fourteen years of professional
experience in a broad range of compung technologies. He is currently a Technical Director
with Innite Recursion Pty Ltd.—a bespoke soware engineering company located in Sydney,
Australia. He is a passionate advocate and a parcipant in the free, libre, and open source
soware (FLOSS) community and has acvely parcipated since 1999 contribung code,
ideas, and energy in this engineering community. He was a Technical Reviewer for the book
Python Tesng: Beginner's Guide (2010), Packt Publishing.
Nicholson has a B.Eng (Computer) [Honours 1] from Newcastle University, Australia and a
M.Eng (Wireless) with Merit from Sydney University, Australia.
Nicholson's biography can be read at
http://www.infiniterecursion.com.au/
people/
.
www.it-ebooks.info
www.PacktPub.com
Support les, eBooks, discount offers, and more
You might want to visit www.PacktPub.com for support les and downloads related to your
book.
Did you know that Packt oers eBook versions of every book published, with PDF and ePub
les available? You can upgrade to the eBook version at
www.PacktPub.com and as a print
book customer, you are entled to a discount on the eBook copy. Get in touch with us at
service@packtpub.com for more details.
At
www.PacktPub.com, you can also read a collecon of free technical arcles, sign up for a
range of free newsleers, and receive exclusive discounts and oers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant soluons to your IT quesons? PacktLib is Packt's online digital book
library. Here, you can access, read and search across Packt's enre library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view nine enrely free books. Simply use your login credenals for
immediate access.
www.it-ebooks.info
www.it-ebooks.info
Table of Contents
Preface 1
Chapter 1: Choosing Your Tools 7
Idenfying the components of a web applicaon 7
Time for acon – geng an overview of a web applicaon 8
Choosing suitable tools 10
Time for acon – choosing a delivery framework, also known as web server 11
Time for acon – choosing a server-side scripng language 12
Time for acon – choosing a database engine 14
Time for acon – deciding on object relaonal mappers 15
Time for acon – choosing a presentaon framework 17
Designing for maintainability and usability 18
Tesng 18
Time for acon – choosing a test framework 19
Version management 19
Usability 20
Good looking – adhering to common GUI paradigms 20
Themable 21
Cross-browser compable 21
Cross-plaorm compable 22
Maintainability 22
Standards compliant 22
Security 23
Reliable 23
Robust 23
Access control and authencaon 24
Condenality 24
Integrity 25
A nal word on security 25
Help, I am confused! 25
Time for acon – maintaining overview 26
Summary 28
www.it-ebooks.info
Table of Contents
[ ii ]
Chapter 2: Creang a Simple Spreadsheet 29
Python 3 30
Time for acon – installing Python 3 CherryPy 30
Time for acon – installing CherryPy 31
Installing jQuery and jQuery UI 31
Serving an applicaon 32
Time for acon – serving a dummy applicaon 33
Time for acon – serving HTML as dynamic content 34
Who serves what: an overview 36
HTML: separang form and content 37
Time for acon – a unit convertor 38
HTML: form-based interacon 39
JavaScript: using jQuery UI widgets 40
Time for acon – conversion using unitconverter.js 40
jQuery selectors 42
CSS: applying a jQuery UI theme to other elements 43
Time for acon – converng a unit convertor into a plugin 45
JavaScript: creang a jQuery UI plugin 46
Designing a spreadsheet applicaon 51
Time for acon – serving a spreadsheet applicaon 51
HTML: keeping it simple 52
JavaScript: creang a spreadsheet plugin 52
The missing parts 58
Summary 58
Chapter 3: Tasklist I: Persistence 59
Designing a tasklist applicaon 59
Time for acon – creang a logon screen 62
Serving a logon screen 69
Seng up a session 70
Expiring a session 71
Designing a task list 72
Time for acon – running tasklist.py 72
Python: the task module 75
Time for acon – implemenng the task module 76
Adding new tasks 80
Deleng a task 81
JavaScript: tasklist.js 83
Time for acon – styling the buons 83
JavaScript: toolp.js 85
Time for acon – implemenng inline labels 86
www.it-ebooks.info
Table of Contents
[ iii ]
CSS: tasklist.css 87
Summary 90
Chapter 4: Tasklist II: Databases and AJAX 91
The advantages of a database compared to a lesystem 92
Choosing a database engine 92
Database-driven authencaon 93
Time for acon – authencaon using a database 94
Tasklist II – storing tasks in a database 99
Improving interacvity with AJAX 99
Time for acon – geng the me with AJAX 100
Redesigning the Tasklist applicaon 102
Database design 103
Time for acon – creang the task database 103
Time for acon – retrieving informaon with select statements 105
TaskDB – interfacing with the database 106
Time for acon – connecng to the database 106
Time for acon – storing and retrieving informaon 107
Time for acon – updang and deleng informaon 109
Tesng 111
Time for acon – tesng factorial.py 112
Now what have we gained? 113
Time for acon – wring unit tests for tasklistdb.py 114
Designing for AJAX 116
Click handlers 120
The applicaon 121
Time for acon – pung it all together 123
Have a go hero – refreshing the itemlist on a regular basis 125
Summary 126
Chapter 5: Enes and Relaons 127
Designing a book database 127
The Enty class 128
Time for acon – using the Enty class 129
Time for acon – creang instances 132
The Relaon class 138
Time for acon – using the Relaon class 138
Relaon instances 141
Time for acon – dening the Books database 144
The delivery layer 150
Time for acon – designing the delivery layer 151
Time for acon – adding a new book 162
www.it-ebooks.info
Table of Contents
[ iv ]
Auto compleon 165
Time for acon – using input elds with auto compleon 166
The presentaon layer 168
Time for acon – using an enhanced presentaon layer 168
Summary 170
Chapter 6: Building a Wiki 171
The data layer 172
Time for acon – designing the wiki data model 172
The delivery layer 175
Time for acon – implemenng the opening screen 176
The structural components 177
The applicaon methods 179
Time for acon – implemenng a wiki topic screen 180
Time for acon – eding wiki topics 182
Addional funconality 185
Time for acon – selecng an image 185
Time for acon – implemenng a tag cloud 190
Time for acon – searching for words 192
The importance of input validaon 195
Time for acon – scrubbing your content 196
Time for acon – rendering content 200
Summary 201
Chapter 7: Refactoring Code for Reuse 203
Time for acon – taking a crical look 203
Refactoring 205
Time for acon – dening new enes: how it should look 205
Metaclasses 206
Time for acon – using metaclasses 207
MetaEnty and AbstractEnty classes 208
Time for acon – implemenng the MetaEnty and AbstractEnty classes 209
Relaons 217
Time for acon – dening new relaons: how it should look 217
Implemenng the MetaRelaon and AbstractRelaon classes 219
Adding new methods to exisng classes 222
Browsing lists of enes 224
Time for acon – using a table-based Enty browser 224
Time for acon – examining the HTML markup 229
Caching 232
The books applicaon revisited 236
Time for acon – creang a books applicaon, take two 236
Summary 242
www.it-ebooks.info
Table of Contents
[ v ]
Chapter 8: Managing Customer Relaons 243
A crical review 243
Designing a Customer Relaonship Management applicaon 244
Time for acon – implemenng a basic CRM 244
Adding and eding values 248
Time for acon – adding an instance 249
Time for acon – eding an instance 251
Adding relaons 257
Picklists 259
Time for acon – implemenng picklists 259
Summary 262
Chapter 9: Creang Full-Fledged Webapps: Implemenng Instances 263
Even more relaons 263
Time for acon – showing one-to-many relaonships 264
Time for acon – adapng MetaRelaon 266
Time for acon – enhancing Display 270
Time for acon – enhancing Browse 271
Access control 274
Time for acon – implemenng access control 275
Role-based access control 278
Time for acon – implemenng role-based access control 279
Summary 283
Chapter 10: Customizing the CRM Applicaon 285
Time for acon – sorng 285
Time for acon – ltering 290
Customizaon 292
Time for acon – customizing enty displays 292
Time for acon – customizing enty lists 298
Time for acon – adding a delete buon 301
Summary 302
Appendix A: References to Resources 303
Good old oine reference books 303
Addional websites, wikis, and blogs 304
Appendix B: Pop Quiz Answers 307
Chapter 2, Creang a Simple Spreadsheet 307
Chapter 3, Tasklist I: Persistence 308
Chapter 4, Tasklist II: Databases and AJAX 309
Chapter 5, Enes and Relaons 310
Chapter 6, Building a Wiki 310
Index 311
www.it-ebooks.info
Không có nhận xét nào:
Đăng nhận xét