P
P
paurlift2017-01-29 20:12:55
Yii
paurlift, 2017-01-29 20:12:55

Repositories in Yii2?

I know that in Yii2 AR is repositroy+entity.
I want to split and not use AR at all. Repository must be able to return a filled entity and save it, i.e. need some kind of mapper.
I see two ways out:
1) Write bicycles with my own Mapper's
2) Take Doctrine
There are a number of questions:
1) Is there a good solution for Yii2? (Saving aggregates and models from several tables in the database, getting a filled entity from the database)
2) How convenient is it to use Doctrine in conjunction with Yii2, does anyone have practical experience in using such a bundle? What inconveniences may arise? (There is no Foreign key in the project)
PS Don't offer Symfony :)

Answer the question

In order to leave comments, you need to log in

6 answer(s)
M
Maxim Fedorov, 2017-01-30
@qonand

1) Is there a good solution for Yii2? (Saving aggregates and models from several tables in the database, getting a completed entity from the database)

There are not so many extensions for such tasks, for example, you can look at this extension (I can’t judge the quality, I haven’t used it)
2) How convenient is it to use Doctrine in conjunction with Yii2, does anyone have practical experience in using such a bundle? What inconveniences may arise? (There is no foreign key in the project
)
In my opinion this is the best option. You can read more about how to work with doctrine under yii on Habré

E
EverOne, 2017-08-22
@EverOne

All that's left is to study LAMP (at least for understanding), maybe a couple of frameworks (according to your mood, the main thing is not to get carried away), then realize that PHP is not a cake (here for beauty, not for holivar: PHP, in fact , cake yet, but this is our secret with you) and start digging towards JS/Python/Golang and others... Assume JS: Learn (read or guess) about the existence of NodeJS. Try to write something in plain language, spit and find out (read or guess again, but suddenly!) About the existence of express. Continue in the same spirit.
I almost forgot - everything that you so proudly "studied" (we will not specify the quality and volume of what you studied) is a maximum (!) One tenth (1/10) of the front-end. I don't want to disappoint you, but there is also a back-end. I'm talking about management in general.
At this time, the front-ender - look at jQuery, start doing everything on it - effects there, goodies, carousels, then spit and understand that this is the last century. Come to the conclusion that you need to look for something else. Stumble upon Angular/Vue or React/Backbone etc. (Yes, it doesn't matter). Try to end your life.
I almost forgot, Bootstrap! You will be delighted!
Somewhere in the middle of these processes, you should meet with the whole team, drink and spit on it all.

S
sergey, 2017-08-22
@zorro76

Already studied: HTML, CSS, JS, where and how to buy a domain;
Are you serious???

E
Egor Zhivagin, 2017-08-23
@Krasnodar_etc

js. Because I'm sure you haven't studied it. For the backend, you can take Node.js (since you have some knowledge in JS) + learn how to write database queries (SQL or NoSQL - optional). Make, in fact, the base.
Read about sockets.
I don’t advise you about security, because, to be honest, your project is unlikely to come to this) To the
rest of the respondents: I understand the indignation, but the guys just decided to file a project. Take it easy.)

N
Nikita, 2017-08-23
@AgentProvocateur

Look, in short - here is the social engine. networks . Here are the sources .
Play for health =^_^=

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question