- Software Architecture with Python
- Anand Balachandran Pillai
- 1524字
- 2021-07-02 23:29:53
Preface
Software architecture, or creating a blueprint design for a particular software application, is not a walk in the park. The two biggest challenges in software architecture are keeping the architecture in sync, first with the requirements as they are uncovered or evolve, and next with the implementation as it gets built and evolves.
Filled with examples and use cases, this guide takes a direct approach to helping you with everything it takes to become a successful software architect. This book will help you understand the ins and outs of Python so that you can architect and design highly scalable, robust, clean, and performant applications in Python.
What this book covers
Chapter 1, Principles of Software Architecture, introduces the topic of software architecture, giving you a brief on architectural quality attributes and the general principles behind them. This will enable you to have strong fundamentals in software architectural principles and foundational attributes.
Chapter 2, Writing Modifiable and Readable Code, covers developmental architectural quality attributes, namely, modifiability and readability. It will help you gain an understanding of the architectural quality attribute of maintainability and tactics of writing code in Python to test your applications.
Chapter 3, Testability – Writing Testable Code, helps you understand the architectural quality attribute of testability and how to architect Python applications for testability. You will also learn about various aspects of testability and software testing and the different libraries and modules available in Python to write testable applications.
Chapter 4, Good Performance is Rewarding!, covers the performance aspects of writing Python code. You will be equipped with the knowledge of performance as a quality attribute in architecture and when to optimize for performance. You will learn when to optimize for performance in the SDLC.
Chapter 5, Writing Applications that Scale, talks about the importance of writing scalable applications. It discusses different ways to achieve of application scalability and discusses scalability techniques using Python. You will also learn about theoretical aspects of scalability and the best practices in the industry.
Chapter 6, Security – Writing Secure Code, discusses the security aspect of architecture and teaches you best practices and techniques of writing applications that are secure. You will understand the different security issues to watch out for and to and to architecture applications in Python that are secure from the ground up.
Chapter 7, Design Patterns in Python, gives you an overview of design patterns in Python from a pragmatic programmer's perspective, with brief theoretical background of each pattern. You will gain knowledge of design patterns in Python that are actually useful to pragmatic programmer.
Chapter 8, Python Architectural Patterns, introduces you to the modern architectural patterns in Python from a high-level perspective while giving examples of Python libraries and frameworks to realize the approaches of these patterns to solve high-level architecture problems.
Chapter 9, Deploying Python Applications, covers the aspect of easily deploying your code on remote environments or on the cloud using Python the right way.
Chapter 10, Techniques for Debugging, covers some of the debugging techniques for Python code—from the simplest, strategically placed print statement to logging and system call tracing which will be very handy to the programmer and also help the system architect to guide his team.
What you need for this book
To run most of the code samples shown in this book, you need to have Python 3 installed on your system. The other prerequisites are mentioned at the respective instances.
Who this book is for
This book is for experienced Python developers who are aspiring to become the architects of enterprise-grade applications or software architects who would like to leverage Python to create effective blueprints of applications.
Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include
directive."
A block of code is set as follows:
class PrototypeFactory(Borg): """ A Prototype factory/registry class """ def __init__(self): """ Initializer """ self._registry = {} def register(self, instance): """ Register a given instance """ self._registry[instance.__class__] = instance def clone(self, klass): """ Return clone given class """ instance = self._registry.get(klass) if instance == None: print('Error:',klass,'not registered') else: return instance.clone()
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
[default]
exten => s,1,Dial(Zap/1|30)
exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
exten => i,1,Voicemail(s0)
Any command-line input or output is written as follows:
>>> import hash_stream >>> hash_stream.hash_stream(open('hash_stream.py')) '30fbc7890bc950a0be4eaa60e1fee9a1'
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.
To send us general feedback, simply e-mail <feedback@packtpub.com>
, and mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the example code
You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
You can download the code files by following these steps:
- Log in or register to our website using your e-mail address and password.
- Hover the mouse pointer on the SUPPORT tab at the top.
- Click on Code Downloads & Errata.
- Enter the name of the book in the Search box.
- Select the book for which you're looking to download the code files.
- Choose from the drop-down menu where you purchased this book from.
- Click on Code Download.
You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR / 7-Zip for Windows
- Zipeg / iZip / UnRarX for Mac
- 7-Zip / PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Software-Architecture-with-Python. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Downloading the color images of this book
We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/SoftwareArchitecturewithPython_ColorImages.pdf.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <copyright@packtpub.com>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
Questions
If you have a problem with any aspect of this book, you can contact us at <questions@packtpub.com>
, and we will do our best to address the problem.
- C語言程序設計實踐教程(第2版)
- 嵌入式軟件系統測試:基于形式化方法的自動化測試解決方案
- 小程序實戰視頻課:微信小程序開發全案精講
- Apache Hive Essentials
- Internet of Things with Intel Galileo
- C語言從入門到精通(第4版)
- Unity 5 for Android Essentials
- 領域驅動設計:軟件核心復雜性應對之道(修訂版)
- Terraform:多云、混合云環境下實現基礎設施即代碼(第2版)
- HTML5從入門到精通(第4版)
- Python+Tableau數據可視化之美
- 響應式Web設計:HTML5和CSS3實戰(第2版)
- STM8實戰
- Less Web Development Cookbook
- React and React Native