<?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"
	>
<channel>
	<title>Comments on: XPO-related changes that are needed to make the ORM+IoC samples work.</title>
	<atom:link href="http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/feed/" rel="self" type="application/rss+xml" />
	<link>http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/</link>
	<description>Moving towards the efficient development of smart software solutions in C# .NET</description>
	<pubDate>Mon, 08 Sep 2008 07:31:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Roman Eremin</title>
		<link>http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-439</link>
		<dc:creator>Roman Eremin</dc:creator>
		<pubDate>Tue, 11 Mar 2008 14:01:03 +0000</pubDate>
		<guid isPermaLink="false">http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-439</guid>
		<description>Rinat,

I was joking, don't worry - we are open for constructive critic and we are listening.

Roman</description>
		<content:encoded><![CDATA[<p>Rinat,</p>
<p>I was joking, don&#8217;t worry - we are open for constructive critic and we are listening.</p>
<p>Roman</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rinat Abdullin</title>
		<link>http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-438</link>
		<dc:creator>Rinat Abdullin</dc:creator>
		<pubDate>Tue, 11 Mar 2008 13:12:26 +0000</pubDate>
		<guid isPermaLink="false">http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-438</guid>
		<description>Roman,

Thank you for dropping a line here.

BTW, I apologize for pushing hard on the XAF team. 
I'm trying to restrain myself now))

Best regards,
Rinat</description>
		<content:encoded><![CDATA[<p>Roman,</p>
<p>Thank you for dropping a line here.</p>
<p>BTW, I apologize for pushing hard on the XAF team.<br />
I&#8217;m trying to restrain myself now))</p>
<p>Best regards,<br />
Rinat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rinat Abdullin</title>
		<link>http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-437</link>
		<dc:creator>Rinat Abdullin</dc:creator>
		<pubDate>Tue, 11 Mar 2008 13:09:13 +0000</pubDate>
		<guid isPermaLink="false">http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-437</guid>
		<description>Nick,

1. Thank you for suggestion, but do not worry about this. I'm not using this approach anywhere close to production yet (may be there will be something more flexible and simple). Besides, adding tiny method to the ReflectionDictionary was not hard at all.

If you want to implement this in the XPO sources, then you could simply add some "void RegisterAs{T,I}() where T:I" method, that would ask for the XPClassInfo for T and reregister it as I.

However, it would be nice, if the XPO team could remove self-locks from the Session code. It hurts to see these booby traps around.

2. If you check out the ORM+IoC series, then you would notice that I'm creating objects outside the XPO (even if they are requested by the ObjectLoader) just to have these instances injected with the dependencies by IoC (Session happens to get in there same way as well)

Best regards,
Rinat</description>
		<content:encoded><![CDATA[<p>Nick,</p>
<p>1. Thank you for suggestion, but do not worry about this. I&#8217;m not using this approach anywhere close to production yet (may be there will be something more flexible and simple). Besides, adding tiny method to the ReflectionDictionary was not hard at all.</p>
<p>If you want to implement this in the XPO sources, then you could simply add some &#8220;void RegisterAs{T,I}() where T:I&#8221; method, that would ask for the XPClassInfo for T and reregister it as I.</p>
<p>However, it would be nice, if the XPO team could remove self-locks from the Session code. It hurts to see these booby traps around.</p>
<p>2. If you check out the ORM+IoC series, then you would notice that I&#8217;m creating objects outside the XPO (even if they are requested by the ObjectLoader) just to have these instances injected with the dependencies by IoC (Session happens to get in there same way as well)</p>
<p>Best regards,<br />
Rinat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-436</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 11 Mar 2008 12:45:14 +0000</pubDate>
		<guid isPermaLink="false">http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-436</guid>
		<description>Rinat,

You can create a custom dictionary class and override its XPDictionary.CanGetClassInfoByType virtual method to return a persistent class info for a given interface type. In addition, your base persistent object class must provide a constructor with the Session and XPClassInfo parameters, so that XPO can create an instance of it.

If my suggestion doesn't work for you, please submit your sample project to our Support Center. We'll look for a solution.</description>
		<content:encoded><![CDATA[<p>Rinat,</p>
<p>You can create a custom dictionary class and override its XPDictionary.CanGetClassInfoByType virtual method to return a persistent class info for a given interface type. In addition, your base persistent object class must provide a constructor with the Session and XPClassInfo parameters, so that XPO can create an instance of it.</p>
<p>If my suggestion doesn&#8217;t work for you, please submit your sample project to our Support Center. We&#8217;ll look for a solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roman Eremin</title>
		<link>http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-434</link>
		<dc:creator>Roman Eremin</dc:creator>
		<pubDate>Tue, 11 Mar 2008 12:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-434</guid>
		<description>Oops, did not read the comment above :-)</description>
		<content:encoded><![CDATA[<p>Oops, did not read the comment above :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roman Eremin</title>
		<link>http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-433</link>
		<dc:creator>Roman Eremin</dc:creator>
		<pubDate>Tue, 11 Mar 2008 12:16:34 +0000</pubDate>
		<guid isPermaLink="false">http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-433</guid>
		<description>XPO developers told me to recommend to look at:

XPDictionary.CanGetClassInfoByType
XPDictionary.QueryClassInfo
XPClassInfo.CreateObjectInstance

I did not check myself - just a note.</description>
		<content:encoded><![CDATA[<p>XPO developers told me to recommend to look at:</p>
<p>XPDictionary.CanGetClassInfoByType<br />
XPDictionary.QueryClassInfo<br />
XPClassInfo.CreateObjectInstance</p>
<p>I did not check myself - just a note.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rinat Abdullin</title>
		<link>http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-432</link>
		<dc:creator>Rinat Abdullin</dc:creator>
		<pubDate>Tue, 11 Mar 2008 11:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-432</guid>
		<description>Nick, 

Thank you for the comment. Yes, I've seen them all.

But, as you can see from this ORM+IOC series, queries ask the XPO (via IoC) not for the specific BO (i.e. Account), but for the IAccount interface behind it, since we are completely decoupling from the implementation. 

I could not find any simple solution to make the dictionary recognize the Account when it is being asked for IAccount, so I had to register the ClassInfo manually one more time with the interface.

Did I miss something?

Best regards,
Rinat</description>
		<content:encoded><![CDATA[<p>Nick, </p>
<p>Thank you for the comment. Yes, I&#8217;ve seen them all.</p>
<p>But, as you can see from this ORM+IOC series, queries ask the XPO (via IoC) not for the specific BO (i.e. Account), but for the IAccount interface behind it, since we are completely decoupling from the implementation. </p>
<p>I could not find any simple solution to make the dictionary recognize the Account when it is being asked for IAccount, so I had to register the ClassInfo manually one more time with the interface.</p>
<p>Did I miss something?</p>
<p>Best regards,<br />
Rinat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-431</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 11 Mar 2008 11:32:31 +0000</pubDate>
		<guid isPermaLink="false">http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-431</guid>
		<description>Hi Rinat,

There is no need to change XPO source, because XPO already provides methods to help you with your task. Below is the list of classes and their members, at which we advise you to take look.

XPDictionary.QueryClassInfo

ReflectionDictionary.ResolveClassInfoByName
ReflectionDictionary.ResolveClassInfoByType

XPDictionary.CanGetClassInfoByType
XPClassInfo.CreateObjectInstance

XPBaseObject..ctor(Session, XPClassInfo)

Thank you,
Nick
Developer Express Support</description>
		<content:encoded><![CDATA[<p>Hi Rinat,</p>
<p>There is no need to change XPO source, because XPO already provides methods to help you with your task. Below is the list of classes and their members, at which we advise you to take look.</p>
<p>XPDictionary.QueryClassInfo</p>
<p>ReflectionDictionary.ResolveClassInfoByName<br />
ReflectionDictionary.ResolveClassInfoByType</p>
<p>XPDictionary.CanGetClassInfoByType<br />
XPClassInfo.CreateObjectInstance</p>
<p>XPBaseObject..ctor(Session, XPClassInfo)</p>
<p>Thank you,<br />
Nick<br />
Developer Express Support</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to implement unit-testable abstraction and reusable domain models with IoC + ORM? at Rinat Abdullin</title>
		<link>http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-422</link>
		<dc:creator>How to implement unit-testable abstraction and reusable domain models with IoC + ORM? at Rinat Abdullin</dc:creator>
		<pubDate>Sun, 09 Mar 2008 10:45:48 +0000</pubDate>
		<guid isPermaLink="false">http://rabdullin.com/xpo-related-changes-that-are-needed-to-make-the-ormioc-samples-work/#comment-422</guid>
		<description>[...]          &#171; You can build a house with big LEGO blocks. Can you add a nice porch? XPO-related changes that are needed to make the ORM+IoC samples work. [...]</description>
		<content:encoded><![CDATA[<p>[...]          &laquo; You can build a house with big LEGO blocks. Can you add a nice porch? XPO-related changes that are needed to make the ORM+IoC samples work. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
