Web development back-end stepping on the pit

In web development, both front-end and back-end have encountered many pits, which are recorded here.

Stepping on the pit at the back end:

The languages ​​I have now come into contact with that can be used for background development include PHP, nodejs and Java, so the following are the pits encountered by these three languages.

1.nodejs asynchronous callback

Everyone knows that nodejs is highly concurrent, and encounters many pits when processing callbacks


For example, calling a piece of code must give it a callback function as a parameter


A statement of such a management callback should also be added to the function.

But writing the callback like this, once the executed statement has a multi-code structure, it will be ugly, so we can use some tools such as async that are convenient to deal with this situation.

···················The usage of async will be updated when there is time.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324525242&siteId=291194637