Answer the question
In order to leave comments, you need to log in
How to start understanding OOP and programming in this style?
I recently started learning C# (not my first language).
To be honest, I have no idea how to start writing code in the OOP style, because I'm used to regular procedural programming.
How can I understand OOP? I mean, I know what classes are, constructors, destructors, inheritance, polymorphism, private, public and so on. The problem is not in learning object-oriented programming, but specifically in understanding it, in my head the code is formed only in procedural form ...
Answer the question
In order to leave comments, you need to log in
First of all, you need to read books about OOP, especially the first chapters, which describe why OOP is needed at all.
What OOP books have you read?
I foresee the answer - none.
only to invent and write programs, there is hardly any other way.
ps As for me, it's much easier to think like "objects" than "data". but I knew people who, in 30 years of working as a programmer, could not accept OOP and their code still remained procedural, although they seemed to use classes.
It is necessary to run into those problems for the solution of which the OOP was invented.
The most effective way is to join an OOP-style open source project. Or get a job as a developer (trainee) in a commercial firm where such projects are being developed.
There is nothing to understand. Literally at the introduction of any course, this is explained.
code.mu explains many PLs very well. I started studying here myself. Thanks to this site I learned a lot. For example, PHP and its fv Laravel.
You can get acquainted with JavaScript, React, NodeJS, Vue, AJAX, Parsing.
Try to write an MVC framework from PHP lessons there. Well, go through the OOP again
Explore layered architecture.
Book: Implementing domain-driven design
You can start right away by reading chapter 4 "Architecture" and the subsection "Layers" for a general understanding of what layers exist and why. Further, you can delve into each of the layers in more detail for a detailed understanding of how each of them works.
Examples from the book: https://github.com/VaughnVernon/IDDD_Samples
Maybe I'm too late, but I'll try to explain in a simple way.
Classes can be thought of as folders that contain files, and each file has specific actions.
Methods (functions within classes) take arguments (variables within functions) and perform actions on them. OOP is needed to create objects, this is implemented using class inheritance, for example: The kot class in which the izdat_zvuk method with the zvuk argument. We will pass the string "myau" to the zvuk argument to the first cat, and "mur" to the second one, both cats will inherit the kot class.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question