Thứ Bảy, 5 tháng 4, 2014

Tài liệu Python 3 Web Development Beginner''''''''s Guide ppt


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


About the Author
Michel Anders, aer his chemistry and physics studies where he spent more me on
computer simulaons 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 dierent
companies, including an Internet provider, a hospital, and a soware development company.
Aer his inial exposure to Python as the built-in scripng 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 wring his rst book, Blender 2.49
Scripng (Packt Publishing, 978-1-849510-40-0).
He loves to help people with Blender and Python-related quesons and may be contacted as
'varkenvarken' at
http://www.blenderartists.org/ and maintains a blog on Python-
specic subjects at http://michelanders.blogspot.com/.
For Clemenne, 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 ninees. He graduated from the University with
a Bachelors of Science degree, majoring in Management Informaon Systems. Michael
enjoys programming for fun and prot. His hobbies include Biblical apologecs, 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 soware in 1997. He is the project manager for
user documentaon for GNU Image Manipulaon Program (GIMP). Róman also helped with
German internaonalizaon of GIMP. He has been contribung to GIMP and Zope open
source projects for eight years.
Róman has a Diplom-Informaker (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
relaxaon, he enjoys photography and digital painng with GIMP.
www.it-ebooks.info
Tomi Juhola is a soware 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
dues and helping other projects to adopt Scrum and Agile methodologies. He likes to spend
his free me with new interesng 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 compung technologies. He is currently a Technical Director
with Innite Recursion Pty Ltd.—a bespoke soware engineering company located in Sydney,
Australia. He is a passionate advocate and a parcipant in the free, libre, and open source
soware (FLOSS) community and has acvely parcipated since 1999 contribung code,
ideas, and energy in this engineering community. He was a Technical Reviewer for the book
Python Tesng: 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 oers 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 entled 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 collecon of free technical arcles, sign up for a
range of free newsleers, and receive exclusive discounts and oers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant soluons to your IT quesons? PacktLib is Packt's online digital book
library. Here, you can access, read and search across Packt's enre 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 enrely free books. Simply use your login credenals for
immediate access.
www.it-ebooks.info
www.it-ebooks.info
Table of Contents
Preface 1
Chapter 1: Choosing Your Tools 7
Idenfying the components of a web applicaon 7
Time for acon – geng an overview of a web applicaon 8
Choosing suitable tools 10
Time for acon – choosing a delivery framework, also known as web server 11
Time for acon – choosing a server-side scripng language 12
Time for acon – choosing a database engine 14
Time for acon – deciding on object relaonal mappers 15
Time for acon – choosing a presentaon framework 17
Designing for maintainability and usability 18
Tesng 18
Time for acon – choosing a test framework 19
Version management 19
Usability 20
Good looking – adhering to common GUI paradigms 20
Themable 21
Cross-browser compable 21
Cross-plaorm compable 22
Maintainability 22
Standards compliant 22
Security 23
Reliable 23
Robust 23
Access control and authencaon 24
Condenality 24
Integrity 25
A nal word on security 25
Help, I am confused! 25
Time for acon – maintaining overview 26
Summary 28
www.it-ebooks.info
Table of Contents
[ ii ]
Chapter 2: Creang a Simple Spreadsheet 29
Python 3 30
Time for acon – installing Python 3 CherryPy 30
Time for acon – installing CherryPy 31
Installing jQuery and jQuery UI 31
Serving an applicaon 32
Time for acon – serving a dummy applicaon 33
Time for acon – serving HTML as dynamic content 34
Who serves what: an overview 36
HTML: separang form and content 37
Time for acon – a unit convertor 38
HTML: form-based interacon 39
JavaScript: using jQuery UI widgets 40
Time for acon – conversion using unitconverter.js 40
jQuery selectors 42
CSS: applying a jQuery UI theme to other elements 43
Time for acon – converng a unit convertor into a plugin 45
JavaScript: creang a jQuery UI plugin 46
Designing a spreadsheet applicaon 51
Time for acon – serving a spreadsheet applicaon 51
HTML: keeping it simple 52
JavaScript: creang a spreadsheet plugin 52
The missing parts 58
Summary 58
Chapter 3: Tasklist I: Persistence 59
Designing a tasklist applicaon 59
Time for acon – creang a logon screen 62
Serving a logon screen 69
Seng up a session 70
Expiring a session 71
Designing a task list 72
Time for acon – running tasklist.py 72
Python: the task module 75
Time for acon – implemenng the task module 76
Adding new tasks 80
Deleng a task 81
JavaScript: tasklist.js 83
Time for acon – styling the buons 83
JavaScript: toolp.js 85
Time for acon – implemenng 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 authencaon 93
Time for acon – authencaon using a database 94
Tasklist II – storing tasks in a database 99
Improving interacvity with AJAX 99
Time for acon – geng the me with AJAX 100
Redesigning the Tasklist applicaon 102
Database design 103
Time for acon – creang the task database 103
Time for acon – retrieving informaon with select statements 105
TaskDB – interfacing with the database 106
Time for acon – connecng to the database 106
Time for acon – storing and retrieving informaon 107
Time for acon – updang and deleng informaon 109
Tesng 111
Time for acon – tesng factorial.py 112
Now what have we gained? 113
Time for acon – wring unit tests for tasklistdb.py 114
Designing for AJAX 116
Click handlers 120
The applicaon 121
Time for acon – pung it all together 123
Have a go hero – refreshing the itemlist on a regular basis 125
Summary 126
Chapter 5: Enes and Relaons 127
Designing a book database 127
The Enty class 128
Time for acon – using the Enty class 129
Time for acon – creang instances 132
The Relaon class 138
Time for acon – using the Relaon class 138
Relaon instances 141
Time for acon – dening the Books database 144
The delivery layer 150
Time for acon – designing the delivery layer 151
Time for acon – adding a new book 162
www.it-ebooks.info
Table of Contents
[ iv ]
Auto compleon 165
Time for acon – using input elds with auto compleon 166
The presentaon layer 168
Time for acon – using an enhanced presentaon layer 168
Summary 170
Chapter 6: Building a Wiki 171
The data layer 172
Time for acon – designing the wiki data model 172
The delivery layer 175
Time for acon – implemenng the opening screen 176
The structural components 177
The applicaon methods 179
Time for acon – implemenng a wiki topic screen 180
Time for acon – eding wiki topics 182
Addional funconality 185
Time for acon – selecng an image 185
Time for acon – implemenng a tag cloud 190
Time for acon – searching for words 192
The importance of input validaon 195
Time for acon – scrubbing your content 196
Time for acon – rendering content 200
Summary 201
Chapter 7: Refactoring Code for Reuse 203
Time for acon – taking a crical look 203
Refactoring 205
Time for acon – dening new enes: how it should look 205
Metaclasses 206
Time for acon – using metaclasses 207
MetaEnty and AbstractEnty classes 208
Time for acon – implemenng the MetaEnty and AbstractEnty classes 209
Relaons 217
Time for acon – dening new relaons: how it should look 217
Implemenng the MetaRelaon and AbstractRelaon classes 219
Adding new methods to exisng classes 222
Browsing lists of enes 224
Time for acon – using a table-based Enty browser 224
Time for acon – examining the HTML markup 229
Caching 232
The books applicaon revisited 236
Time for acon – creang a books applicaon, take two 236
Summary 242
www.it-ebooks.info
Table of Contents
[ v ]
Chapter 8: Managing Customer Relaons 243
A crical review 243
Designing a Customer Relaonship Management applicaon 244
Time for acon – implemenng a basic CRM 244
Adding and eding values 248
Time for acon – adding an instance 249
Time for acon – eding an instance 251
Adding relaons 257
Picklists 259
Time for acon – implemenng picklists 259
Summary 262
Chapter 9: Creang Full-Fledged Webapps: Implemenng Instances 263
Even more relaons 263
Time for acon – showing one-to-many relaonships 264
Time for acon – adapng MetaRelaon 266
Time for acon – enhancing Display 270
Time for acon – enhancing Browse 271
Access control 274
Time for acon – implemenng access control 275
Role-based access control 278
Time for acon – implemenng role-based access control 279
Summary 283
Chapter 10: Customizing the CRM Applicaon 285
Time for acon – sorng 285
Time for acon – ltering 290
Customizaon 292
Time for acon – customizing enty displays 292
Time for acon – customizing enty lists 298
Time for acon – adding a delete buon 301
Summary 302
Appendix A: References to Resources 303
Good old oine reference books 303
Addional websites, wikis, and blogs 304
Appendix B: Pop Quiz Answers 307
Chapter 2, Creang a Simple Spreadsheet 307
Chapter 3, Tasklist I: Persistence 308
Chapter 4, Tasklist II: Databases and AJAX 309
Chapter 5, Enes and Relaons 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