Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the user-registration domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/functions.php on line 6121 Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hashone domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/functions.php on line 6121 Warning: Cannot modify header information - headers already sent by (output started at /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/functions.php:6121) in /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1896 Warning: Cannot modify header information - headers already sent by (output started at /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/functions.php:6121) in /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1896 Warning: Cannot modify header information - headers already sent by (output started at /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/functions.php:6121) in /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1896 Warning: Cannot modify header information - headers already sent by (output started at /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/functions.php:6121) in /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1896 Warning: Cannot modify header information - headers already sent by (output started at /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/functions.php:6121) in /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1896 Warning: Cannot modify header information - headers already sent by (output started at /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/functions.php:6121) in /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1896 Warning: Cannot modify header information - headers already sent by (output started at /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/functions.php:6121) in /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1896 Warning: Cannot modify header information - headers already sent by (output started at /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/functions.php:6121) in /customers/c/c/d/ccloudonline.nl/httpd.www/wp-includes/rest-api/class-wp-rest-server.php on line 1896 {"id":2280,"date":"2020-01-11T17:22:06","date_gmt":"2020-01-11T17:22:06","guid":{"rendered":"http:\/\/ccloudonline.nl\/?p=2280"},"modified":"2020-01-12T13:37:14","modified_gmt":"2020-01-12T13:37:14","slug":"dependency-injection","status":"publish","type":"post","link":"http:\/\/ccloudonline.nl\/?p=2280","title":{"rendered":"Dependency Injection"},"content":{"rendered":"\n

D<\/span>ependency Injection<\/h3>\n

If you search for Dependency Injection<\/em> you will find out that it has been around for quite some time. It is basically a technique on software development that allow us to remove any explicit dependencies as part of an apex transaction. 
In simple words we can say that this technique allows to “feed” our code with a particular class\/es “dynamically”.  I like to see it as some kind of “cross road” in which either way can be taken based on a particular logic. 

We can control the “dynamic” part with Custom Settings<\/em> or Custom Metadata<\/em>. This is an important piece of our puzzle because it is the one telling our code where it needs to go next.
Which “road” to take from the “cross road”… 

Scenario<\/strong><\/p>\n

We are going to take a business case and implement Dependency Injection <\/em>techniques to see how we can use it with Apex. This business case is just a way to illustrate the basic principles. <\/p>\n\n\n\n
\n