Depen­dency in­jec­tion

OpenSource For You - - DEVELOPERS -

An­gu­larJS con­tains a built-in depen­dency in­jec­tion mech­a­nism. This is the key to mak­ing eas­ily re­us­able and testable com­po­nents. It is a soft­ware pat­tern that en­sures ref­er­ences to other com­po­nents are not cre­ated di­rectly for the com­po­nents. In­stead of di­rect in­stan­ti­a­tion, each com­po­nent will get ref­er­ences re­quired by other com­po­nents. So there is no need to find the de­pen­den­cies for com­po­nents, as de­pen­den­cies them­selves are con­fig­urable. The ap­pli­ca­tion will be di­vided into dif­fer­ent com­po­nents, which can be in­jected into each other. This makes your ap­pli­ca­tion eas­ily re­us­able, con­fig­urable and testable.

An­gu­larJS con­tains the fol­low­ing core types of ob­jects and com­po­nents: Value Fac­tory Service Provider Con­stant

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.