Tagged articles
Encapsulation
35 articles · Page 1 of 1
This article argues that Java developers adopt Lombok as a compromise against dogmatic encapsulation that mandates getters/setters for fields rarely needing custom logic, while also criticizing unnecessary interface/impl splits and DTO naming conventions, illustrated by a case where a getter enabled quick refactoring across hundreds of call sites.
BoilerplateDogmatismEncapsulation
0 likes · 4 min read

This article uses a milk‑tea shop analogy and Java code examples to clearly illustrate the three core OOP concepts—encapsulation, inheritance, and polymorphism—showing how they solve data safety, code reuse, and flexible extension while highlighting common pitfalls.
Design PrinciplesEncapsulationInheritance
0 likes · 13 min read

This article explains Java’s three fundamental object‑oriented concepts—encapsulation, inheritance, and polymorphism—by defining each principle, showing concrete code examples, outlining key language keywords, and highlighting common pitfalls for beginners.
EncapsulationInheritanceJava
0 likes · 8 min read

This article explains Java's four access modifiers—public, protected, default (friendly), and private—detailing their visibility rules, typical use cases, and the file‑naming constraints that ensure proper encapsulation in cross‑platform object‑oriented programs.
Access ModifiersEncapsulationJava
0 likes · 4 min read

This article explains the fundamentals of object‑oriented programming in Java, covering objects, classes, inheritance, encapsulation, polymorphism, and packages with concrete examples that illustrate how real‑world concepts map to Java code and how objects interact through message passing.
ClassesEncapsulationInheritance
0 likes · 12 min read

The article explains how excessive, fake, or chaotic encapsulation creates hidden risks, reduces maintainability, and hampers extensibility, then provides concrete refactoring examples and practical principles to achieve clean, purposeful encapsulation in backend code.
Best PracticesCode MaintainabilityEncapsulation
0 likes · 11 min read

The article analyzes three harmful forms of improper encapsulation—over‑encapsulation, fake encapsulation, and chaotic encapsulation—illustrates each with Java code examples, explains the resulting development inefficiencies, extensibility issues, and debugging difficulties, and offers concrete principles to avoid these pitfalls.
EncapsulationJavaSingle Responsibility
0 likes · 12 min read

The article analyzes three common forms of bad encapsulation in Java—over‑encapsulation, false encapsulation, and chaotic encapsulation—illustrates their hidden risks with concrete code examples, and offers practical principles to restore clear responsibilities, minimal interfaces, and flexible design.
EncapsulationJavacode quality
0 likes · 13 min read

The article explains how Java inner classes can be used to encapsulate related functionality, access private members of the outer class, implement interfaces for callbacks, and hide implementation details, providing clear code examples such as Car/Engine, Counter/Incrementer, Button listeners, and a Calculator with an Operation inner class.
EncapsulationInner ClassesJava
0 likes · 4 min read

Friend functions and friend classes in C++ provide controlled access to private and protected members, useful for operator overloading, tightly coupled classes, and global utilities, but must be used judiciously due to their asymmetry, non‑transitivity, and potential to break encapsulation; this guide explains concepts, syntax, examples, and best practices.
C++Encapsulationaccess control
0 likes · 9 min read

This article thoroughly explains C++'s three access control modifiers—public, private, and protected—covering their definitions, differences, practical usage in classes, inheritance effects, friend functions, and best practices for encapsulation and maintainable OOP design.
Access ModifiersC++Encapsulation
0 likes · 6 min read

This article provides a comprehensive guide to Python's class mechanism, covering basic class definition and instantiation, attributes, methods, constructors, special methods like __str__, inheritance, polymorphism, class and static methods, private members, and property decorators, each illustrated with clear code examples and practical usage scenarios.
ClassesEncapsulationdecorators
0 likes · 9 min read

This article introduces PHP's object-oriented programming paradigm, covering fundamental concepts such as classes, objects, properties, methods, the four OOP principles, advanced features like constructors, destructors, static members, magic methods, and best practices for building modular and maintainable backend applications.
ClassesEncapsulationInheritance
0 likes · 8 min read

This article explains the TCP/IP four-layer architecture, detailing each layer’s role, the encapsulation and decapsulation processes, and provides in‑depth coverage of ARP and DNS protocols, including packet structures, Linux commands, and practical packet‑capture examples using tcpdump.
ARPDNSEncapsulation
0 likes · 20 min read

This article explains the concept of data encapsulation and the role of private attributes in object‑oriented programming, illustrating their benefits and usage through multiple Python code examples covering simple classes, private methods, inheritance, property decorators, and descriptors.
EncapsulationOOPPython
0 likes · 8 min read

The article outlines React component design best practices by distinguishing generic UI components from business‑specific ones, separating UI and domain state, extracting reusable base components, applying patterns such as state lifting, context, memoization, and type‑safe props, and providing a checklist for clean encapsulation.
DDDEncapsulationReact
0 likes · 10 min read

This guide explains how to encapsulate a powerful, singleton-based logging system in Python using the MyLog class, covering OOP principles, code structure, and practical usage examples for flexible and maintainable log handling.
EncapsulationLoggingOOP
0 likes · 7 min read

