چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

Sylvain Hellegouarch

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
Sylvain Hellegouarch
سال انتشار
۲۰۰۷
فرمت
PDF
زبان
انگلیسی
تعداد صفحات
۵ صفحه
حجم فایل
۵٫۷ مگابایت
شابک
9781847190673، 9781904811848، 1847190677، 1904811841

دربارهٔ کتاب

This book covers the CherryPy library for Python web development from its history and installation through its main features and core concepts to its integration with Python and other products to construct, test, and deploy a sample photoblog application. The author Sylvain Hellegouarch is dedicated to the development of free software projects and has been coordinating and administrating the community efforts around the CherryPy project since 2004. The approach based on an example application introduces many other common Python libraries, providing transferable skills also relevant for non-web Python projects. CherryPy is a Python library for web development that allows developers to build web applications in the same way as any other object-oriented Python program. Enriched by several years of active development, it has become one of the most established toolkits for building solid and high-performance web applications in Python. CherryPy abstracts the complex low-level HTTP protocol into an easy-to-use interface that respects Python idioms. The library aims at being simple to learn for a beginner while offering the most advanced features to fluent Python developers. For these reasons CherryPy was chosen to be at the heart of the popular and feature-rich TurboGears web framework. CherryPy-powered web applications are stand-alone Python applications with their own embedded multi-threaded web server, but can also run behind Apache or IIS for scalability..CherryPy installation using tarball, egg, and subversion. The CherryPy library in depth: its design and how to use it. Using CherryPy with common Python and non-Python products . Object RelationalMapping with SQLObject, SQLAlchemy, and Dejavu. Web Services via REST and the Atom Publishing Protocol. AJAX and client-side scripting via MochiKit. Unit, functional, and load testing. CherryPy, Apache, and lighttpd deployment solurionsThe book starts with two chapters dedicated to CherryPy itself, its history and installation. Then it moves through a gentle introduction to the main features and concepts of CherryPy to a thorough review of its core capabilities. After laying this foundation the book dives into a real-world example, detailing important steps in the creation of a photoblog application. These chapters cover database manipulation via Object Relational Mapping (ORM), using web services to enhance the application, and client-side scripting through AJAX. Finally, the book covers the need for unit, functional, and performance testing before closing with deployment solutions for a CherryPy-based application.Who this book is written for This book is principally geared towards Python web developers, who are looking to add the power of the CherryPy library to their existing Python skillset. It assumes a good working knowledge of Python . Although the CherryPy toolkit is at the core of the book, many other common libraries are introduced. CherryPy Essentials......Page 1 Table of Contents......Page 8 Preface......Page 14 Overview......Page 20 History of CherryPy......Page 21 The Community......Page 22 CherryPy Project Strengths......Page 23 Through the Book......Page 24 Summary......Page 25 Requirements......Page 26 Overview......Page 27 Installation from a Tarball......Page 29 Installation through Easy Install......Page 31 Installation from Subversion......Page 33 Keeping CherryPy Up to Date......Page 36 Summary......Page 37 Vocabulary......Page 38 Basic Example......Page 39 Internal Engine......Page 45 Configuration......Page 46 Object Publisher Engine......Page 49 Library......Page 51 The Coverage Module......Page 52 The Profiler Module......Page 53 The Sessions Module......Page 54 The XML-RPC Module......Page 55 Tools......Page 56 Error and Exception Handling......Page 57 Summary......Page 62 HTTP Compliance......Page 64 Multiple HTTP Servers......Page 65 Multi-Threaded Application Server......Page 67 HTTP Method Dispatcher......Page 68 Routes Dispatcher......Page 70 Virtual Host Dispatcher......Page 71 Hook into CherryPy's Core Engine......Page 72 CherryPy Toolbox......Page 74 Basic Authentication Tool......Page 75 Caching Tool......Page 76 Decoding Tool......Page 77 Digest Authentication Tool......Page 78 Encode Tool......Page 79 Etag Tool......Page 80 Ignore Headers Tool......Page 82 Log Headers Tool......Page 83 Log Tracebacks Tool......Page 84 Proxy Tool......Page 85 Referer Tool......Page 86 Response Headers Tool......Page 87 Trailing Slash Tool......Page 88 XML-RPC Tool......Page 89 Creating a Tool......Page 90 Using the Staticfile Tool to Serve a Single File......Page 94 Using the Staticdir Tool to Serve a Complete Directory......Page 96 Bypassing Static Tools to Serve Static Content......Page 98 WSGI Support......Page 99 Hosting a WSGI Application within the CherryPy WSGI Server......Page 100 Hosting a CherryPy WSGI Application within a Third-Party WSGI Server......Page 102 Summary......Page 103 A Photoblog Application......Page 104 Photoblog Entities......Page 105 Vocabulary......Page 107 Relational Database Management System (RDBMS)......Page 108 Object-Oriented Database Management System (OODBMS)......Page 109 Object-Relational Mapping......Page 110 Python Object-Relational Mappers......Page 111 Photoblog Application Entity Modeling......Page 121 Mapping Entities......Page 122 Units and UnitProperties......Page 124 The Sandbox Interface......Page 125 Querying Units......Page 126 Extending the Data Access Layer......Page 127 Summary......Page 130 Traditional Web Development......Page 132 Separation of Concerns......Page 134 REST......Page 135 Uniform Resource Identifier......Page 136 HTTP Methods......Page 137 Putting it Together......Page 141 REST Interface through CherryPy......Page 143 Atom Publishing Protocol......Page 144 Atom XML-Document Format......Page 145 APP Implementation......Page 147 Summary......Page 149 HTML......Page 150 XHTML......Page 151 CSS......Page 152 DHTML......Page 154 Overview......Page 155 Conditional Statement......Page 157 Looping Mechanism......Page 158 Extensibility......Page 159 Targetting the User Agent......Page 160 Global Design Goals......Page 161 CherryPy—Encapsulating the Template Rendering Process......Page 162 Basic Structure......Page 164 Mochikit......Page 169 HTML Code......Page 170 Handling the End-User Actions......Page 171 Amending the CSS......Page 172 Let's be More Flexible.........Page 173 Summary......Page 174 Rise of the Rich-Client Applications......Page 176 Ajax......Page 177 Ajax—Advantages and Drawbacks......Page 178 Behind the Scene: XMLHttpRequest......Page 179 Performing a GET Request......Page 180 Performing a Content-Negotiated GET Request......Page 181 Performing a POST Request......Page 182 Authentication using Digest or Basic Schemes......Page 183 JSON......Page 189 Defining the Required Namespaces......Page 191 Adding Methods to the Classes......Page 192 Method to Create a New Album......Page 196 Method to Delete an Existing Album......Page 203 Summary......Page 204 Why Testing......Page 206 Planning a Test......Page 207 Unit Testing......Page 208 unittest......Page 209 doctest......Page 214 Unit Testing Web Applications......Page 218 Performance and Load Testing......Page 226 Functional Testing......Page 231 Application under Test......Page 232 Selenium Core......Page 235 Selenium IDE......Page 240 Selenium Remote Control......Page 244 Summary......Page 246 CherryPy—Web and Engine Configuration System......Page 248 Photoblog Application Configuration System......Page 251 Deployment......Page 253 Apache with mod_rewrite Module......Page 254 Lighttpd with mod_proxy Module......Page 256 Apache with mod_python Module......Page 257 SSL......Page 259 Creating a Certificate and a Private Key......Page 260 Using the CherryPy SSL Support......Page 261 Using the lighttpd SSL Support......Page 263 Summary......Page 264 Index......Page 266 CherryPy Essentials 1 Table of Contents 8 Preface 14 Chapter 1: Introduction to CherryPy 20 Overview 20 History of CherryPy 21 The Community 22 CherryPy Project Strengths 23 Beyond CherryPy 24 Through the Book 24 Summary 25 Chapter 2: Download and Install CherryPy 26 Requirements 26 Overview 27 Installation from a Tarball 29 Installation through Easy Install 31 Installation from Subversion 33 Testing your Installation 36 Keeping CherryPy Up to Date 36 Summary 37 Chapter 3: Overview of CherryPy 38 Vocabulary 38 Basic Example 39 Built-In HTTP Server 45 Internal Engine 45 Configuration 46 Object Publisher Engine 49 Library 51 The Autoreload Feature 52 The Caching Module 52 The Coverage Module 52 The Encoding/Decoding Module 53 The HTTP Module 53 The Httpauth Module 53 The Profiler Module 53 The Sessions Module 54 The Static Module 55 The Tidy Module 55 The Wsgiapp Module 55 The XML-RPC Module 55 Tools 56 Error and Exception Handling 57 Summary 62 Chapter 4: CherryPy in Depth 64 HTTP Compliance 64 Multiple HTTP Servers 65 Multi-Threaded Application Server 67 URI Dispatching 68 HTTP Method Dispatcher 68 Routes Dispatcher 70 Virtual Host Dispatcher 71 Hook into CherryPy's Core Engine 72 CherryPy Toolbox 74 Basic Authentication Tool 75 Caching Tool 76 Decoding Tool 77 Digest Authentication Tool 78 Encode Tool 79 Error Redirect Tool 80 Etag Tool 80 Gzip Tool 82 Ignore Headers Tool 82 Log Headers Tool 83 Log Tracebacks Tool 84 Proxy Tool 85 Referer Tool 86 Response Headers Tool 87 Trailing Slash Tool 88 XML-RPC Tool 89 Toolbox 90 Creating a Tool 90 Static Resource Serving 94 Using the Staticfile Tool to Serve a Single File 94 Using the Staticdir Tool to Serve a Complete Directory 96 Bypassing Static Tools to Serve Static Content 98 WSGI Support 99 Hosting a WSGI Application within the CherryPy WSGI Server 100 Hosting a CherryPy WSGI Application within a Third-Party WSGI Server 102 Summary 103 Chapter 5: A Photoblog Application 104 A Photoblog Application 104 Photoblog Entities 105 Vocabulary 107 DBMSes Overview 108 Relational Database Management System (RDBMS) 108 Object-Oriented Database Management System (OODBMS) 109 XML Database Management System (XMLDBMS) 110 Object-Relational Mapping 110 Python Object-Relational Mappers 111 Photoblog Application Entity Modeling 121 Mapping Entities 122 Units and UnitProperties 124 Associating Units 125 The Sandbox Interface 125 Querying Units 126 Extending the Data Access Layer 127 Summary 130 Chapter 6: Web Services 132 Traditional Web Development 132 Separation of Concerns 134 REST 135 Uniform Resource Identifier 136 HTTP Methods 137 Putting it Together 141 REST Interface through CherryPy 143 Atom Publishing Protocol 144 Atom XML-Document Format 145 APP Implementation 147 Summary 149 Chapter 7: The Presentation Layer 150 HTML 150 XML 151 XHTML 151 CSS 152 DHTML 154 Templating 155 Kid鈥擳he Templating Engine 155 Overview 155 Kid's Attributes 157 XML-Based Templating Language 157 Variable Substitution 157 Conditional Statement 157 Looping Mechanism 158 Extensibility 159 Other Attributes 160 Photoblog Design Preparation 160 Targetting the User Agent 160 Tools 161 Global Design Goals 161 Design Directory Layout 162 CherryPy鈥擡ncapsulating the Template Rendering Process 162 Photoblog Design 164 Basic Structure 164 Mochikit 169 Developing the Photoblog Design 170 HTML Code 170 Adding a Link 171 Handling the End-User Actions 171 Amending the Template 172 Amending the CSS 172 Let's be More Flexible... 173 Summary 174 Chapter 8: Ajax 176 Rise of the Rich-Client Applications 176 Ajax 177 Ajax鈥擜dvantages and Drawbacks 178 Behind the Scene: XMLHttpRequest 179 Performing a GET Request 180 Performing a Content-Negotiated GET Request 181 Performing a POST Request 182 Performing PUT, HEAD, or DELETE Requests 183 Cookies 183 Authentication using Digest or Basic Schemes 183 JSON 189 Applying Ajax to our Application 191 Defining the Required Namespaces 191 Implementing Namespaces 192 Adding Methods to the Classes 192 Method to Create a New Album 196 Method to Update an Existing Album 203 Method to Delete an Existing Album 203 Summary 204 Chapter 9: Testing 206 Why Testing 206 Planning a Test 207 Common Testing Approach 208 Unit Testing 208 unittest 209 doctest 214 Unit Testing Web Applications 218 Performance and Load Testing 226 Functional Testing 231 Application under Test 232 Selenium Core 235 Selenium IDE 240 Selenium Remote Control 244 Summary 246 Chapter 10: Deployment 248 Configuration 248 CherryPy鈥擶eb and Engine Configuration System 248 Photoblog Application Configuration System 251 Deployment 253 Apache with mod_rewrite Module 254 Lighttpd with mod_proxy Module 256 Apache with mod_python Module 257 mod_python with WSGI Application 259 SSL 259 Creating a Certificate and a Private Key 260 Using the CherryPy SSL Support 261 Using the lighttpd SSL Support 263 Using the Apache mod_ssl Support 264 Summary 264 Index 266

