{"id":274,"date":"2018-11-19T13:43:20","date_gmt":"2018-11-19T13:43:20","guid":{"rendered":"http:\/\/fip.r-a-w.org\/?p=274"},"modified":"2018-11-19T13:43:20","modified_gmt":"2018-11-19T13:43:20","slug":"refactoring-dependency-inversion-principle-dip-applied-to-jobman","status":"publish","type":"post","link":"https:\/\/fip.r-a-w.org\/?p=274","title":{"rendered":"Refactoring &#8211; Dependency Inversion Principle (DIP) Applied To JobMan"},"content":{"rendered":"<p>Already in the previous posts I have moved the Database to an interface where JobDatabase interacts with abstract base classes of Job and SpawnableJob. Meaning that neither Databases are dependent of details of implementions of Job and SpawnableJob and conversely they are not dependent the JobDatabase class as this is declared through interfaces. So the resulting structure is now:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"277\" data-permalink=\"https:\/\/fip.r-a-w.org\/?attachment_id=277\" data-orig-file=\"https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?fit=2081%2C1019&amp;ssl=1\" data-orig-size=\"2081,1019\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"jobman19-11-18\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?fit=700%2C342&amp;ssl=1\" class=\"alignnone size-large wp-image-277\" src=\"https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?resize=700%2C342&#038;ssl=1\" alt=\"\" width=\"700\" height=\"342\" srcset=\"https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?resize=1024%2C501&amp;ssl=1 1024w, https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?resize=300%2C147&amp;ssl=1 300w, https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?resize=768%2C376&amp;ssl=1 768w, https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?resize=700%2C343&amp;ssl=1 700w, https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?resize=2000%2C979&amp;ssl=1 2000w, https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?resize=817%2C400&amp;ssl=1 817w, https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/jobman19-11-18.png?w=1400&amp;ssl=1 1400w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p>I also renamed the currently implemented JobDatabase to JobDataBaseDB4OEmbedded.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Already in the previous posts I have moved the Database to an interface where JobDatabase interacts with abstract base classes of Job and SpawnableJob. Meaning that neither Databases are dependent of details of implementions of Job and SpawnableJob and conversely they are not dependent the JobDatabase class as this is declared through interfaces. So the &hellip; <a href=\"https:\/\/fip.r-a-w.org\/?p=274\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Refactoring &#8211; Dependency Inversion Principle (DIP) Applied To JobMan<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":237,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-274","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/fip.r-a-w.org\/wp-content\/uploads\/2018\/11\/ANMC0003.jpg?fit=960%2C1200&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9NvWe-4q","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/posts\/274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=274"}],"version-history":[{"count":2,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/posts\/274\/revisions"}],"predecessor-version":[{"id":278,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/posts\/274\/revisions\/278"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/media\/237"}],"wp:attachment":[{"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}