Home  >  Article  >  Web Front-end  >  There is such a project, you think it can be handled this way_html/css_WEB-ITnose

There is such a project, you think it can be handled this way_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:25:07883browse

There are a bunch of things left over from the past, and the status is like this:
Write css, write js directly in the page, and write style in the html tag. There is already jquery1.6 in the page, and jquery1 is also quoted at the bottom. .4. The html naming is in the style of id=top1, class=right5. All in all it's a mess. But it works and there are no functional issues.

Now I am responsible for the front end, and there is another person responsible for the back end. It takes two of us to sort this pile of stuff into order. Besides rewriting, is there any other way? If rewritten, what process can minimize the workload.


Reply to the discussion (solution)

Let’s change it on top of him. It’s a lot of effort to rewrite. If it’s big,

Just make do if you can. Maybe the boss will do it when I overturned them all when I was in a bad mood. You were already busy at that time.

There is only one way to rewrite. I hope the author can avoid this job.

There are a bunch of things left by previous people. , the status is like this:
Write css and js directly in the page, and write style in the html tag. There is already jquery1.6 in the page, and jquery1.4 is also referenced at the bottom. The html naming is in the style of id=top1, class=right5. All in all it's a mess. But it works and there are no functional issues.

Now I am responsible for the front end, and there is another person responsible for the back end. It takes two of us to sort this pile of stuff into order. Besides rewriting, is there any other way? If rewritten, what process can minimize the workload.
If you need to reorganize, extract the content first
Extract the css js into separate files and slowly reconstruct them

Agree with the statement above
If you want to rewrite, extract the css js
If you are going to be exposed to this project for a long time in the future, in order to reduce your workload, you should rewrite it

Look at the value of the project itself. If it is valuable, you can rewrite it. Communicate well with the project management in advance and plan everything. List it for him to save you a lot of trouble; if not, just revise it. If you want to practice, it is good to rewrite; PS: This kind of code is the most annoying = =

If it is not like the php echo statement output, that is, it is basically an html template
OK Write a program to parse all the files, list the same and similar styles, and replace them with classes. Replacing multiple files is not difficult, right?
Use similar means to add id and some necessary attributes to the main components
With id and class, it will be much easier to do things later

If it is all background control output, then you can do it yourself Good luck

Rewrite it, the workload will be greater in the original project

It’s a good idea to extract it, at least the existing functions can be saved. After that, we can sort it out slowly

The leader said that there are people using this thing now, so it cannot be rewritten and can only be modified slowly. It's so painful. shopping-cart is written as shopping-card, you can't change it blindly. After the change, js, css, and backend may all go wrong

If the predecessors wrote well, I will write well. If the predecessors wrote shi, I will only add insult to injury.
Anyway, you can do as much work as you get for the salary~

?, I don’t understand? What can’t be repeated?, the functions are the same, if the ??? is not changed, it can’t be repeated??

No matter how consistent the appearance is, the track cannot be changed?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn