What is the context in object-oriented programming?

What is the context in object-oriented programming?

What is the context in object-oriented programming? This question changed my view on object-oriented programming forever. It was a few years ago when I accidentally found the answer I hadn’t even sought. Eventually, however, it was surprisingly simple, yet enlightening.

This question changed my view on object-oriented programming forever. It was a few years ago when I accidentally found the answer I hadn’t even sought. Eventually, however, it was surprisingly simple, yet enlightening. Unlike me back then, I assume you aren’t here by mistake, so I hope to shed some light on the concept of context and, ideally, inspire you to build better-designed software.

Before I start, let me mention that you shouldn’t expect much academic theory (in fact, you shouldn’t expect it at all) and terms used in their strict book definitions. My aim is not to give one of those dull lectures devoid of practical usage, but to share my knowledge and understanding of the context in the… context of OOP, and how it helps to design clearer architecture and more user-friendly APIs, libraries, etc. Let me emphasize “share” as I’m far from “teaching” you the one and only way to understand this topic.

All code samples are written in Kotlin for two reasons. Number one — currently it’s the programming language in which I write the most. Moreover, I got the idea for this article while working on my set of Android libraries, thus it’s easier to find/come up with real-world examples. The second reason is that the syntax of Kotlin handles using contexts and defining DSL-like tools in the most impressive and friendly manner I’ve seen. Yeah, Kotlin fanboi confirmed. 😅 Okay, that’s a long preface. Let’s get started.

object-oriented kotlin context software-architecture software-design

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How to Find Ulimit For user on Linux

Explains how to find ulimit values of currently running process or given user account under Linux using the 'ulimit -a' builtin command.

MEAN Stack Tutorial MongoDB ExpressJS AngularJS NodeJS

MEAN Stack Tutorial MongoDB ExpressJS AngularJS NodeJS - We are going to build a full stack Todo App using the MEAN (MongoDB, ExpressJS, AngularJS and NodeJS). This is the last part of three-post series tutorial.

Creating RESTful APIs with NodeJS and MongoDB Tutorial

Creating RESTful APIs with NodeJS and MongoDB Tutorial - Welcome to this tutorial about RESTful API using Node.js (Express.js) and MongoDB (mongoose)! We are going to learn how to install and use each component individually and then proceed to create a RESTful API.

systemctl List All Failed Units/Services on Linux

Explains how to use the systemctl command to list all failed units or services on Debian, Ubuntu, CentOS, Arch, Fedora, and other Linux distros.

CentOS Linux 8.2 Released and Here is How to Upgrade it

CentOS Linux 8.2 (2004) released. This release adds corrections for security issues based upon RHEL 8.2 souce and here is how to upgrade it.