Read | Practice | Advance
Dependency Injection ensures that high level object is independent of low level object. In conventional programming modules dependency relationships are imagined as high level objects directly related to low level objects. But the dependency injection pattern inverse the conventional dependency as if high level objects is independent of low level objects. This type of inversion is called IOC (Inversion of Control) that is dependency inversion principle. High level object should depend on low level object through an Interface that is Interface is acting here as a gateway of object dependencies between high level object and low level object. Both the high level and low level object should depend on the Interface but the Interface depends on none but abstractions.
Often Linux shell script file is needed for Linux administrator for their regular jobs. Those shell scripts may contain few lines of statement. In that case, you can ignore many standards, useful tips. But we may need to write shell script for part of application process like data-warehouse ETL process. In that case our shell script may contain several lines of statement with many functionalities. In that case we have to think about code