6. Laravel5 study notes: Ioc/di's understanding

Source: Internet
Author: User
Introduction IOC
  • Controlling inversion inversion of control
  • Transfer of dependencies
  • Rely on abstraction rather than practice
DI
  • Dependency Injection Dependency Injection
  • You don't have to maintain object dependencies in your code.
  • The container automatically injects dependencies into the specified object according to the configuration
The significance of IOC and di for laravel

The foundation of the Laravel framework is a powerful control inversion container (IoC container). In order to really understand the framework, you need to master the container well. However, we need to understand that the control reversal container is just a tool for facilitating "dependency injection". But to implement dependency injection does not necessarily require controlling the reversal container, it is easier and easier to use the container.

Detailed Introduction

For the understanding of Ioc/di, I repeat here once also the role is not small, here recommended three articles, believe that after reading, there will be a great harvest.

  • What is the Laravel IOC container?
  • How PHP Programmers understand Ioc/di
  • From apprentice to artisan IOC

The first article mainly stands in the angle of Laravel, elaborated IOC, the second time article is standing in PHP angle. The last time the article was written by the Laravel author himself. Very valuable.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

6. Laravel5 study notes: Ioc/di's understanding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.