Y
Y
Yura Komarov2019-11-13 10:59:38
Building projects
Yura Komarov, 2019-11-13 10:59:38

How to convince the back end that the front is done correctly?

Hello.
We are developing a project.
As a front-end developer, I made a bem project all by components, each component has its own jade css and js file. Everything is going to the back end zone. Well, that is, I have the collected js file connected, both in the index.php file, for back development, and in index.html for layout.
Layout component, as already mentioned. And the js file is collected by webpack and there are a bunch of plugins inside and all the js components are collected in one file. I tell the backender let's write ajax requests in the assembler too (where the layout is), it's convenient, we have everything by components and a js file for each component. And he says that the whole thing needs to be torn apart, because how will he make his components for Bitrix.
I don’t understand what is the difference between making ajax requests in development where the layout is or doing them in separate files where the php components are located. The js file will easily access the server. going to the server zone.
Then he says that I will remove the layout from the project. And I say why, if you need to fix something in the layout, then I quickly corrected both js and css and the files will automatically be connected to the project. they are going there. Well, yes, you will have to transfer the layout to the php file, so this is a very small problem.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2019-11-13
@firedragon

Why they don't like PHP so much for "noodles" In theory, you should not know anything except contracts, and the backender itself is the same. Only data should go between you.
By the way, many people recommend first describing the contract, you use it at the front and don’t know what’s going on there at all. As one option, these are ordinary Json files located in folders.
/api/users/index.json
/api/users/1/index.json
And so on, after the backender does everything and checks, it will be enough for you to run the build with a new ENV file, where the back addresses are specified, and not test stubs

A
Alexander, 2019-11-13
Madzhugin @Suntechnic

No way.
If the backender has to do js and css, then it will rest with its hands and feet and demand source codes from you and cling all the files separately. He generally has no reason to poke around in your compiled css and js.
It’s a completely different matter if the backender doesn’t touch the layout and js at all, but then you should have agreements on exchange formats and a general idea of ​​​​how the project will work.
So there is only one option to leave everything as it is - you agree on interfaces and then he does the back, and does not touch the front at all, and you do the front, including interaction with the back.
If you want to push writing js for ajax onto him, he simply can't cope without access to the source code and seeing only the collected data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question