
In this review session, we will recap the basics of Object Orientation by demonstrating how a child class may override a parent class definition, as well as contain its own member functions.
Determining if classes are related to each other need not be an "in the know" process. In this lesson, we will also use the most popular way to dynamically discover if two objects are related to each other during run-time.
Creating a common abstraction - or interface that a group of related objects must support - is the common Framework requirement. In this lesson we will review how to allow a shared base class to operate as a "signature class" in Python.
We will also demonstrate how to package our creations into their own Python packages.
What do nouns, verbs, and 'things' have to do with code?
Course overview, PEP, and order of operations.
Review how to use "getters and setters," to better manage member values, as well as Python 3's preferred @property member function decorator.
The idea of using a "factory" to create our Objects has many practical benefits.
Once we have a way to ensure common relationships, the next
Framework-challenge is to ensure that we will always be able to create
objects using zero or many initialization requirements. Part of a
two-part best practice, in this lesson we begin to discover how to use
Python's "decorator functions" to help manage an object-creation
process.
Static class methods need not have any parameters. When creating classes however, students should strive to become as comfortable creating objects from class definitions, as each has become with member functions that always receive class instances.
Discover a powerful best-practice that allows controller classes to manage the construction of an unlimited number of related framework classes over time.
Demonstrate topic mastery by applying what you have learned to create - as well as test - a fully-factorized object framework.
Learn how to avoid run-time errors by learning how to check for class members before trying to use them. Discover more ways to check for object relationships, as well as how to see if two classes are related.
Apply the complete set of member and object inspection operation to your object-oriented Framework.
Using isinstance and issubclass to detect and to mange regressions. Practice using "Duck-typing" via hasattr getattr as well?
Lesson conclusion and project-related resources.
Layered Learning
Never a "one size fits all" approach, our training opportunities are divided into beginner (1000), intermediate (2000), and advanced (3000 - 9000) experience levels. Rather than learning things you might not need to know, students can choose the topics that they are most interested in.
In Python 2100: Objects, Factories, & Frameworks we will discover that Object Orientation is more than Inheritance. Much like we see all around us in the modern world, the ability to use Factories to create and initialize our Objects properly is a very important technique to master.
Once created however, providing a well designed Object Framework also ensures that our Factories will be able to support our object creation needs now, as well as well after our Packages have been completed.
About This Series
Written by a Principal Trainer & Principal Software Development Engineer, in order to insure mastery key topics are presented several times, as well as at ever-increasing depth. Students will also be using professional programming interfaces - the same tools that software developers use - to create their software.
From keywords & tabs, to testing & documentation, hints & tips on how to use Python in the professional world abound!
After completing the Python 1000 series, in the Python 2000 series students will complete keyword mastery by exploring a large collection of activity-related topics. Sold separately, in the 2000 series students will enjoy learning how to create Lambdas, Generators, Context Managers, Packages & Modules, Classes, Factories, Frameworks, how to manage Exceptions, as well as other professional programming topics.