This article explains Python encapsulation fundamentals—including classes, objects, attributes, methods, naming conventions for protected and private members, and practical getter/setter patterns—through clear code examples that demonstrate safe data handling and object-oriented design.
ClassesEncapsulationGetter/Setter
0 likes · 7 min read

This article explains the TCP/IP four‑layer architecture, how data is encapsulated and decapsulated across layers, the operation of ARP and DNS protocols, and how sockets provide user‑space access to these networking services.
ARPDNSEncapsulation
0 likes · 20 min read

This article introduces the core concepts of object‑oriented programming—classes, objects, abstraction, encapsulation, inheritance, and polymorphism—using clear explanations and practical PHP code examples that demonstrate class definitions, object instantiation, method calls, and inheritance hierarchies.
ClassesEncapsulationInheritance
0 likes · 9 min read

This article explains how encapsulation in PHP enables data hiding and access control through private and protected members, improves code readability and maintainability, and serves as a foundation for inheritance and polymorphism, illustrated with clear class examples.
EncapsulationOOPPHP
0 likes · 5 min read

Encapsulation, a core OOP principle, is explored in PHP with explanations of its benefits for data protection and modular code, followed by practical class examples—including a Person class and a BankAccount class—plus best‑practice recommendations for using access modifiers effectively.
Access ModifiersEncapsulationOOP
0 likes · 5 min read

This article presents a concise overview of twenty core software architecture principles—from Dependency Inversion and Separation of Concerns to KISS and Incremental Development—explaining each concept, its purpose, and providing Java code examples to illustrate practical application.
Design PrinciplesEncapsulationSOLID
0 likes · 12 min read

Learn how Python’s @property decorator transforms methods into read‑only attributes, enabling attribute‑style access, preventing unintended modifications, and illustrating proper usage with code examples that show correct and incorrect calls, common pitfalls, and best practices for encapsulating data.
DecoratorEncapsulationProperty
0 likes · 4 min read

This article critiques the over‑idealization of object‑oriented programming, explaining how inheritance can create tight coupling and hidden bugs, why encapsulation may leak state, the limits of polymorphism, and how modern stateless service architectures favor composition and functional approaches.
CompositionEncapsulationInheritance
0 likes · 13 min read

This article explains why understanding the underlying logic of design patterns—identifying change and encapsulating it—is essential for writing flexible, maintainable code, and shows how this principle applies to both software architecture and real‑world business scenarios.
EncapsulationObject-Oriented Designdesign patterns
0 likes · 15 min read

An in‑depth Python tutorial walks through the fundamentals of classes, covering creation, instance and class methods, protected and private members, core OOP features such as encapsulation, inheritance and polymorphism, as well as dynamic attribute handling with __slots__ and property decorators, illustrated with clear examples.
ClassesEncapsulationInheritance
0 likes · 8 min read


21CTODec 16, 2020 · Fundamentals
This article explains why and how to apply object‑oriented programming concepts such as encapsulation, inheritance, and polymorphism using plain C, provides the necessary prerequisites, and walks through complete code examples—including virtual tables—to demonstrate OOP techniques without relying on C++.
EncapsulationInheritanceOOP in C
0 likes · 17 min read

This article walks through the complete lifecycle of a web request, from entering a URL and DNS resolution, through HTTP and TCP processing, IP routing, ARP resolution, and Ethernet framing, explaining each protocol layer's role in encapsulation and de‑encapsulation.
EncapsulationHTTPNetworking
0 likes · 26 min read

From entering a URL to rendering a page, this article walks through the complete HTTP request lifecycle, detailing DNS resolution, TCP/IP transport, protocol layering, encapsulation, and the structure of HTTP messages, providing a clear, step‑by‑step explanation of how data travels across the network.
DNSEncapsulationHTTP
0 likes · 24 min read

The article critiques the core pillars of object‑oriented programming—inheritance, encapsulation, and polymorphism—illustrating their practical pitfalls with real‑world analogies and code examples, and proposes containment and delegation as safer alternatives before urging a shift toward functional programming.
EncapsulationInheritancePolymorphism
0 likes · 11 min read

This article explains Java encapsulation and interfaces, illustrating how access modifiers like public and private control object members, improve usability and safety, and provides a complete code example with a Human class, usage guidelines, and a practical exercise.
Access ModifiersEncapsulationJava
0 likes · 7 min read

This article explains the concept of encapsulation in Java, describing its purpose of hiding internal details, outlining four key benefits, and illustrating its use through Husband and Wife class examples, including getter/setter methods, validation, and how encapsulation simplifies future code modifications.
EncapsulationGetterSetterOOP
0 likes · 9 min read


21CTOJan 15, 2018 · Fundamentals
This article explains Python's object-oriented principles, illustrating how encapsulation hides data through public and private instance variables, demonstrates getter/setter methods, and shows inheritance by extending classes, all accompanied by clear code examples.
EncapsulationInheritanceOOP
0 likes · 9 min read

This article introduces Java developers to essential object‑oriented design principles—including DRY, encapsulation, Open/Closed, SRP, DIP, composition over inheritance, LSP, and Interface Segregation—explaining their benefits, proper usage, and common pitfalls to help write high‑cohesion, low‑coupling code.
Design PrinciplesEncapsulationJava
0 likes · 10 min read
