Answer the question
In order to leave comments, you need to log in
How can the backender interact with the fronter?
First, I'm on win, fronter on mac.
Secondly, the fronter makes up something there, sends it to me, I remake it in html to display some data, lists, etc. And then I upload it to the test server for a preview of the result by managers.
But the fronter has to make changes (of course) and he sends me these html again and I again have to pick them and write the same code in them again.
What the hell to do?
Answer the question
In order to leave comments, you need to log in
1. Git https://git-scm.com/
2. If possible, do not separate layout and project. For example, I am involved in a Django project. I can do whatever I want with the templates folder, where all the site templates are located, and with the frontend folder, where the frontend sources are. I didn’t have any problems mastering the Django template engine, in which case I contact the backender with a question. Each project is launched locally using Vagrant + there is a test server.
He creates new pages empty, I fill them with static layout, he attaches the output of real data there, then we edit these templates depending on the task - something I, something him.
If you have Bitrix - I sympathize :(
Get started with the API.
No matter what anyone says, but integrating layout into backend logic is idiocy, which used to be the only solution, but now no one is forcing you to do it.
First, I'm on win, fronter on mac
Secondly, the fronter makes up something there, sends it to me, I remake it in html to display some data, lists, etc. And then I upload it to the test server for a preview of the result by managers.
But the fronter has to make changes (of course) and he sends me these html again and I again have to pick them and write the same code in them again.
(I'm sorry, but...)
A backender that renders HTML is a BAD backender!
1. Storage architecture - it is he who does it. And it must be done in such a way that the front-ender can template the necessary HTML blocks and immediately upload them to the server without interacting with the back-ender: the front-ender registers (in layout + JS) all downloads in the form of tags or via the REST API interface (in JS) and receives all the data available (implemented) at the moment.
2. Directories for statics (html/js/css) and dynamics (server-side scripts: PHP, etc.) - each backender and frontener see their own with shared access.
3. All development (file modification) - strictly through GIT.
For such situations, template engines are provided
. Naturally, the front-ender must know the template engine that is used in the project and on which it works, and at the same time, there should not be any code in the template.
the backender generates an empty page and specifies which objects are passed to it,
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question