<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ananth&#039;s very own website &#187; Xoml</title>
	<atom:link href="http://ananthonline.net/category/blog/xoml/feed" rel="self" type="application/rss+xml" />
	<link>http://ananthonline.net</link>
	<description>Nemo vir est qui mundum non reddat meliorem</description>
	<lastBuildDate>Sun, 29 Jan 2012 05:04:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Markup extensions in Xoml</title>
		<link>http://ananthonline.net/2008/05/04/markup-extensions-in-xoml/</link>
		<comments>http://ananthonline.net/2008/05/04/markup-extensions-in-xoml/#comments</comments>
		<pubDate>Sun, 04 May 2008 17:06:49 +0000</pubDate>
		<dc:creator>ananth</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Xaml]]></category>
		<category><![CDATA[Xoml]]></category>

		<guid isPermaLink="false">http://blog.ananthonline.net/?p=19</guid>
		<description><![CDATA[ Tweet <p>One of the features I spent a lot of time thinking about, and implementing are: &#8220;deferred&#8221; ProvideValue calls on MarkupExtensions. In a XAML markup extension, ProvideValue is called when the tree is being loaded, and sometimes, it may be impossible to provide a value at that time. Also, since XAML makes use of [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fananthonline.net%2F2008%2F05%2F04%2Fmarkup-extensions-in-xoml%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://ananthonline.net/2008/05/04/markup-extensions-in-xoml/"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ananthonline.net/2008/05/04/markup-extensions-in-xoml/"  data-text="Markup extensions in Xoml" data-count="horizontal" data-via="ananthonline">Tweet</a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://ananthonline.net/2008/05/04/markup-extensions-in-xoml/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>One of the features I spent a lot of time thinking about, and implementing are: &#8220;deferred&#8221; ProvideValue calls on MarkupExtensions. In a XAML markup extension, ProvideValue is called when the tree is being loaded, and sometimes, it may be impossible to provide a value at that time. Also, since XAML makes use of internal classes like ResourceReferenceExpression (along with some other quirks like requiring derivation from FrameworkElement. More on this <a href="http://blog.ananthonline.net/?p=7" target="_blank">here</a>), it becomes quite a messy task resolving these references and values later.</p>
<p>In Xoml, however, every markup extension can tell XomlLoader to defer<em> </em>its ProvideValue call, by setting defer to true.</p>
<blockquote><p><span style="font-size: 8pt; color: blue; line-height: 115%; font-family: consolas">public</span><span style="font-size: 8pt; color: black; line-height: 115%; font-family: consolas"> </span><span style="font-size: 8pt; color: blue; line-height: 115%; font-family: consolas">abstract</span><span style="font-size: 8pt; color: black; line-height: 115%; font-family: consolas"> </span><span style="font-size: 8pt; color: blue; line-height: 115%; font-family: consolas">object</span><span style="font-size: 8pt; color: black; line-height: 115%; font-family: consolas"> ProvideValue(</span><span style="font-size: 8pt; color: blue; line-height: 115%; font-family: consolas">object</span><span style="font-size: 8pt; color: black; line-height: 115%; font-family: consolas"> context, </span><span style="font-size: 8pt; color: #2b91af; line-height: 115%; font-family: consolas">PropertyInfo</span><span style="font-size: 8pt; color: black; line-height: 115%; font-family: consolas"> property, </span><span style="font-size: 8pt; color: blue; line-height: 115%; font-family: consolas">out</span><span style="font-size: 8pt; color: black; line-height: 115%; font-family: consolas"> </span><span style="font-size: 8pt; color: blue; line-height: 115%; font-family: consolas">bool</span><span style="font-size: 8pt; color: black; line-height: 115%; font-family: consolas"> defer);</span></p></blockquote>
<p>Of course, at this point the markup extension is also expected to provide a default value, one that can be assigned to the context without errors. It is important to remember that the &#8220;context&#8221; can also be other markup extensions, in the case of a nested sub-expression.</p>
<p>After the entire object tree has been loaded, DeferredProvideValue</p>
<blockquote><p><span style="color: blue">public</span> <span style="color: blue">virtual</span> <span style="color: blue">object</span> DeferredProvideValue(<span style="color: blue">object</span> root, <span style="color: blue">object</span> context, <span style="color: #2b91af">PropertyInfo</span> property)</p></blockquote>
<p>is called once for each ProvideValue call that was deferred. Since the tree has been loaded now, the partially-initialized(?) root object is also passed in. XomlLoader then calls the OnAfterLoad method on each markup extension that was found.</p>
<blockquote>
<p style="background: white none repeat scroll 0% 50%; font-size: 8pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black; font-family: consolas">
<p style="margin: 0px"><span style="color: blue">protected</span> <span style="color: blue">internal</span> <span style="color: blue">virtual</span> <span style="color: blue">void</span> OnAfterLoad(<span style="color: #2b91af">AfterLoadEventArgs</span> e)</p>
</blockquote>
<p>This calling order is undefined, and extensions that have not been used in the currently loaded XOML are not called upon for OnAfterLoad processing. OnAfterLoad is called exactly once for each type of extension, its calling order is undefined. Like DeferredProvideValue, the root of the tree is provided to this method. The difference here, however is that OnAfterLoad can return a <em>different</em> object back to XomlLoader (through AfterLoadEventArgs), thus changing the whole tree! I&#8217;m not sure if this is an irresponsible thing to do, I thought it might help do radical things to the object tree and make it more extensible.</p>
<p>I would love to hear your thoughts on the features I&#8217;ve currently implemented, and future directions for development.</p>
]]></content:encoded>
			<wfw:commentRss>http://ananthonline.net/2008/05/04/markup-extensions-in-xoml/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>XOML on CodePlex</title>
		<link>http://ananthonline.net/2008/05/04/xoml-on-codeplex/</link>
		<comments>http://ananthonline.net/2008/05/04/xoml-on-codeplex/#comments</comments>
		<pubDate>Sun, 04 May 2008 17:04:50 +0000</pubDate>
		<dc:creator>ananth</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Xoml]]></category>

		<guid isPermaLink="false">http://blog.ananthonline.net/?p=18</guid>
		<description><![CDATA[ Tweet <p>I&#8217;ve had the XOML project registered on CodePlex since my last post, but it is now published. An early 0.1 pre-release version is also available. This version allows you to load hand-written Xoml, although XomlWriter isn&#8217;t far behind.</p> <p>To get stared with Xoml, the unit tests are probably the best place to start [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fananthonline.net%2F2008%2F05%2F04%2Fxoml-on-codeplex%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://ananthonline.net/2008/05/04/xoml-on-codeplex/"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ananthonline.net/2008/05/04/xoml-on-codeplex/"  data-text="XOML on CodePlex" data-count="horizontal" data-via="ananthonline">Tweet</a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://ananthonline.net/2008/05/04/xoml-on-codeplex/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>I&#8217;ve had the XOML project registered on CodePlex since my last post, but it is now <a href="http://codeplex.com/xoml" target="_blank">published</a>. An early <a href="http://www.codeplex.com/xoml/Release/ProjectReleases.aspx?ReleaseId=13027" target="_blank">0.1 pre-release</a> version is also available. This version allows you to load hand-written Xoml, although XomlWriter isn&#8217;t far behind.</p>
<p>To get stared with Xoml, the unit tests are probably the best place to start poking around. Feel free to contact me with comments and/or suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://ananthonline.net/2008/05/04/xoml-on-codeplex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XAML without WPF = XOML</title>
		<link>http://ananthonline.net/2008/04/13/xaml-without-wpf-xoml/</link>
		<comments>http://ananthonline.net/2008/04/13/xaml-without-wpf-xoml/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 22:58:16 +0000</pubDate>
		<dc:creator>ananth</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Xaml]]></category>
		<category><![CDATA[Xoml]]></category>

		<guid isPermaLink="false">http://blog.ananthonline.net/?p=16</guid>
		<description><![CDATA[ Tweet <p>For a long time, I&#8217;ve been writing about how messed up Xaml is because of WPF-interdependency, and how Microsoft should have decoupled the Xaml bits from WPF, etc (Some of these rants were on my old blog). Well, I finally decided to do something about it, and I&#8217;m writing a XAML-like library that [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fananthonline.net%2F2008%2F04%2F13%2Fxaml-without-wpf-xoml%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://ananthonline.net/2008/04/13/xaml-without-wpf-xoml/"></g:plusone>
			</div>
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ananthonline.net/2008/04/13/xaml-without-wpf-xoml/"  data-text="XAML without WPF = XOML" data-count="horizontal" data-via="ananthonline">Tweet</a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://ananthonline.net/2008/04/13/xaml-without-wpf-xoml/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>For a long time, I&#8217;ve been writing about how messed up Xaml is because of WPF-interdependency, and how Microsoft should have decoupled the Xaml bits from WPF, etc (Some of these rants were on my old blog). Well, I finally decided to <em>do</em> something about it, and I&#8217;m writing a XAML-like library that loads, and writes markup using its own XomlLoader and XomlWriter. At this point I&#8217;m calling the markup e<strong>X</strong>tensible <strong>O</strong>bject <strong>M</strong>arkup <strong>L</strong>anguage (I know that the Workflow Foundations&#8217; designer files have that extension&#8230;) because that&#8217;s what its meant to be. It is also aimed to run on the .NET Framework, Mono and the .NET CF. <img src='http://ananthonline.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Using Xoml, you will be able to data-bind, forward reference, resource reference, write markup-extensions and more. I will be putting this project up for download shortly, look out for more news on it.</p>
<p>PS: If there&#8217;s enough interest, it will have its own mini-site here!</p>
]]></content:encoded>
			<wfw:commentRss>http://ananthonline.net/2008/04/13/xaml-without-wpf-xoml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

