Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Refactoring Legacy Django App Using OOP

EuroPython Conference via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore refactoring techniques for legacy Django applications using Object-Oriented Programming principles in this 40-minute EuroPython 2021 conference talk. Learn how to leverage OOP concepts to improve code quality and manage complex logic without resorting to outdated practices. Discover three key OOP stereotypes - Controller, Interfacer, and Information Holder - and their practical application in real-world legacy project refactoring. Gain insights into refactoring strategies, the importance of gradual improvements, and how to avoid common pitfalls like big-bang rewrites. Understand the role of essential complexity in software development and explore concepts such as inheritance, composition, encapsulation, abstraction, and polymorphism. Delve into practical heuristics for code organization, including the "Tell, Don't Ask" principle and the application of role stereotypes. Suitable for intermediate to advanced developers with experience in web application development and basic knowledge of Django.

Syllabus

Intro
Refactoring improving the design af odsting code
Refactoring is a journey
No Refactoring
Big-Bang rewrite != refactoring
The best moment to refactor? Right before implementing a new feature
@staticmethod considered a code smell
how could this happen?
Essential complexity No way to escape - one needs to manage it
Writing classes != OOP
Cells creating an organism
Community members
Actors performing a play
Inheritance Composition Encapsulation Abstraction Polymorphism
Roles Responsibilities Collaborations
Where to put that code?
Role Stereotypes
Tell, Don't Ask
Information Holder model Structurer Service Provider Coordinator signal handler Controller Interfacer
1. Introduce Interfacers 2. Consolidate Controller role 3. Strip side effects off Information Holders
Heuristics not commandments
No long refactoring journeys Do it daily

Taught by

EuroPython Conference

Reviews

Start your review of Refactoring Legacy Django App Using OOP

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.