In Detail

CherryPy is a Python library for web development that allows developers to build web applications in the same way as any other object-oriented Python program. Enriched by several years of active development, it has become one of the most established toolkits for building solid and high-performance web applications in Python. CherryPy abstracts the complex low-level HTTP protocol into an easy-to-use interface that respects Python idioms. The library aims at being simple to learn for a beginner while offering the most advanced features to fluent Python developers. For these reasons CherryPy was chosen to be at the heart of the popular and feature-rich TurboGears web framework. CherryPy-powered web applications are stand-alone Python applications with their own embedded multi-threaded web server, but can also run behind Apache or IIS for scalability.

This book covers the CherryPy library for Python web development from its history and installation through its main features and core concepts to its integration with Python and other products to construct, test, and deploy a sample photoblog application. The author Sylvain Hellegouarch is dedicated to the development of free software projects and has been coordinating and administrating the community efforts around the CherryPy project since 2004. The approach based on an example application introduces many other common Python libraries, providing transferable skills also relevant for non-web Python projects.

Approach

The book starts with two chapters dedicated to CherryPy, its history and installation. It then moves through a gentle introduction to the main features and concepts of CherryPy to a thorough review of its core capabilities. After laying this foundation the book dives into a real-world example, detailing important steps in the creation of a photoblog application. These chapters cover database manipulation via Object Relational Mapping (ORM), using web services to enhance the application, and client-side scripting through AJAX. Finally, the book covers the need for unit, functional, and performance testing before closing with deployment solutions for a CherryPy-based application.

