This video starts off by explaining how Python fits into an application architecture. As you move along, you will understand the architecturally significant demands and how to determine them. Later, you’ll get a complete understanding of the different architectural quality requirements that help an architect to build a product that satisfies business needs, such as maintainability or reusability, testability, scalability, performance, usability, and security.
This video will help you understand the ins and outs of Python so that you can make those critical design decisions that not just live up to but also surpass the expectations of your clients.
About The Author
Anand Balachandran Pillai is an Engineering and Technology professional with over 18 years of experience in the software industry in Product Engineering, Software Design & Architecture and Research.
He has worked at companies such as Yahoo!, McAfee, and Infosys in the roles of Lead Engineer and Architect in product development teams, to build new products.
He is the founder of the Bangalore Python Users Group and a Fellow of the Python Software Foundation (PSF).
Anand is currently working as Senior Architect of Yegii Inc.
Architecture is the fundamental organization of a system embodied in its components, their relationships to each other, and to the environment, and the principles guiding its design and evolution.
An architecture of a system is best represented as structural details of the system and here we will see some of the characteristics of software architecture.
The term quality attribute has been used to loosely define some of these aspects that an architecture makes trade-offs for.
The readability of a software system is closely tied to its modifiability. Well-written, well-documented code, keeping up with standard or adopted practices for the programming language, tends to produce simple, concise code that is easy to read and modify.
Cohesion and coupling are the main fundamentals of modifiability.
Now that we have seen some examples of good and bad coupling and also cohesion, let us get to the strategies and approaches that a software architect can adopt to improve the modifiability of the software system.
Static code analysis tools can provide a rich summary of information on the static properties of your code, which can provide insights into aspects like complexity and modifiability/readability of the code.
Now that we have seen how static checkers can be used to report a wide range of errors and issues in our Python code, let us do a simple exercise of refactoring our code. We will take our poorly defined metric test module as the use case (the first version of it), and perform a few refactoring steps.
A software system with a high level of testability provides a high degree of exposure of its faults through testing, thereby giving the developers higher accessibility to the system's issues, and allowing them to find and fix bugs faster.
From a software architecture perspective, one of the most important steps of testing is at the time the software is developed. The behavior or functionality of a software, which is apparent only to its end users, is an artifact of the implementation details of the software.
Hence, it follows that a system which is tested early and tested often has a higher likelihood to produce a testable and robust system, which provides the required functionality to the end user in a satisfactory manner.
Code coverage is measured as the degree to which the source code under test is covered by a specific test suite. Ideally, test suites should aim for higher code coverage, as this would expose a larger percentage of the source code to tests, and help to uncover bugs.
TDD is an agile practice of software development, which uses a very short development cycle, where code is defined to satisfy an incremental test case.
The degree to which the system is able to meet its throughput and/or latency requirements in terms of the number of transactions per second or time taken for a single transaction.
Now that we've had an overview of what performance complexity is and also of performance testing and measurement tools, let us take an actual look at the various ways of measuring performance complexity with Python.
Modules in the Python standard library, which provides support for deterministic profiling. The third-party libraries provide support for profiling such as line_profiler and memory_profiler.
Extend tools that will aid the programmer in debugging memory leaks and also enable him to visualize his objects and their relations.
We saw a couple of examples of program optimization to improve the time performance of the code.
Here, we will take a look at common Python data structures and see what their best and worst performance scenarios are and also discuss some situations of where they are an ideal fit and where they may not be the best choice.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.