D
D
Drunya20182018-10-24 18:51:48
Java
Drunya2018, 2018-10-24 18:51:48

How to split a project into packages?

How to give correct names to classes? How to properly distribute these classes into packages?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
EVGENY T., 2018-10-24
@Drunya2018

Make classes according to SOLID principles, then the name will be found by itself. And if it's hard to name a class, there's probably something wrong with it.
Think of packages roughly as folders where you store files. It is unlikely that you dump books and movies in one directory. But rather, you have a Cinema directory, and in it subdirectories: Science Fiction, Detectives, Horrors, etc.

S
Sergey Gornostaev, 2018-10-24
@sergey-gornostaev

The class name must be a noun that accurately and clearly conveys its purpose, and the package name must clearly convey the purpose of the domain and relationships with other packages in the hierarchy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question