1. The concept of event, for example, in what scenarios will event be used?
2. Regarding the concept of monitoring, it is also unclear what application scenarios would be better to use monitoring.
3. The concept of DI (injection), is the service introduced when it is needed? How is it different from ordinary public functions?
擁有18年軟件開發(fā)和IT教學(xué)經(jīng)驗。曾任多家上市公司技術(shù)總監(jiān)、架構(gòu)師、項目經(jīng)理、高級軟件工程師等職務(wù)。 網(wǎng)絡(luò)人氣名人講師,...
event has many uses, such as processing user login completion (writing login log?), user payment completion processing (issuing payment notification?) and many more.
Listening is the opposite of an event. An event has a listener (that is, the operation performed after the event is triggered (fire)). The event mechanism can be used to decouple the code.
Dependency injection is a big concept. You can search to learn more about it. There are two general benefits:
(1). Decoupling
(2). Convenient for unit testing and mocking