P
P
private_tm2016-05-05 17:54:36
OOP
private_tm, 2016-05-05 17:54:36

What is the optimal number of functions that a class should have? (best practices)?

read that for the sake of 2 functions it is not necessary to create a class.
I would like to know for the sake of how much this can already be done.
The php language, well, in the trailer, it does not have any fundamental significance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Movchan, 2016-05-05
private_tm

I read that for the sake of 2 functions you should not create a class

For the sake of functions, a class does not need to be created at all. A class needs to be created when you need to represent a certain entity. And there should be as many methods as this entity implies.

D
Denis Ineshin, 2016-05-05
@IonDen

So much so that modularity is visible and at the same time the class is not overloaded with unnecessary code. By eye in general.

A
AtomKrieg, 2016-05-05
@AtomKrieg

swreflections.blogspot.ru/2012/12/rule-of-30-when-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question