There are PHP OOP and MVC - what is it called, right? And what kinds of this here still happen besides MVC ?

  • Probably you mean OOP patterns? - cheops
  • one
    Then, most likely, you are interested in MVC, MVP, MVVM in more detail at the all-powerful habrahabr.ru/post/215605 - cache
  • 3
    MVC - pattern, OOP - the paradigm - Igor
  • one
    Pattern or Pattern. MVC, MVP, MVVM are architectural patterns. Singleton, facade, repository, factory are design patterns. but they are from a slightly different opera. - cache
  • one
    Wikipedia is better to start. And according to the list of references. Most are in translation. - Yura Ivanov

1 answer 1

There are a lot of patterns (singleton, facade, repository, factory, prototype, bridge, linker, decorator, etc.), there are so many of them that they are divided into groups (structural, generative, behavioral, etc.).

For example, MVC is an architectural (or structural) pattern, singleton is a generator.

The term itself is borrowed from the architecture of buildings and is intended to refer to typical solutions in object-oriented programming (recently, not only in it, for example, in databases).

There are many books on patterns, the best translated into Russian. The most famous is “Object-oriented design techniques. Design patterns” by the gang of four, Richard Helm, Ralph Johnson, John Vlissides). Very deep works by Fowler. If you're just familiar with the topic, you can find a wonderful edition of Design Patterns by Eric Freeman, Elizabeth Freeman from the Head First series. Can be advised Game Programming Patterns .

The topic is very big, and even a part of the patterns in one answer will not work, it is better to ask about each specific pattern with a separate question.

  • cheops, I understand that MVC and the fact that you listed this one and the same, well, in the sense you can write this: mvc, singleton, facade, factory, bridge - and this will be true? - user33274
  • mvc is an architectural pattern, singleton is a creational pattern, and yes, you can dump them all into one box, of course, but not recommended - strangeqargo
  • 2
    @LenovoID Yes, in the first approximation, these are all patterns, but MVC is firstly two different types (Model I and Model II), and secondly, when we talk about the Web (and this is Model II), it can be argued that MVC is This is a composite pattern: Observer + Strategy + Linker. - cheops
  • 2
    @LenovoID, it happens - there are a lot of them. In fact, this is a brief designation of architectural solutions. As with buildings, when you are told a skyscraper, a skyscraper, a country cottage, without going into lengthy explanations you understand what type of housing you are talking about, its price, advantages, disadvantages, time to build. Similarly, when MVC is spoken, you understand that there are models, a controller and a presentation inside. Patterns concisely and briefly indicate a typical solution. - cheops
  • one
    @LenovoID Start with the book Freeman - MVC is there at the end :) But it’s a very detailed and humorous introduction to the subject. - cheops