проектирование

Laravel how to link 2 tables to get the data of the first one by the id of the other table

Hello everyone. Let's say there are 2 tables - clients and payments. The client can have many payments, because here in the m ... nts of a particular client (clearly, the id characterizes a particular client). Please tell me who knows how to implement it.

Best practices of project structure

Aside from the humorous (not without a bit of seriousness ) templates of Java projects with their "/main/java/com/seriouscom ... inimalistic and not grotesque standard that is easy to develop, and can also be demonstrated without shame to serious people?

Learn how to design an application architecture [closed]

Closed. It is impossible to give an objective answer to this question . Answers to it are not accepted at the moment. ... s and too complex for small projects? And does anyone have links to C# projects where you can view architectural solutions?

Why do I need a Dependency Injection container?

The principle of Inversion of Control is clear and logical to me, but I can't understand why DI is needed. Example: public c ... nging just one word in one place. So what is the point of DI container then? Sorry if the question is stupid, I'm a beginner.

Designing class interaction

The problem is accessing the methods and fields of the classes. After writing a certain class (public class A), we want to ac ... he children class (RichChildren) in order to get through it and use the get method. That's where I got completely confused...

What is orthogonality?

I noticed that the term ортогональность is often used incorrectly and did not find a source in Runet that explains well what ... on of ортогональность along with a link to the source. See code examples showing the orthogonal and non-orthogonal approach.

Choose between property, method, extension method, toString for User.FullName

Suppose there is the following class: public class User { public string FirstName {get;set;} public string LastName ... Explain please specify which method is preferable to use, the pros/cons of this or that method for further code maintenance.

What is a model?

Quite often, the concept of a model is found in terms of, for example, MVC or ORM. But what is it ? Let's say we have a tab ... a little confused. Here, the User class is the bin (bean), and the model is the entire table. Do I understand correctly ?

Aggregation and composition

Hello! I always thought that aggregation is a synonym for composition, but I came across a blog on the Internet where shows ... ew my mind. Please explain the pros/cons of both using small examples. How does this affect extensibility, testability, etc.

Pure Code: The Obscure Law of Demeter

I am currently reading the book Pure code on a small chapter about the law of Demeter. Before that, I encountered it in the p ... is not designed correctly and you can find a solution that will be better both in business logic and in further maintenance.

I can't understand the Single Responsibility Principle)

In theory, everything is clear, but in practice there are always difficulties. They are related to the fact that it is not cl ... eads it from there and updates it. Maybe it's better to create 3 classes: DataBaseWriter, DataBaseReader and DataBaseUpdater?

Why is it necessary to encapsulate what changes?

A question about design. Why is it necessary to separate what will not change from what can change by encapsulation?