<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Design Patterns in PL/SQL &#8211; Interface Injection for even looser coupling</title>
	<atom:link href="http://technology.amis.nl/2006/03/11/design-patterns-in-plsql-interface-injection-for-even-looser-coupling/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.amis.nl/2006/03/11/design-patterns-in-plsql-interface-injection-for-even-looser-coupling/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=design-patterns-in-plsql-interface-injection-for-even-looser-coupling</link>
	<description></description>
	<lastBuildDate>Fri, 12 Apr 2013 10:04:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: JulesLt</title>
		<link>http://technology.amis.nl/2006/03/11/design-patterns-in-plsql-interface-injection-for-even-looser-coupling/#comment-2971</link>
		<dc:creator>JulesLt</dc:creator>
		<pubDate>Mon, 16 Nov 2009 23:45:15 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1090#comment-2971</guid>
		<description><![CDATA[A further thought - rather than usiing the package initialise method, it could all be in the dependency_injector - i.e. you pass in the name of the called package, and it instantiates and sets it up.

By the way, your Spam protection doesn&#039;t seem to like Safari.]]></description>
		<content:encoded><![CDATA[<p>A further thought &#8211; rather than usiing the package initialise method, it could all be in the dependency_injector &#8211; i.e. you pass in the name of the called package, and it instantiates and sets it up.</p>
<p>By the way, your Spam protection doesn&#8217;t seem to like Safari.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JulesLt</title>
		<link>http://technology.amis.nl/2006/03/11/design-patterns-in-plsql-interface-injection-for-even-looser-coupling/#comment-2970</link>
		<dc:creator>JulesLt</dc:creator>
		<pubDate>Mon, 16 Nov 2009 23:41:47 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1090#comment-2970</guid>
		<description><![CDATA[It wouldn&#039;t be too hard to create something that validates the signature of the passed in procedure against the package metadata - I do something similar in my code generation framework - checking if an object type has certain optional methods (like debug / log) before generating a call.

What I am wondering is if you could do something better, and potentially faster, with objects - i.e rather than passing in the name of the called package, pass in an abstract Logger object - other implementations would then be implemented as subclasses to the Logger (which could be simple wrappers to code in standard packages).

hrm_salary_rules.set_logger(pLogger =&gt; LoggerFactory(&#039;log4pl&#039;) );

Then the interface could be enforced by the class / object - any new implementations would need an adapter object writing.

Alternatively, rather than having a Logger class, you could have a more general Object class, and set_logger could inspect the object methods - there&#039;s always a higher cost to runtime introspection, but there are obviously places where it has it&#039;s benefits - although I can&#039;t quite see them here (mainly as objects don&#039;t play well with dynamic pl/sql in 9).

You could then combine this with other patterns, to create some kind of bean generator.

i.e. package initialise calls dependency_injector.inject_dependencies
dependency_injector reads configuration for the called package for things like observers, logger, emailer, and other services, to be injected into the package, via standard setters
dependency_injector uses dynamic pl/sql to set the relevant values from configuration where the setters exist

(I will admit that I&#039;m struggling to think of an occasion when I&#039;d need that much loose coupling, but I guess the point is less around giving ME the flexibility to change my logger, than giving someone else the chance to use their logger with my code)]]></description>
		<content:encoded><![CDATA[<p>It wouldn&#8217;t be too hard to create something that validates the signature of the passed in procedure against the package metadata &#8211; I do something similar in my code generation framework &#8211; checking if an object type has certain optional methods (like debug / log) before generating a call.</p>
<p>What I am wondering is if you could do something better, and potentially faster, with objects &#8211; i.e rather than passing in the name of the called package, pass in an abstract Logger object &#8211; other implementations would then be implemented as subclasses to the Logger (which could be simple wrappers to code in standard packages).</p>
<p>hrm_salary_rules.set_logger(pLogger =&gt; LoggerFactory(&#8216;log4pl&#8217;) );</p>
<p>Then the interface could be enforced by the class / object &#8211; any new implementations would need an adapter object writing.</p>
<p>Alternatively, rather than having a Logger class, you could have a more general Object class, and set_logger could inspect the object methods &#8211; there&#8217;s always a higher cost to runtime introspection, but there are obviously places where it has it&#8217;s benefits &#8211; although I can&#8217;t quite see them here (mainly as objects don&#8217;t play well with dynamic pl/sql in 9).</p>
<p>You could then combine this with other patterns, to create some kind of bean generator.</p>
<p>i.e. package initialise calls dependency_injector.inject_dependencies<br />
dependency_injector reads configuration for the called package for things like observers, logger, emailer, and other services, to be injected into the package, via standard setters<br />
dependency_injector uses dynamic pl/sql to set the relevant values from configuration where the setters exist</p>
<p>(I will admit that I&#8217;m struggling to think of an occasion when I&#8217;d need that much loose coupling, but I guess the point is less around giving ME the flexibility to change my logger, than giving someone else the chance to use their logger with my code)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin DeWind</title>
		<link>http://technology.amis.nl/2006/03/11/design-patterns-in-plsql-interface-injection-for-even-looser-coupling/#comment-2969</link>
		<dc:creator>Justin DeWind</dc:creator>
		<pubDate>Wed, 13 May 2009 19:31:13 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1090#comment-2969</guid>
		<description><![CDATA[This is innovative and deserves more popularity than it is receiving. If done properly, the loose coupling between interfaces would allow a developer to easily use mock objects and provide a nice level of interaction based testing.]]></description>
		<content:encoded><![CDATA[<p>This is innovative and deserves more popularity than it is receiving. If done properly, the loose coupling between interfaces would allow a developer to easily use mock objects and provide a nice level of interaction based testing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: APC</title>
		<link>http://technology.amis.nl/2006/03/11/design-patterns-in-plsql-interface-injection-for-even-looser-coupling/#comment-2968</link>
		<dc:creator>APC</dc:creator>
		<pubDate>Mon, 13 Mar 2006 16:33:29 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1090#comment-2968</guid>
		<description><![CDATA[The url for the InterfaceInjection.zip hurls a 404 error.

Cheers, APC]]></description>
		<content:encoded><![CDATA[<p>The url for the InterfaceInjection.zip hurls a 404 error.</p>
<p>Cheers, APC</p>
]]></content:encoded>
	</item>
</channel>
</rss>
