Tagged articles

Single Responsibility Principle

14 articles · Page 1 of 1
Code Farming
Code Farming
Aug 17, 2026 · Backend Development

How DDD Handles Four E‑Commerce Payment Changes Step‑by‑Step

The article walks through a real e‑commerce payment case, showing how Domain‑Driven Design models entities, uses two key questions to split responsibilities, and continuously evolves the model to accommodate discounts, VIP features, and new payment adapters, reducing code churn.

DDDDomain-Driven DesignMicroservices
0 likes · 6 min read
How DDD Handles Four E‑Commerce Payment Changes Step‑by‑Step
Infinite Tech Management
Infinite Tech Management
Jul 8, 2026 · Backend Development

Why “UserService” Is a Bad Name: Lessons from a 12,000‑Line Service

The article recounts a 12,000‑line UserService.java file, explains how the overly generic name masks multiple responsibilities, violates the single‑responsibility principle, and creates a distributed monolith, then shows how domain‑driven naming and bounded‑context splitting can restore clear architecture.

Domain-Driven DesignMicroservicesSingle Responsibility Principle
0 likes · 8 min read
Why “UserService” Is a Bad Name: Lessons from a 12,000‑Line Service
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Oct 25, 2023 · Fundamentals

Understanding the Single Responsibility Principle (SRP) with UML Diagrams and Java Code Examples

This article explains the Single Responsibility Principle, its core idea, why it should be followed, its three main benefits, and provides UML class diagrams and Java code examples that demonstrate how to split responsibilities into dedicated classes for clearer, more maintainable software.

Code ExampleSRPSingle Responsibility Principle
0 likes · 9 min read
Understanding the Single Responsibility Principle (SRP) with UML Diagrams and Java Code Examples
Architect's Guide
Architect's Guide
Feb 18, 2023 · Fundamentals

Why Long Classes Are Problematic and How to Refactor Them

The article explains the drawbacks of excessively long classes—poor readability, difficult extension, redundant code, and violated responsibilities—and provides step‑by‑step refactoring techniques using IntelliJ IDEA to extract methods, move members, and create new classes for cleaner, maintainable code.

IntelliJ IDEASingle Responsibility PrincipleSoftware Engineering
0 likes · 8 min read
Why Long Classes Are Problematic and How to Refactor Them
IT Services Circle
IT Services Circle
Feb 6, 2022 · Fundamentals

Using Python Descriptors to Enforce the Single Responsibility Principle

This article explains what Python descriptors are, why they help follow the Single Responsibility Principle, and demonstrates how to replace repetitive property setters with reusable descriptor classes such as a fuel‑capacity validator and a generic range‑checking descriptor.

PropertySingle Responsibility Principledescriptors
0 likes · 4 min read
Using Python Descriptors to Enforce the Single Responsibility Principle
Architecture Digest
Architecture Digest
Sep 14, 2021 · Fundamentals

Why You Should Avoid Writing Thousand‑Line Classes and How to Refactor Them

The article explains the problems caused by overly long classes—poor readability, difficult extension, redundant code, and violated design principles—and provides a step‑by‑step guide using IntelliJ IDEA to extract redundant code, rename methods, move members, and split responsibilities into new classes for cleaner, maintainable software.

IDEASingle Responsibility PrincipleSoftware Engineering
0 likes · 8 min read
Why You Should Avoid Writing Thousand‑Line Classes and How to Refactor Them
Code Ape Tech Column
Code Ape Tech Column
Sep 11, 2021 · Fundamentals

Why Classes Should Not Be Too Long and How to Refactor Them

The article explains the drawbacks of overly long classes—poor readability, difficult extension, redundant code, and violation of the Single Responsibility Principle—and provides step‑by‑step refactoring techniques using IntelliJ IDEA such as extracting methods, moving members, and creating new classes.

IDEASingle Responsibility PrincipleSoftware Engineering
0 likes · 7 min read
Why Classes Should Not Be Too Long and How to Refactor Them
Code Ape Tech Column
Code Ape Tech Column
Apr 6, 2021 · Fundamentals

Why Overly Long Classes Break Your Code and How to Refactor Them with IDEA

The article explains why excessively long classes hinder readability and extensibility, outlines the problems caused by redundant code and violated design principles, and provides a step‑by‑step guide using IntelliJ IDEA to extract methods, move members, and create new classes for cleaner, maintainable code.

Code RefactoringIntelliJ IDEASingle Responsibility Principle
0 likes · 9 min read
Why Overly Long Classes Break Your Code and How to Refactor Them with IDEA
Java Captain
Java Captain
Aug 16, 2020 · Fundamentals

Why Classes Should Not Be Too Long and How to Refactor Overgrown Classes

The article explains why excessively long classes with many responsibilities hinder readability and extensibility, outlines the problems of redundant code and SRP violations, and provides practical refactoring techniques—such as extracting methods, moving members, and creating new classes—using IntelliJ IDEA.

IntelliJ IDEASingle Responsibility PrincipleSoftware Design
0 likes · 11 min read
Why Classes Should Not Be Too Long and How to Refactor Overgrown Classes
Programmer DD
Programmer DD
May 5, 2020 · Fundamentals

Why Long Classes Break Your Code and How to Refactor Them with IDEA

This article explains why excessively long classes are hard to read and extend, outlines the problems caused by redundant code and multiple responsibilities, and provides step‑by‑step refactoring techniques using IntelliJ IDEA to extract methods, move members, and create new classes.

IDEASingle Responsibility PrincipleSoftware Design
0 likes · 8 min read
Why Long Classes Break Your Code and How to Refactor Them with IDEA
Programmer DD
Programmer DD
Mar 31, 2020 · Backend Development

Why Your Java Classes Shouldn’t Exceed a Thousand Lines—and How to Refactor Them

Long, monolithic Java classes with hundreds of methods become unreadable, hard to extend, and prone to redundant code, so this guide explains the drawbacks of oversized classes and provides step‑by‑step refactoring techniques using IntelliJ IDEA to extract methods, move members, and create new classes.

IDEASingle Responsibility PrincipleSoftware Design
0 likes · 8 min read
Why Your Java Classes Shouldn’t Exceed a Thousand Lines—and How to Refactor Them
Qunar Tech Salon
Qunar Tech Salon
Dec 6, 2014 · Fundamentals

Why Code Becomes Unreadable Over Time and How to Keep It Simple

The article explains how over‑complex mental models, poor translation of semantic ideas into code, inadequate naming, missing design chunks, unclear usage patterns, and lack of smooth model transitions cause code to decay, and offers practical principles such as DDD, SRP, good naming, testing, and reusing existing algorithms to maintain readability.

Domain-Driven DesignSingle Responsibility PrincipleSoftware Design
0 likes · 10 min read
Why Code Becomes Unreadable Over Time and How to Keep It Simple