Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python for Geeks

You're reading from   Python for Geeks Build production-ready applications using advanced Python concepts and industry best practices

Arrow left icon
Product type Paperback
Published in Oct 2021
Publisher Packt
ISBN-13 9781801070119
Length 546 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Muhammad Asif Muhammad Asif
Author Profile Icon Muhammad Asif
Muhammad Asif
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Section 1: Python, beyond the Basics
2. Chapter 1: Optimal Python Development Life Cycle FREE CHAPTER 3. Chapter 2: Using Modularization to Handle Complex Projects 4. Chapter 3: Advanced Object-Oriented Python Programming 5. Section 2: Advanced Programming Concepts
6. Chapter 4: Python Libraries for Advanced Programming 7. Chapter 5: Testing and Automation with Python 8. Chapter 6: Advanced Tips and Tricks in Python 9. Section 3: Scaling beyond a Single Thread
10. Chapter 7: Multiprocessing, Multithreading, and Asynchronous Programming 11. Chapter 8: Scaling out Python Using Clusters 12. Chapter 9: Python Programming for the Cloud 13. Section 4: Using Python for Web, Cloud, and Network Use Cases
14. Chapter 10: Using Python for Web Development and REST API 15. Chapter 11: Using Python for Microservices Development 16. Chapter 12: Building Serverless Functions using Python 17. Chapter 13: Python and Machine Learning 18. Chapter 14: Using Python for Network Automation 19. Other Books You May Enjoy

Different phases of a Python project

Before we discuss the optimal development life cycle, let's start by identifying the different phases of a Python project. Each phase can be thought of as a group of activities that are similar in nature, as illustrated in the following diagram:

Figure 1.2 – Various phases of a Python project

Figure 1.2 – Various phases of a Python project

The various phases of a typical Python project are outlined here:

  • Requirement analysis: This phase is about collecting the requirements from all key stakeholders and then analyzing them to understand what needs to be done and later think about the how part of it. The stakeholders can be our actual users of the software or business owners. It is important to collect the requirements in as much detail as possible. Wherever possible, requirements should be fully laid out, understood, and discussed with the end user and stakeholders before starting the design and development.

    An important point is to ensure that the requirement-analysis phase should be kept out of the iterative loop of the design, development, and testing phases. Requirement analysis should be fully conducted and complete before moving on to the next phases. The requirements should include both functional requirements (FRs) and non-functional requirements (NFRs). FRs should be grouped into modules. Within each module, the requirements should be numbered in an effort to map them as closely as possible with the code modules.

  • Design: Design is our technical response to the requirements as laid out in the requirement phase. In the design phase, we figure out the how part of the equation. It is a creative process where we use our experience and skills to come up with the right set and structure of modules and the interactions between them in the most efficient and optimal way.

    Note that coming up with the right design is an important part of a Python project. Any missteps in the design phase will be much more expensive to correct than missteps in later phases. By some measure, it takes 20 times more effort to change the design and implement the design changes in the subsequent phases (for example, coding phase), as compared to a similar degree of changes if they happen in the coding phase—for example, the inability to correctly identify classes or figure out the right data and compute the dimension of the project will have a major impact as compared to a mistake when implementing a function. Also, because coming up with the right design is a conceptual process, mistakes may not be obvious and cannot be caught by testing. On the other hand, errors in the coding will be caught by a well-thought-out exception-handling system.

    In the design phase, we perform the following activities:

    a) We design the structure of the code and identify the modules within the code.

    b) We decide the fundamental approach and decide whether we should be using functional programming, OOP, or a hybrid approach.

    c) We also identify the classes and functions and choose the names of these higher-level components.

    We also produce higher-level documentation.

  • Coding: This is the phase where we will implement the design using Python. We start by implementing the higher-level abstractions, components, and modules identified by the design first, followed by the detailed coding. We will keep a discussion about the coding phase to a minimum in this section as we will discuss it extensively throughout the book.
  • Testing: Testing is the process of verifying our code.
  • Deployment: Once thoroughly tested, we need to hand over the solution to the end user. The end user should not see the details of our design, coding, or testing. Deployment is the process of providing a solution to the end user that can be used to solve the problem as detailed in the requirements. For example, if we are working to develop a machine learning (ML) project to predict rainfall in Ottawa, the deployment is about figuring out how to provide a usable solution to the end user.

Having understood what the different phases of a project are, we will move on to see how we can strategize the overall process.

You have been reading a chapter from
Python for Geeks
Published in: Oct 2021
Publisher: Packt
ISBN-13: 9781801070119
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime