javascript - php项目的前端模板如何维护?
PHP中文网
PHP中文网 2017-05-16 13:05:22
0
4
357

我是前端,一般先写静态文件,然后套模板和php联调
但是问题来了,,套了后台模板的静态文件 本地根本无法预览,,而且我自己版本没法控制.后端瞎几把改,样式还写内联,js这一块那一块,我都不知道哪改了?
现在就是直接在测试的ftp改了,感觉这种方式很蛋疼!!现在改的我也不想动了

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!