Who this book is for

This book is principally geared towards Python web developers, who are looking to add the power of the CherryPy library to their existing Python skillset. It assumes a good working knowledge of Python. Although the CherryPy toolkit is at the core of the book, many other common libraries are introduced

کتاب‌های مشابه

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

۴۹٬۰۰۰ تومان

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

۴۹٬۰۰۰ تومان

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

۴۹٬۰۰۰ تومان

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

۴۹٬۰۰۰ تومان

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

CherryPy essentials : rapid Python web application development : design, develop, test, and deploy your Python web applications easily

۴۹٬۰۰۰ تومان

CherryPy Essentials - Rapid Python Web Application Development (CODE)

CherryPy Essentials - Rapid Python Web Application Development (CODE)

۴۹٬۰۰۰ تومان

Opa application development : a rapid and secure web development framework to develop web applications quickly and easily in Opa

Opa application development : a rapid and secure web development framework to develop web applications quickly and easily in Opa

۴۹٬۰۰۰ تومان

Opa application development : a rapid and secure web development framework to develop web applications quickly and easily in Opa

Opa application development : a rapid and secure web development framework to develop web applications quickly and easily in Opa

۴۹٬۰۰۰ تومان

Opa application development : a rapid and secure web development framework to develop web applications quickly and easily in Opa

Opa application development : a rapid and secure web development framework to develop web applications quickly and easily in Opa

۴۹٬۰۰۰ تومان

Rapid Application Development with GNOME and Python

Rapid Application Development with GNOME and Python

۴۹٬۰۰۰ تومان

Web Application Development with Streamlit : Develop and Deploy Secure and Scalable Web Applications to the Cloud Using a Pure Python Framework

Web Application Development with Streamlit : Develop and Deploy Secure and Scalable Web Applications to the Cloud Using a Pure Python Framework

۴۹٬۰۰۰ تومان

Catalyst : accelerating perl web application development ; design, develop, test, and deploy applications with the open-source Catalyst MVC framework

Catalyst : accelerating perl web application development ; design, develop, test, and deploy applications with the open-source Catalyst MVC framework

۴۹٬۰۰۰ تومان

قیمت نهایی

۴۴٬۰۰۰ تومان