Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis on the solution of Bug for web Front-end and back-end separate Development

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "web front-end separation development Bug solution analysis", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "web front-end separation development Bug solution thinking analysis"!

Video is different from text.

There is a big difference between learning by watching videos and reading books / blogs. Books and blogs are static things that have been written for a long time or the author is negligent. The text may be incomplete (for example, the author may accidentally leave out a small detail). When you can't make a difference, you have a lot to consider.

But the video is different, the code is typed out by the author line by line (here we do not discuss the kind of writing code in advance, the video is told according to the code, this kind of video is usually thrown away when I get it), you can see all the operations, according to writing, you can see the corresponding results, which is relatively easy to learn, which is why it is much easier for a new contact. I suggest that my friends learn by watching videos.

However, even if this form of hand-in-hand, due to the negligence of friends, do not look carefully, after reading, it may not be effective, it is much easier to find the cause of the problem at this time. Because the author has done the effect in the video, we can see this clearly, at least one thing can prove that there is nothing wrong with the code in the video, the problem is that there may be something wrong with our own code.

So, all you have to do is find a place where your code is different from the video code.

Since we are writing Java code, the biggest advantage of Java is cross-platform, so generally speaking, as long as your JDK version is consistent with the Tomcat version (other versions such as MyBatis version, Spring Boot version, Spring Cloud version, etc.) and the video author, when the code is more than 99.99%, it is either an environmental problem or a code error, do not throw the pot to the system environment, usually throw a good pot in the company If you use it in your study, you will lose yourself. So first of all, you have to believe that you have made a mistake before you can solve the problem.

Why should I bring this topic up? Because many friends have a mantra: "I am the same as the code in the video, but it can't be displayed." , "the code was good just now, but it won't run when I come back after a meal." no, no, no. no, no, no.

Every time I see this, I am speechless. This sentence has two meanings, either my code is the same as the video, that is, my code is right, and since the code is right, I think the problem can be over here, and the code is right, then there is no problem; or another meaning is that there is something wrong with the video code, but the code in the video can work, which you have seen with your own eyes, so the video code must be fine. Then the problem will fall into an endless cycle and there is no solution.

Therefore, if there is a problem, it is confirmed that it is not a version problem, then basically there is a problem with your own code, and it is only possible to solve the problem if you believe that there is something wrong with your code.

Brother Song used to encounter these problems when watching videos, and sometimes I can't find them, so I will run through the Demo provided by the video author (if any). If his Demo works, then you don't have to think about it. It's definitely not an environmental problem, or your own code is wrong, so seriously check it.

Dichotomy

In the process of inspection, a method that I often use, I call it dichotomy.

Some friends always do not understand the significance of doing algorithm questions, just for the interview? In fact, no, some typical algorithmic ideas can affect many of our daily things, such as solving the Bug problem.

Here I will show you the use of this method through two simple chestnuts.

Micro personnel login

If you have a login problem and you can't log in successfully by clicking the front-end login button, there may be many reasons.

If this problem occurs in a micro-personnel project, our order of inspection is as follows:

Is there an error in the front-end WebStorm and back-end IDEA console? Is there an error in the front-end browser console? Is there anything wrong with the request sent by the browser and the response from the server?

If there are no clues in these three places, then it is time to start the analysis. Because of this kind of front-end and front-end separate development, the problem may be in the front end or in the back end, so we have to lock the problem first. How do I lock it? I drew a simple picture:

According to this line of thinking, we narrow the scope of the problem step by step until the problem is solved.

Garbled code problem

There is also a very typical scene of this dichotomy, that is, the problem of garbled codes. many beginners encounter garbled problems and try all the solutions they know about garbled. I believe that many beginners may encounter such embarrassing things because there are too many reasons for garbled codes. Only by finding the right reasons can we solve the problem.

The above two pictures are mainly to provide you with a way to solve the problem. We constantly split and refine a big problem, and then verify it one by one, and finally we can lock in where the problem lies. Once the cause of the problem is found, the solution is only a matter of minutes.

Thank you for your reading, the above is the content of "web front-end separation development Bug solution analysis". After the study of this article, I believe you have a deeper understanding of the problem of web front-end separation development Bug solution analysis, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report