<?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>The Mailowl Scrolls &#187; Development</title>
	<atom:link href="http://mailowl.co.za/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://mailowl.co.za</link>
	<description>The most misguided blog since April 2004</description>
	<lastBuildDate>Thu, 02 Feb 2012 11:13:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Build object relationships with LINQ</title>
		<link>http://mailowl.co.za/2007/08/19/build-object-relationships-with-linq/</link>
		<comments>http://mailowl.co.za/2007/08/19/build-object-relationships-with-linq/#comments</comments>
		<pubDate>Sun, 19 Aug 2007 20:42:08 +0000</pubDate>
		<dc:creator>Andre Odendaal</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=156</guid>
		<description><![CDATA[If you need another reason to start liking LINQ it&#8217;s because it allows you to build relationships between your object collections.  I&#8217;m not talking about LINQ to SQL or LINQ to XML where the data source already has an underlying architecture for relationships; I&#8217;m talking about in-memory object collections (For example, in our offices we [...]]]></description>
			<content:encoded><![CDATA[<p><font size="4"><strong>If you need</strong></font> another reason to start liking LINQ it&#8217;s because it allows you to build relationships between your object collections.  I&#8217;m not talking about LINQ to SQL or LINQ to XML where the data source already has an underlying architecture for relationships; I&#8217;m talking about in-memory object collections (For example, in our offices we use powerful Unix-based business layer services so by the time the data reaches the .NET client it&#8217;s wrapped in simple object arrays and devoid of any meta data).</p>
<p>To see what I mean we have to start looking beyond the simple, one dimensional arrays that most demos have dealt with and start assuming we want to see aggregated data from a collection of list.  For this example I have a list of Customers and a list of Orders joining on a CustomerID and for my resultset I want to see a list of the names of all the customers and the sum of the amounts of their orders.  If I were to write this as a SQL statement it would look something like:</p>
<p><font size="2" face="Courier New">SELECT Customers.Name, SUM(Orders.Amount)<br />
FROM Customers<br />
LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID<br />
GROUP BY Customers.Name</font></p>
<p>Thanks to some <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=578686&amp;SiteID=1">guidance from Anders Hejlsberg</a> himself, we know:</p>
<blockquote><p><font color="#ff0000">&#8220;A grouping join produces a hierarchical result that pairs each element from the outer sequence with its corresponding sequence of elements from the inner sequence.&#8221;</font></p></blockquote>
<p>Which means if we join a list we can get a reference to another list of the same type that will be filtered on the join.  The important trick is to put the results into a new variable.</p>
<p><font size="2" face="Courier New">var query = from c in customers<br />
                join o in orders on c.CustomerID equals o.CustomerID into co<br />
                select new { c.Name, Total = co.Sum(o =&gt; o.Amount) };</font></p>
<p>Using the code snippet above; if you hover over <strong><em>co</em></strong> in Visual Studio it will tell you that it is a &#8220;(range variable) IEnumerable&lt;Order&gt;&#8221; which we can now use in the select projection.  This is the piece I was missing when I first started playing with aggregation because the aggregation functions need to take in an array and <strong><em>c</em></strong> and <strong><em>o</em></strong> are single instances.</p>
<p>Now for the interesting part, the optimization.  When you iterate over the first instance in the outer sequence (<strong>customers</strong>) the application will iterate over each instance in the inner sequence (<strong><em>orders</em></strong>). After that it won&#8217;t iterate over inner sequence again while you iterate over the outer sequence except that because I have an aggregate function in my projection the application will have to iterate over each item in the hierarchical result (<em><strong>co</strong></em>) to get the values out.  Remember that the hierarchical result will be smaller for each instance in the outer sequence (and can be null) because of the join predicate.</p>
<p>In conclusion we&#8217;ve seen how LINQ can help us look at various disparate sets of data and dynamically build relationships between them; and while there might still be valid questions about the size and complexity of the data you can parse through LINQ, the old adage of &#8220;garbage in, garbage out&#8221; still applies to how much you get out of using this compared to writing your own queries.</p>
]]></content:encoded>
			<wfw:commentRss>http://mailowl.co.za/2007/08/19/build-object-relationships-with-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails with SA Developer .NET</title>
		<link>http://mailowl.co.za/2007/08/10/ruby-on-rails-with-sa-developer-net/</link>
		<comments>http://mailowl.co.za/2007/08/10/ruby-on-rails-with-sa-developer-net/#comments</comments>
		<pubDate>Fri, 10 Aug 2007 09:18:13 +0000</pubDate>
		<dc:creator>Andre Odendaal</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=154</guid>
		<description><![CDATA[
If you&#8217;re in the Gauteng region and have been hearing about this framework called Ruby on Rails (maybe from Scott Hanselman&#8217;s podcast) but are not quite sure what it is; then come to the SA Developer .NET meeting on the 18th August at Torque IT in Rivonia where Armand Du Plessis will be taking us [...]]]></description>
			<content:encoded><![CDATA[<p><img align="left" src="http://www.mailowl.co.za/picture_library/rails.png" /></p>
<p>If you&#8217;re in the Gauteng region and have been hearing about this framework called <a href="http://www.rubyonrails.org/">Ruby on Rails</a> (maybe from <a href="http://www.hanselman.com/blog/HanselminutesPodcast65MartinFowlerAndDavidHeinemeierHansson.aspx">Scott Hanselman&#8217;s podcast</a>) but are not quite sure what it is; then come to the SA Developer .NET meeting on the 18th August at <a href="http://www.torque-it.com/">Torque IT</a> in Rivonia where <a href="http://dotnet.org.za/armand/archive/2007/07/13/hitting-the-rails.aspx">Armand Du Plessis</a> will be taking us through it. (Follow <a href="http://sadeveloper.net/forums/thread/6162.aspx">this link</a> to the SA Developer .NET forums to learn more about the event and to RSVP)</p>
<p><a href="http://dotnet.org.za/craign/">Craig Nicholson</a> was kind enough to organise some Ruby and Ruby on Rails videos to watch at the <a href="http://sadeveloper.net/forums/thread/6162.aspx">last TechReel session</a> and it spawned a heated debate about: trusting your application a third party framework, the benefits and performance considerations of dynamic languages and the differences in productivity and extensibility between convention and configuration.  I hope that this follows through into Armand&#8217;s talk next Wednesday as I could see the glint in some developers eyes as they saw the productivity benefits of switching to a solid and stable framework and code generator.</p>
]]></content:encoded>
			<wfw:commentRss>http://mailowl.co.za/2007/08/10/ruby-on-rails-with-sa-developer-net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LINQ Study Group postponed</title>
		<link>http://mailowl.co.za/2007/07/27/linq-study-group-postponed/</link>
		<comments>http://mailowl.co.za/2007/07/27/linq-study-group-postponed/#comments</comments>
		<pubDate>Fri, 27 Jul 2007 05:04:53 +0000</pubDate>
		<dc:creator>Andre Odendaal</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=150</guid>
		<description><![CDATA[
Unfortunately, life&#8217;s not perfect and I have to postpone the LINQ Study Group that was going to happen this weekend because both our sponsors, IT Intellect and Torque IT have booked out all their classrooms to paying customers and there&#8217;s no space for us.  Like a Jo&#8217;burger telling a Capetonian why they live there &#8220;It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><img align="left" src="http://www.mailowl.co.za/picture_library/crying.jpg" /></p>
<p><font size="4"><strong>Unfortunately, life&#8217;s not perfect</strong></font> and I have to postpone the <a href="http://mailowl.co.za/wordpress/?p=149">LINQ Study Group</a> that was going to happen this weekend because both our sponsors, <a href="http://www.itintellect.com/">IT Intellect</a> and <a href="http://www.torque-it.com/">Torque IT</a> have booked out all their classrooms to paying customers and there&#8217;s no space for us.  Like a Jo&#8217;burger telling a Capetonian why they live there &#8220;It&#8217;s all about the money&#8221; and these 2 sponsors provide SA Developer .NET with a free venue for our community events and activities.</p>
<p>I was really looking forward to this event and I&#8217;ll reschedule as soon as possible so that the hungry enthusiasts don&#8217;t lose their appetite.  My apologises to anyone who&#8217;s weekend plans have been messed around due to this cancellation.</p>
]]></content:encoded>
			<wfw:commentRss>http://mailowl.co.za/2007/07/27/linq-study-group-postponed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LINQ Study Group, Johannesburg</title>
		<link>http://mailowl.co.za/2007/07/20/linq-study-group-johannesburg/</link>
		<comments>http://mailowl.co.za/2007/07/20/linq-study-group-johannesburg/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 05:27:14 +0000</pubDate>
		<dc:creator>Andre Odendaal</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=149</guid>
		<description><![CDATA[I think LINQ is an amazing and mind altering enhancement coming out with the .NET Framework 3.5. It provides the ability to really manipulate objects; filtering them, sorting and mashing them up together to make new objects. I&#8217;m particularly interested in how you can get LINQ to access different datasources like SQL and XML and [...]]]></description>
			<content:encoded><![CDATA[<p><font size="4"><strong>I think <a href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx">LINQ</a></strong></font> is an amazing and mind altering enhancement coming out with the .NET Framework 3.5. It provides the ability to really manipulate objects; filtering them, sorting and mashing them up together to make new objects. I&#8217;m particularly interested in how you can get LINQ to access different datasources like SQL and XML and I want to know how you can extend this to retrieve data from other databases like Oracle and DB2 (which are the primary databases we use at BB&amp;D) and other sources like services.</p>
<p>The problem is, is that there&#8217;s just so much to play with; a single developer doesn&#8217;t have the time to play with it all. So I&#8217;ve setup a LINQ Study Group and rented out a classroom from one of <a href="http://sadeveloper.net/">SA Developer .NET</a>&#8217;s sponsors <a href="http://www.itintellect.com/">IT Intellect</a> and I&#8217;d like to invite everyone to come and play with LINQ with me. There&#8217;s no formal presentation or talk but I&#8217;ll be setting up some PCs with the Visual Studio Orcas beta (I&#8217;m still waiting for the latest beta to arrive by <a href="http://en.wikipedia.org/wiki/Sneakernet">sneakernet</a>) for people to work on and if you have laptop, I&#8217;ll be happy to give you the Orcas VPC.</p>
<p><strong>When:</strong> 28th July 2007 12:00 &#8211; 15:00<br />
<strong>Venue:</strong> IT Intellect, Bryanston (<a href="http://dotnet.org.za/photos/mailowl/images/50148/original.aspx">directions</a>)<br />
<strong>Objective:</strong> Learn about LINQ by playing with the technology with other enthusiasts and share your experiences and discoveries. There is no presentation or talk but we have setup half a dozen PCs with the Visual Studio Orcas Beta and invite everyone to come and learn along with us.<br />
<strong>RSVP:</strong> Please RSVP on the SA Developer .NET website (<a href="http://sadeveloper.net/forums/thread/6764.aspx">on this thread</a>) so I can get an idea of the number of people to setup for and, of course, catering. PCs will be available on a &#8220;first come, first served&#8221; basis and you are welcome to bring your laptop.</p>
]]></content:encoded>
			<wfw:commentRss>http://mailowl.co.za/2007/07/20/linq-study-group-johannesburg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Programming Python book</title>
		<link>http://mailowl.co.za/2007/06/14/programming-python-book/</link>
		<comments>http://mailowl.co.za/2007/06/14/programming-python-book/#comments</comments>
		<pubDate>Thu, 14 Jun 2007 06:17:56 +0000</pubDate>
		<dc:creator>Andre Odendaal</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=146</guid>
		<description><![CDATA[
I&#8217;m very excited as my book, Programming Python 3rd Edition, was delivered yesterday afternoon. Unfortunately my evening was dedicated to that night&#8217;s SA Developer .NET meeting and then to my next Silverlight talk preparations so I haven&#8217;t had time to sit in a comfy chair yet and start reading to start reading it in depth. [...]]]></description>
			<content:encoded><![CDATA[<p><img align="left" src="http://www.mailowl.co.za/picture_library/pythonbook.gif" /></p>
<p><font size="4"><strong>I&#8217;m very excited</strong></font> as my book, <a href="http://www.oreilly.com/catalog/python3/">Programming Python 3rd Edition</a>, was delivered yesterday afternoon. Unfortunately my evening was dedicated to that night&#8217;s <a href="http://sadeveloper.net/forums/thread/5099.aspx">SA Developer .NET meeting</a> and then to my next Silverlight talk preparations so I haven&#8217;t had time to sit in a comfy chair yet and start reading to start reading it in depth. The book has been nicknamed &#8220;The Budgie Killer&#8221; at work because of its immense size and in reference to a <a href="http://en.wikipedia.org/wiki/Monty_Python%27s_Flying_Circus">Monty Python</a> skit (remembering that the Python language is named after the television series), as it&#8217;s a hefty tomb and glancing through the pages looks like it means business.</p>
<p>I&#8217;ve been writing Python scripts on and off for the last 3 months or so and I&#8217;ve been constantly surprised at how easy and yet powerful the language is. I&#8217;m also very lucky to write scripts for the Windows and IBM AIX unix platforms as there&#8217;s something special about writing a script once and seeing it run on multiple platforms and in different environments.</p>
<p>I&#8217;ve bought this book (and I haven&#8217;t bought a book this big since my VB6 days) because I want to add Python as a language to my CV because I believe dynamic languages are going to hit the scene again in the next couple of years. You just have to look at the On Rails movement as well as Microsoft&#8217;s <a href="http://mailowl.co.za/wordpress/?p=134">Dynamic Language Runtime</a> that they are building; and I&#8217;d add that XML as a first-class citizen of VB.NET are all portents of things to come.</p>
<p>Sadly, having started to read the Preface, it looks like I&#8217;ll be forking out for <a href="http://www.oreilly.com/catalog/lpython2/">Learning Python</a> because my book focuses on teaching application-level programming and is a followup to learning the core language done in Learning Python. Programming Python does however skim through the basics of the language before teaching the System, GUI and Internet libraries which &#8220;do stuff&#8221; and what a developers wants to really do, and Learning Python (looking at the table contents) focuses on the core language concepts like creating and manipulating objects and handling exceptions; so I think both are a worthwhile investment to make.</p>
]]></content:encoded>
			<wfw:commentRss>http://mailowl.co.za/2007/06/14/programming-python-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The secret power of Silverlight</title>
		<link>http://mailowl.co.za/2007/06/11/the-secret-power-of-silverlight/</link>
		<comments>http://mailowl.co.za/2007/06/11/the-secret-power-of-silverlight/#comments</comments>
		<pubDate>Mon, 11 Jun 2007 06:24:12 +0000</pubDate>
		<dc:creator>Andre Odendaal</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=144</guid>
		<description><![CDATA[
I gave the first part my talk last Friday titled â€œIntroduction to Silverlightâ€ to my company as part of our Developer Readiness Program and it was while preparing for this that I realised the true potential of Silverlight that I think a lot of people have missed.
As I see it, there are 2 parts to [...]]]></description>
			<content:encoded><![CDATA[<p><img align="left" src="http://www.mailowl.co.za/picture_library/meditating.jpg" /></p>
<p><font size="4"><strong>I gave the first</strong></font> part my talk last Friday titled â€œIntroduction to Silverlightâ€ to my company as part of our <a href="http://www.drp.co.za/">Developer Readiness Program</a> and it was while preparing for this that I realised the true potential of Silverlight that I think a lot of people have missed.</p>
<p>As I see it, there are 2 parts to this new technology. There&#8217;s the shiny, animated, â€œlet&#8217;s take on Adobe Flashâ€, Windows Presentation Foundation in any browser on both a Mac or Windows part, which everyone is blogging about and was recently demoed by Microsoft at <a href="http://mailowl.co.za/wordpress/?p=142">Dev Days 2007</a>. But there&#8217;s also an underlying, far more important part which, I think, will make businesses and developers sit up and take notice. That is, that <strong><font color="#ff0000">you can run .NET code as client script</font></strong> on a browser as your would Javascript.</p>
<p>Unlike Active Server Pages where a post-back is made to the hosting server to run some .NET code before returning the results back to the client; Silverlight allows the compiled code to sit on the user&#8217;s machine to be accessed directly and quickly.</p>
<p>I hope this is sinking in because the ramifications are enormous.</p>
<p>What currently happens (because the product is still in alpha) is that a user will download and install the Silverlight plug-in which is a subset of the .NET Framework on their machine, be it a Mac or Windows platform. The user then visits a Silverlight enabled website and in the pages, images and other resources that get downloaded to the users cache they also download a DLL of the compiled .NET code. The Silverlight javascript that goes along with every Silverlight project knows how to invoke this DLL using the slim .NET Framework that the user previously installed and therefore the user is now running .NET code on their machine through a browser interface, disconnected from the server.</p>
<p>There is also a feature called Isolated Storage giving each Silverlight module up to 1MB of storage on the user&#8217;s system which means static information like parameter tables and report data can be cached locally for speedy access by the .NET code. Silverlight also provides powerful interop between Javascript, the HTML DOM and .NET, allowing each to call the other and creating a immense environment for developers to work in.</p>
<p>A simple test of this statement is quite possible, and I will prove it by walking you through creating an HTML page with a button on it, and when you click the button .NET code is executed. To build this demo you&#8217;ll need the Silverlight 1.1 runtime, Visual Studio Orcas and the Silverlight Alpha Tools for Visual Studio; all of which you can get from the Get Started page on the Silverlight community website.</p>
<p>Create a new Silverlight project in C# and in the TestPage.html insert a new line directly after the opening &lt;body&gt; and add:</p>
<p><strong>&lt;input type=&#8221;button&#8221; id=&#8221;mybutton&#8221; value=&#8221;Click Me!&#8221; /&gt;</strong></p>
<p>Damn! <a href="http://mailowl.co.za/wordpress/?p=131">CopySourceAsHtml</a> doesn&#8217;t work on Visual Studio Orcas, so you&#8217;ll have to forgive the lack of text highlighting (suggestions for a replacement welcome). Notice that we didn&#8217;t specify any event handlers for our button. In this demo we&#8217;ll add a handler from .NET code and hook it onto a .NET method to run.</p>
<p>Now we&#8217;ll add a TextBlock to our XAML page to display some message when the Html button is clicked. Add the following line between the &lt;Canvas&gt; tags.</p>
<p><strong>&lt;TextBlock x:Name=&#8221;mylabel&#8221; size=&#8221;56&#8243;&gt;&lt;/TextBlock&gt;</strong></p>
<p>Next we must go to the code page of our XAML file and we must add the Windows.System.Browser namespace so we can use the HtmlPage static object to get at the Html document which the Silverlight module is running in.</p>
<p>At the top of Page.xaml.cs add:</p>
<p><strong>using System.Windows.Browser;</strong></p>
<p>and in the Page_Loaded method, after the InitializeComponent() call add:</p>
<p><strong>document.GetElementByID(&#8220;mybutton&#8221;).AttachEvent(&#8220;onclick&#8221;, new EventHandler&lt;HtmlEventArgs&gt;(DoSomething));</strong></p>
<p>So what are we doing here? Well from the document, which is the Html page in which the Silverlight module is running, we&#8217;re called GetElementByID which returns the HtmlElement instance of our button. On the HtmlElement we use AttachEvent to attach a new event handler delegate to the &#8220;onclick&#8221; event of the button. Note that I&#8217;ve specified the event arguments to be of type HtmlEventArgs because while I&#8217;m not making use of it in this demo, there&#8217;s a lot of information contained in the event args about how the user interacted with the element to raise the event.</p>
<p>Finally, we must add the method that the button will be attached to. Before we add the code, I suggest you hit Build so that the XAML object we created is available in code. Then add this method after Page_Loaded:</p>
<p><strong>private void DoSomething(object sender, HtmlEventArgs e)<br />
{<br />
mylabel.Text = &#8220;I&#8217;ve been clicked&#8221;<br />
}</strong></p>
<p>All I&#8217;m doing here is setting the text of my Textblock to show that the Html button has been clicked. Of course, I could execute more elaborate code and even pass data back to other Html elements by creating another Htmldocument (or globalizing the first one), getting the desired HtmlElement and using the GetAttribute and SetAttribute to get and set data.</p>
<p>Now you can hit Run and test the code in action. You&#8217;ll see when you click the button is doesn&#8217;t do a postback to the server (in fact plain Silverlight projects don&#8217;t run in a Cassini or IIS server, the page is loaded directly) and the Html button is calling .NET code. Do you see!? A lot less glamorous than most of the demos floating around, but I think you&#8217;ll agree with me; this is a lot more useful to every day web development; and can change the way developers think about working with client code.</p>
<p><img src="http://www.mailowl.co.za/picture_library/browserdemo.png" /></p>
<p>If you don&#8217;t want to go through and write all 5-7 lines of code, I have uploaded the demo and you can download <a href="http://www.mailowl.co.za/Downloads/BrowserDemo.rar">BrowserDemo.rar</a> to play with; you&#8217;ll still need Oracs and the Silverlight tools though. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://mailowl.co.za/2007/06/11/the-secret-power-of-silverlight/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Add intellisense for Silverlight to Visual Studio</title>
		<link>http://mailowl.co.za/2007/05/08/add-intellisense-for-silverlight-to-visual-studio/</link>
		<comments>http://mailowl.co.za/2007/05/08/add-intellisense-for-silverlight-to-visual-studio/#comments</comments>
		<pubDate>Tue, 08 May 2007 06:16:05 +0000</pubDate>
		<dc:creator>Andre Odendaal</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=137</guid>
		<description><![CDATA[I only noticed this little gem because I was getting frustrated with what I was trying to do and forced myself to sit down and read the documentation from start to finish.
In the the Silverlight 1.1 Alpha SDK, Microsoft provides you with an XSD to add to your Visual Studios schemas which enables intellisense for [...]]]></description>
			<content:encoded><![CDATA[<p><font size="4"><strong>I only noticed</strong></font> this little gem because I was getting frustrated with what I was trying to do and forced myself to sit down and read the documentation from start to finish.</p>
<p>In the the <a href="http://msdn.microsoft.com/vstudio/eula.aspx?id=c8bf88e7-841c-43fd-c63d-379943617f36">Silverlight 1.1 Alpha SDK</a>, Microsoft provides you with an XSD to add to your Visual Studios schemas which enables intellisense for Silverlight XAML files.  What&#8217;s more, you can add it to your Visual Studio Express edition for those of you, who like me, don&#8217;t own the full Visual Studios.</p>
<p>I&#8217;ve uploaded the XSD to my blog and you can get it here (<a href="http://www.mailowl.co.za/Downloads/silverlight.xsd">silverlight.xsd</a>, right-click and Save As) and simply paste the file into C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://mailowl.co.za/2007/05/08/add-intellisense-for-silverlight-to-visual-studio/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Implementing a game loop in Silverlight 1.1 Alpha</title>
		<link>http://mailowl.co.za/2007/05/05/implementing-a-game-loop-in-silverlight-11-alpha/</link>
		<comments>http://mailowl.co.za/2007/05/05/implementing-a-game-loop-in-silverlight-11-alpha/#comments</comments>
		<pubDate>Sat, 05 May 2007 07:00:59 +0000</pubDate>
		<dc:creator>Andre Odendaal</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Game Development]]></category>

		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=136</guid>
		<description><![CDATA[As Danny Day of the Game.Dev community will tell you, good game development is all about cheats and tricks; fooling the player into believing they&#8217;re part of a living environment and rendering marvels before their eyes when you&#8217;re actually taking every shortcut you can to save on CPU cycles.
Well, I&#8217;ve discovered a trick I would [...]]]></description>
			<content:encoded><![CDATA[<p><font size="4"><strong>As Danny Day</strong></font> of the <a href="http://www.gamedotdev.co.za/">Game.Dev</a> community will tell you, good game development is all about cheats and tricks; fooling the player into believing they&#8217;re part of a living environment and rendering marvels before their eyes when you&#8217;re actually taking every shortcut you can to save on CPU cycles.</p>
<p>Well, I&#8217;ve discovered a trick I would like to share with you and it&#8217;s how to implement a game loop in Silverlight so you can do move objects along deterministic paths, test for collisions, make decisions and, in effect, make real-time games.</p>
<p>Because Silverlight is event driven we have to create and use a Storyboard object with a duration of 0:0:0 (one frame) and hook into the Completed event of the Storyboard to perform our looping code. An important note here is that the Storyboard <strong>MUST NOT</strong> have a RepeatBehaviour property because the Completed event only fires at the end of the activity cycle (which includes all the repeats) and if you set RepeatBehaviour to &#8220;Forever&#8221; then the Completed event will never fire. This means that in the function that is called by the Completed event we must restart ( .Begin() ) the Storyboard for the next frame.</p>
<p><strong>XAML</strong></p>
<p style="font-size: 12pt; background: white; color: black; font-family: Consolas">
<p style="margin: 0px"><span style="color: blue">    &lt;</span><span style="color: #a31515">Storyboard</span><span style="color: blue"> </span><span style="color: red">x:Name</span><span style="color: blue">=</span>&#8220;<span style="color: blue">animation</span>&#8220;</p>
<p style="margin: 0px"><span style="color: blue">        </span><span style="color: red">Completed</span><span style="color: blue">=</span>&#8220;<span style="color: blue">javascript:loopcode</span>&#8220;</p>
<p style="margin: 0px"><span style="color: blue">        </span><span style="color: red">Duration</span><span style="color: blue">=</span>&#8220;<span style="color: blue">0:0:0</span>&#8220;<span style="color: blue">&gt;</span></p>
<p style="margin: 0px"><span style="color: blue">    &lt;/</span><span style="color: #a31515">Storyboard</span><span style="color: blue">&gt;</span></p>
<p><strong>JavaScript</strong></p>
<p style="font-size: 12pt; background: white; color: black; font-family: Consolas">
<p style="margin: 0px"><span style="color: blue">function</span> loopcode(sender, args)</p>
<p style="margin: 0px">{</p>
<p style="margin: 0px">    <span style="background: #ddffdd; color: green">// TODO    </span></p>
<p style="margin: 0px">    sender.findName(<span style="color: #a31515">&#8220;animation&#8221;</span>).begin();</p>
<p style="margin: 0px">}</p>
<p>When you instantiate your Silverlight object in your webpage you can set the MaxFrameRate which means faster machines won&#8217;t execute faster than normal machines, although obviously you&#8217;ll have a performance hit on slower machines. You should be able to setup successful timers for actions although I&#8217;d encourage you to investigate using another Storyboard object like the one used for the main loop. By default the MaxFrameRate is set to 24 and the max rate you can have is 64 <em>&#8220;Any value that is set to greater than 64 is considered to be set to 64.&#8221;</em></p>
<p>Of course I have a demo you can download! You can get the source <a href="http://www.gamedev.za.net/filecloset/download.php?id=31">here</a> and in it I&#8217;ve setup a Storyboard as a loop and a counter which increments every frame. I then have a TextBlock which displays the counter (and an image of the <a href="http://sadeveloper.net">SA Developer .NET</a> lemming and the URL to the community I help run; but they&#8217;re just there for show).</p>
<p>Now it&#8217;s time to make a game with Silverlight, and my first attempt will be to minic the first tutorial from the GameMaker website &#8220;Catch the Clown&#8221;. A simple game with a clown that bounces around the room and the player must click on the clown to score points. Each time the clown is clicked it reappears in a different local and coninues to bounce around but this time a litle faster, so it&#8217;s harder to catch</p>
<p>Wish me luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://mailowl.co.za/2007/05/05/implementing-a-game-loop-in-silverlight-11-alpha/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Silverlight Demo</title>
		<link>http://mailowl.co.za/2007/05/01/silverlight-demo/</link>
		<comments>http://mailowl.co.za/2007/05/01/silverlight-demo/#comments</comments>
		<pubDate>Tue, 01 May 2007 20:11:37 +0000</pubDate>
		<dc:creator>Andre Odendaal</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=135</guid>
		<description><![CDATA[
As promised here is the little demo I did at work; a Silverlight (Javascript) project made using Microsoft Expression Blend. If you see a message saying you need to get MS Silverlight, then you haven&#8217;t gotten this marvelous (and tiny) plugin installed and I suggest to click the link provided to see what I&#8217;ve done.
]]></description>
			<content:encoded><![CDATA[<p><iframe height="500" width="660" frameBorder="0" src="http://www.mailowl.co.za/Downloads/SilverlightDemo/SilverlightDemo.html"></iframe></p>
<p><font size="4"><strong><a href="http://mailowl.co.za/wordpress/?p=133">As promised</a> here</strong></font> is the little demo I did at work; a Silverlight (Javascript) project made using Microsoft Expression Blend. If you see a message saying you need to get MS Silverlight, then you haven&#8217;t gotten this marvelous (and tiny) plugin installed and I suggest to click the link provided to see what I&#8217;ve done.</p>
]]></content:encoded>
			<wfw:commentRss>http://mailowl.co.za/2007/05/01/silverlight-demo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dynamic Language Runtime (DLR)</title>
		<link>http://mailowl.co.za/2007/05/01/dynamic-language-runtime-dlr/</link>
		<comments>http://mailowl.co.za/2007/05/01/dynamic-language-runtime-dlr/#comments</comments>
		<pubDate>Tue, 01 May 2007 10:16:57 +0000</pubDate>
		<dc:creator>Andre Odendaal</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://mailowl.co.za/wordpress/?p=134</guid>
		<description><![CDATA[The second announcement from MIX07 (see my previous post for the first) is a little vaguer with concrete information; and it&#8217;s the announcement of the Dynamic Language Runtime.
&#8220;It is a layer of software that supports dynamic languages running on the CLR. It provides a shared set of language services such as a dynamic type system, [...]]]></description>
			<content:encoded><![CDATA[<p><font size="4"><strong>The second announcement</strong></font> from MIX07 (see my <a href="http://mailowl.co.za/wordpress/?p=133">previous post</a> for the first) is a little vaguer with concrete information; and it&#8217;s the announcement of the Dynamic Language Runtime.</p>
<blockquote><p>&#8220;It is a layer of software that supports dynamic languages running on the CLR. It provides a shared set of language services such as a dynamic type system, fast dynamic dispatch, smart code generation, and a hosting API. It layers on top of the CLR, which provides its own set of shared services such as a world class JIT and GC, sandboxed security model, and debugging/profiling interfaces.&#8221;</p></blockquote>
<p>What this means is that Microsoft is providing a layer on top of the CLR which dynamic languages (such as Python, Ruby, JavaScript and Visual Basic [read VBScript]) can commonly use and provides functionality which the language implementers have had to previously write themselves if they wanted the language to be used in .NET.</p>
<p>While I personally won&#8217;t be using the DLR, I am interested in its development because I do a lot of Python/.NET integration at work; and already there is a <a href="http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=438">new version of IronPython</a> (albeit an Alpha release) using the DLR.</p>
<p>The gurus at my company abhor the idea of &#8220;yet another layer&#8221; which their code must work through to get stuff done; and while I&#8217;m tempted to agree with them in principle when compared to executing a dynamic language script in other environments I&#8217;m not going to pass judgement until there are a couple more articles and some workable samples to benchmark on.</p>
<p>With what little information I have at this point in time, Jim Hugunin and his team (who brought us IronPython) are working the DLR and you can read more about the announcement and, hopefully (his previous posts have been few and far between), follow its progress from <a href="http://blogs.msdn.com/hugunin/">his blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mailowl.co.za/2007/05/01/dynamic-language-runtime-dlr/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

