M
M
Michael2016-05-18 20:25:01
Yii
Michael, 2016-05-18 20:25:01

How to combine backend + frontend correctly?

Good afternoon!
I have one private and one general question, maybe it's a bit strange, but like this)
There is a project on yii2 + angular 1. The place of action is the entity in the admin panel. Everything is as usual - there is data, there is CRUD. But then a handler was added to C&U, which changed the data on the frontend, which then got into the database with the form. Later it turned out that you need to add another handler, similar to the first one (changes data on the frontend), but which uses the result of the first one on the server, and not in the most optimal way. The result is porridge.
As I understand it, the best option is to completely switch to using the API? Because it's hard to beautifully connect frontend and backend. And on the backend, you have to partially repeat the code from the frontend.
And, what is most unpleasant, there are many such situations due to the complexity of the projects. Maybe lack of knowledge, maybe experience. I would like to ask for advice. Are there any books that describe examples of building architectures or best practices with examples in projects?
I hope I was able to clearly explain the problem :)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question