I
I
ipokos2017-07-01 00:07:34
symfony
ipokos, 2017-07-01 00:07:34

How to properly design bundles and entities in Symfony?

Started learning Symfony. There is a question.
For example:
There are administrators
There are users (they have their own parameters, their own rights)
Users can add, say, "objects"
i.e. objects that users add - a separate entity
... more + - a couple of entities.
as a result, it turns out at least about 7+ - working tables, and even more.
How to properly organize the structure?
The goal is to make it native enough (not to collective farm anyhow, but let's say "Symfony way" =) ).
Easily expandable. Well, in general, adequate.
In what cases should I put it in separate bundles?
How long, without remorse, can you keep everything in one bundle?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
voronkovich, 2017-07-01
@ipokos

If you are going to use the code in other projects - take it out to bundles or libraries. Otherwise, put everything in an AppBundle.
BTW: Symfony 4 won't even have an AppBundle anymore, the code will be stored in the src/ directory.
You can see a working example here: https://github.com/EnMarche/en-marche.fr

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question