Here is one popular piece of information in which you can spend tons of resources using init () instead of preDispatch (): if you perform access control using the preDispatch () method of the controller plugin, then the sequence of calls will be: YourController :: init (), YourAccessPlugin :: preDispatch (), YourController :: preDispatch (), YourController :: whateverAction. This means that if you do the hard work in init (), then unauthorized users can initiate it . Say, for example, you are launching a new session namespace in init (), then pointless search bots can cause your session database to be cluttered with empty sessions. Therefore, stick to simple simple things in init, avoid touching or modifying any resources, and avoid accessing the database.
source share