Python Application Development in Practice cover

Python Application Development in Practice

No rating yet
Chapters
10
ISBN
9787115477576

Tags

Summary

Python Application Development in Practice is an advanced, hands-on Python book by Ninad Sathaye, translated by Bao Yongshuai and Qi Zhaohui. The original English title is Learning Python Application Development; it is licensed by Packt and published by Posts & Telecom Press, about 320 pages. The book uses a small text game, "Attack of the Orcs," as a running case. Starting from the crudest command-line script, and iterating through versions 0.0.1, 0.0.5, and 1.0.0, it embeds one by one the key software engineering concerns of moving "from something that runs to something that runs well": functions and object-oriented design, abstract base classes, exception handling and custom exceptions, modularization and package distribution, version numbering conventions, code documentation and best practices, unit testing and refactoring, common design patterns, identifying and optimizing performance bottlenecks (including NumPy and parallelization), and finally developing a simple GUI application in Python with MVC layering. Unlike ordinary syntax books, this book's goal is not "learn Python syntax" but "write Python applications that are maintainable, extensible, and deliverable": the same code is repeatedly refactored, supplemented with tests, given exception handling, and tuned for performance, so readers see for themselves the difference before and after engineering improvements. The book has 10 chapters, each ending with a summary and exercises. It suits developers who already know basic Python syntax and object-oriented concepts and want to cross the gap from "can write scripts" to "can build projects."

Editor's review

市面上大部分 Python 书都在教语法,这本书教的是「交付」。 作者用一款文本小游戏做主线,让同一份代码在十章里不断升级:先写成脚本,再拆成函数,再改成类,然后加异常、加日志、打包发布、补文档、写单元测试、重构掉坏味道、套上设计模式、用剖析器找出瓶颈、用 NumPy 和并行把速度压下来,最后做成带界面的应用。读者获得的是对同一条代码库完整的工程化体验,这种「活体案例」比零散示例更容易内化。 它补的正是自学者最缺的一课:代码不是写完就完事,健壮性、可读性、可测试性与性能都会决定它能活多久。译文准确,术语规范,每章附练习,适合当作一门「Python 软件工程」短课的教材,也适合工作一两年后回头补工程基本功的开发者。出版年份较早,个别库版本需要按当下环境调整,但讲的方法与判断在今天依然成立。

Who it's for

A good fit for

  • 已掌握 Python 基本语法与函数、类,想从写脚本进阶到做项目的开发者
  • 计算机相关专业学生,作为 Python 程序设计之后的软件工程实践课配套读物
  • 转行进入后端/工具开发岗位、需要补齐工程基本功的自学者
  • 想系统理解测试、重构、设计模式与性能优化如何落到 Python 代码上的人

Not a good fit for

  • 完全没有编程经验的零基础读者,书中不从头讲语法
  • 只想快速学框架做网站或数据分析、不关心代码可维护性的读者
  • 需要紧跟最新 Python 版本特性与当代工具链的读者,本书年代表较早

Reading tips

  1. 务必亲手敲一遍「兽人之袭」案例,按书中版本号逐步迭代,不要只看代码。
  2. 每章的练习和小结先自己做再看答案,重构与测试两章建议反复做两遍。
  3. 性能章节可配合 cProfile、timeit 在实际项目上练手,把书中方法迁移到自己的代码。
  4. 遇到库版本报错时查阅官方文档,关注思路而非照抄旧版本 API。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Chapter 1 Developing a Simple Application
  2. Chapter 2 Exception Handling
  3. Chapter 3 Modularization, Packaging, and Deployment
  4. Chapter 4 Code Documentation and Best Practices
  5. Chapter 5 Unit Testing and Refactoring
  6. Chapter 6 Design Patterns
  7. Chapter 7 Performance: Identifying Bottlenecks
  8. Chapter 8 Performance Optimization 1
  9. Chapter 9 Performance Optimization 2: NumPy and Parallelization
  10. Chapter 10 A Simple GUI Application

FAQ

这本书适合零基础学 Python 吗?
不适合。本书定位是进阶实践,默认读者已了解 Python 语法和面向对象编程。零基础建议先读一本入门教材,再用本书补工程化能力。
书中的主线案例「兽人之袭」是什么?
是作者虚构的一个文本小游戏,作为贯穿全书的教学载体。它从简单脚本逐版本演进,用来演示异常处理、模块化、测试、重构、性能优化等工程主题。
书里的内容会不会太旧、代码跑不起来?
本书 2018 年出版,Python 语法部分基本仍然适用,但部分第三方库的版本与接口已经变化。建议按当前环境调整依赖版本,重点学习方法与设计判断。
读完能胜任实际开发工作吗?
能建立起可维护代码的意识与常用工具,但实际岗位还需补框架、数据库、部署等知识。把它当作工程基本功训练书,而不是全栈速成教材更合适。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category