javascript - How to maintain the front-end template of php project?
PHP中文网
PHP中文网 2017-05-16 13:05:22
0
4
402

I am a front-end person. I usually write static files first, and then apply templates and jointly debug them with PHP
But here comes the problem. Static files with background templates cannot be previewed locally at all, and I cannot control my own version. I made a few random changes to the back end, and wrote inline styles. I don’t know where I changed this part of the js?
Now I have changed it directly on the ftp under test. I feel that this method is very painful!! Now I don’t want to change it anymore

PHP中文网
PHP中文网

认证0级讲师

reply all(4)
小葫芦

That means the division of labor is not clear. You let the backend only be responsible for writing functions and rendering templates, and you do the display yourself. You separate the js code, and you can set up git/svn! In this way, you can have version control. Yes! ! ! I think the most suitable thing is to separate the front and rear ends! This will save you the trouble! You can preview it locally at any time! As long as the background is uploaded to the server at any time, it will be fine!

给我你的怀抱

Of course, we need to clarify the division of labor and responsibilities. Otherwise, if things change in the future, who will take the blame? Here we also write static pages on the front end, PHP pages, but the front end and back end are agreed, html, css, js are all The front-end is modified, css, js are uploaded to ftp, and then I say hello to php and ask him to change the version number. After the dom structure of html is changed, I tell my php colleagues

给我你的怀抱

Find an IDE that can upload ftp in real time, such as webstorm, or sublime+ plug-in, and automatically upload ftp after modifying and saving. In this way, you can see your modified content online in real time.

小葫芦

Let’s talk about the division of labor between the front and back ends of our unit. Cutting pictures is responsible for producing static pages, and then the backend is responsible for page nesting. As long as there is no problem with cutting the image, problems nested in the backend are basically the backend responsible for modification (we all know js, css, html). Unless there is an unsolvable style problem or js plug-in problem, the problem will be solved by cutting the image.

The front-end template of our unit is maintained by the back-end. That’s it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template