<?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>Jamie&#039;s Blog &#187; Windows Development</title>
	<atom:link href="http://jamiei.com/blog/topic/development/win-dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamiei.com/blog</link>
	<description>Delphi Programming, Web Development, General Technology and, of course, Midget Gems</description>
	<lastBuildDate>Sun, 05 Sep 2010 21:27:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
<cloud domain='jamiei.com' port='80' path='/blog/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Converting C headers is hard &#8211; yajl for Delphi</title>
		<link>http://jamiei.com/blog/2010/03/yajl-for-delphi/</link>
		<comments>http://jamiei.com/blog/2010/03/yajl-for-delphi/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 20:40:13 +0000</pubDate>
		<dc:creator>jamiei</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Windows Development]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[native library]]></category>
		<category><![CDATA[yajl]]></category>

		<guid isPermaLink="false">http://jamiei.com/blog/?p=575</guid>
		<description><![CDATA[Introduction I have been toying with the idea of trying to convert the yajl parser bindings to Delphi in order to build a wrapper on top of the original C dll. yajl (Yet Another JSON Library) is a small fast SAX style JSON parser written and open sourced in C over at lloyd&#8217;s yajl GitHub [...]]]></description>
			<content:encoded><![CDATA[<h4>Introduction</h4>
<p>I have been toying with the idea of trying to convert the <a href="http://lloyd.github.com/yajl/">yajl</a> parser bindings to Delphi in order to build a wrapper on top of the original C dll. <a href="http://lloyd.github.com/yajl/">yajl</a> (Yet Another JSON Library) is a small fast SAX style <a href="http://www.json.org/">JSON</a> parser written and open sourced in C over at <a href="http://github.com/lloyd/yajl">lloyd&#8217;s yajl GitHub</a> page. I wanted to be able to use this library in particular because it&#8217;s very fast, small, portable and able parse from a stream. Plus, I had never really done any conversion of this nature on C header files before so I thought it might be a small, easy project to start with&#8230; I was a perhaps a little naive on this front!</p>
<p>I&#8217;ll leave you with a disclaimer early on: the code that I&#8217;ve been working on and have shared is not currently in a working state. This is the first part of my journey and I do intend on posting further as I learn from the major mistakes that I make in the process.</p>
<h4>Approach</h4>
<p>The 3 header files that I need to translate can be found in the <a href="http://github.com/lloyd/yajl/tree/master/src/api/">src/api</a> directory:</p>
<ul>
<li><a href="http://github.com/lloyd/yajl/blob/master/src/api/yajl_common.h">yajl_common.h</a></li>
<li><a href="http://github.com/lloyd/yajl/blob/master/src/api/yajl_gen.h">yajl_gen.h</a></li>
<li><a href="http://github.com/lloyd/yajl/blob/master/src/api/yajl_parse.h">yajl_parse.h</a></li>
</ul>
<p>I&#8217;m not sure what a *typical* process for conversion might look like but I started out by trying to use Dr Bob&#8217;s <a href="http://www.drbob42.com/delphi/headconv.htm">HeadConv</a> tool as a way of getting me started and doing some of the legwork. However, the callback structure used by the parsing callbacks confused the tool and it never produced anything of use. After this setback I tried to install <a href="http://rvelthuis.de/">Rudy Velthuis</a>&#8216;s <a href="http://rvelthuis.de/programs/convertpack.html">Conversion Helper Tool</a> but I wasn&#8217;t able to load this into the Delphi 2009 IDE.</p>
<p>Having failed to get any of the conversion tools to do any of the work for me, I accepted my task and began to convert the headers from scratch. There were two resources that I found invaluable: the first is the Type Conversion table half way down the page on Dr Bob&#8217;s <a href="http://www.drbob42.com/headconv/index.htm">HeadConv page</a>.  The second was the comprehensive <a href="http://rvelthuis.de/articles/articles-convert.html">Pitfalls of Conversion</a> guide from Rudy.</p>
<p>As I began converting the headers I realised that although I thought I was translating the headers without a problem, <strong>the devil is in the detail</strong> and as my first major conversion project, I didn&#8217;t have the specfic knowledge necessary to correct my specific mistakes. As a result, please correct me if I have misunderstood any bits which I have picked up in the process.</p>
<h5><strong>Const parameters</strong></h5>
<p>One issue that I did notice is that there were quite a few parameters marked const in the header files, such as this declaration in <strong>yajl_parse</strong>:</p>
<pre class="brush: cpp;">
   YAJL_API unsigned char * yajl_get_error(yajl_handle hand, int verbose,
                                            const unsigned char * jsonText,
                                            unsigned int jsonTextLength);
</pre>
<p>Rudy&#8217;s guide states that where possible Delphi programmers should <a href="http://rvelthuis.de/articles/articles-convert.html#constparams">ignore the const</a> declaration as it&#8217;s easy to get wrong depending on whether the argument is passed by value or by reference, complicated by the issue that it means something subtly different in C. I translated this heading and simply ignored the const keyword:</p>
<pre class="brush: delphi;">
    Tyajl_get_error = function(handle: yajl_handle;
                               verbose: integer;
                               jsonText: PChar;
                               jsonTextLegnth: Cardinal): PChar; stdcall;
</pre>
<h5><strong>Multiple Indirection Parameters</strong></h5>
<p>There was one declaration that I had to do a bit of searching for: it was in the <strong>yajl_gen</strong> file, in the declaration of <strong>yajl_gen_get_buf</strong> function:</p>
<pre class="brush: cpp;">YAJL_API yajl_gen_status yajl_gen_get_buf(yajl_gen hand,
                                              const unsigned char ** buf,
                                             unsigned int * len);</pre>
<p>I had never seen the double asterisk before and found it surprisingly difficult to reliably Google for it. Luckily, this comprehensive page on <a href="http://boredzo.org/pointers/">C pointers</a> was pretty useful in explaining that it is in fact a technique called <a href="http://boredzo.org/pointers/#multiple_indirection">multiple indirection</a> which essentially creates a pointer to a pointer, in this case to a char.</p>
<pre class="brush: delphi;">
    Tyajl_gen_get_buf = function (handle: Tyajl_gen;
                                 out buf: PChar;
                                 out len: Cardinal): yajl_gen_status; stdcall;
</pre>
<p>I wasn&#8217;t sure if this was indeed the correct translation but if you know otherwise then please let me know in the comments below.</p>
<h5><strong>Record Alignment and Enum size</strong></h5>
<p>When reading up on the perils of record alignment and enum sizes I found this blog post from Vlad loan Topan on <a href="http://vtopan.wordpress.com/2009/03/10/translating-headers-struct-record-field-alignment-in-c-delphi/">Record Alignment and Enum sizes</a>. Both problems are potentially applicable to the yajl header files. In his post, Vlad mentions that in order to line up the enum sizes you will need to use the {Z4} compiler directive to change the size from the Delphi default of 1 to the C compatible 4 as so:</p>
<pre class="brush: delphi;">
type
  {$Z4}
  yajl_status = (
                  // no error was encountered
                  yajl_status_ok,
                  // a client callback returned zero, stopping the parse
                  yajl_status_client_canceled,
  ... snip ...
</pre>
<p>Reading through the <a href="http://rvelthuis.de/articles/articles-convert.html#aligns">Record alignment</a> section of Rudy&#8217;s article I understood that I needed to search through the yajl project source to look for an Alignment setting. However, I couldn&#8217;t find a reference to the pragma directive anywhere in  the  source.</p>
<h4>Next Steps</h4>
<p>Well, it doesn&#8217;t actually work yet but I have put the <a href="http://github.com/jamiei/Delphi-yajl">Delphi-yajl</a> project on GitHub where you can view my efforts so far, fork it and hopefully provide feedback or code contributions to show me where I&#8217;m going wrong. I have also setup a <a href="http://jamiei.com/blog/code/delphi-yajl/">Delphi-yajl</a> page here to serve as a placeholder for when it actually works!</p>
<h4>Futher Reading</h4>
<ul>
<li><a href="http://lloyd.github.com/yajl/">yajl</a> &#8211; The yajl project home page.</li>
<li><a href="http://www.drbob42.com/delphi/headconv.htm">Dr Bob&#8217;s Header Conversion Tool</a> &#8211; The useful tool from the ever excellent Dr Bob.</li>
<li><a href="http://rvelthuis.de/articles/articles-convert.html">The Pitfalls of Conversion</a> &#8211; Rudy Velthuis&#8217;s long but excellent article on commonly encountered problems when converting</li>
<li><a href="http://rvelthuis.de/programs/convertpack.html">Conversion Helper Package</a> &#8211; The Conversion package helper from Rudy but I&#8217;m uncertain as to how compatible it is any more.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jamiei.com/blog/2010/03/yajl-for-delphi/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Diary of a C# to Delphi Prism conversion</title>
		<link>http://jamiei.com/blog/2009/04/diary-of-a-c-to-delphi-prism-conversion/</link>
		<comments>http://jamiei.com/blog/2009/04/diary-of-a-c-to-delphi-prism-conversion/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 14:15:25 +0000</pubDate>
		<dc:creator>jamiei</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Delphi Prism]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Podcast at Delphi]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[delphi prism]]></category>
		<category><![CDATA[project conversion]]></category>

		<guid isPermaLink="false">http://jamiei.com/blog/?p=271</guid>
		<description><![CDATA[I have in the past written up a few tips for converting a Delphi.NET project to Delphi Prism but this time I thought it might be useful for me to write up my experiences on converting this C# Project to Delphi Prism by initially using the C#ToPas Tool from RemObjects. Many of you who attended CodeRage [...]]]></description>
			<content:encoded><![CDATA[<p>I have in the past written up a few tips for <a href="http://jamiei.com/blog/2008/12/migrating-a-project-to-delphi-prism-from-delphinet/">converting a Delphi.NET project to Delphi Prism</a> but this time I thought it might be useful for me to write up my experiences on converting this C# Project to Delphi Prism by initially using the C#ToPas Tool from RemObjects. Many of you who attended <a href="http://conferences.codegear.com/coderage08">CodeRage III</a> (in a virtual manner) might remember <a href="http://www.delphi.org">Jim McKeeth</a>&#8216;s <a href="http://www.delphi.org/robot-rage/">Revenge of Delphi Robot rage</a> session. The aim of the session was to build a <a href="http://www.unrealtournament3.com/">Unreal Tournament 3</a> Bot to fight it out against other competitor&#8217;s bots in an Unreal Tournament 3 arena using the (then) newly recently <a href="http://www.codegear.com/products/delphi/prism">Delphi Prism</a> tool. For those who didn&#8217;t attend, I&#8217;ll spoil the ending and just tell you that somehow <a href="http://www.delphi.org/2008/12/18-coderage-iii-wrap-up/">my bot won</a>. <img src='http://jamiei.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Jim is planning another session for the <a href="http://www.delphilive.com/">DelphiLive</a> conference (which I really wish I could go to, check it out if you haven&#8217;t already). However when running the last tournament we encountered a number of fatal bugs in the .NET UT3 Bot library which was originally put together by <a href="http://www.utbots.com/">Andy Sterland &amp; James Lissiak</a>. As a result Jim and I had been discussing the idea of porting the original library to Delphi Prism so that we could fix a few of the more serious bugs, it would also allow potential Prism Developers who were not familiar with C# to dig into the library itself. This is a project conversion diary which will outline the approaches I tried, any hurdles I encountered and a few tips for trying to avoid them when converting your own project.</p>
<p>I started by running the <a href="http://code.remobjects.com/p/csharptoxy/">C#ToOxygene</a> Tool on all of the source files within the project, It&#8217;s a very simple and easy to use tool that as its name implies aims to convert C# source files to Delphi Prism files. I was able to run the tool without issue on every C# source file except for 3 where for some reason it exited producing the error:  &#8221;<em><strong>Error during processing: Index was out of range</strong></em>&#8221; (Issue logged (rather clumsily) as #<a href="http://code.remobjects.com/p/csharptoxy/issues/37/">37</a>).</p>
<p>Having started on the basics of the translation using the conversion tool to do the grunt work I then dived into the code with the <a href="http://prismwiki.codegear.com/">Prism Wiki</a> and <a href="http://msdn.microsoft.com/en-us/library/618ayhy6(VS.80).aspx">MSDN C# documentation</a> open to make a start on correcting the <strong>600-odd errors</strong> that the resulting project produced upon an attempted Build.</p>
<p>At first glance I felt that the resultant code was a little bit visually &#8220;messy&#8221; in places and I felt it might be easier to prettify the code using a Code Formatter such as the <a href="http://jedicodeformat.sourceforge.net/">JEDI Code Format</a> tool to clean up the auto generated code and highlight any mismatched parenthesis or similar errors. However unfortunately the JEDI tool is not compatible with Prism and therefore refused to help me. If anyone knows of a Code Formatting tool which is compatible with Delphi Prism then please let me know in the comments below.</p>
<p>A few other issues which I encountered with the generated code or more generally are outlined below:</p>
<h3>Internal Keyword</h3>
<p><span style="font-weight: normal; font-size: 13px;">The C# <strong>internal</strong> (<a href="http://msdn.microsoft.com/en-us/library/7c5ka91b(VS.80).aspx">msdn doc</a>) keyword was not correctly translated &#8211; for this I took a trip to the Prism Wiki and looked up the <a href="http://prismwiki.codegear.com/en/Class_Member_Visibility_Levels">Class Member Visibility Levels</a> page to find that the equivalent level <strong>assembly</strong> is listed there (Issue #<a href="http://code.remobjects.com/p/csharptoxy/issues/42/">42</a>). Note that in Delphi Prism you can also have </span><span style="font-weight: normal; font-size: 13px;"><strong>assembly or protected</strong></span><span style="font-weight: normal; font-size: 13px;"> or </span><span style="font-weight: normal; font-size: 13px;"><strong>assembly and protected</strong></span><span style="font-weight: normal; font-size: 13px;"> depending upon whether you wish the class to be visible to descendants.</span></p>
<h3>The C# &#8220;this&#8221; Keyword</h3>
<p>The C# <strong>this.</strong> (<a href="http://msdn.microsoft.com/en-us/library/dk1507sz(VS.80).aspx">msdn doc</a>) keyword was not correctly translated to the Delphi Prism <strong>Self.</strong> equivalent that we&#8217;re all accustomed to. This isn&#8217;t hard to spot when going through the generated code and the issue had already been logged by Anton Kasyanov (Issue #<a href="http://code.remobjects.com/p/csharptoxy/issues/39/">39</a>) and should be fixed shortly.</p>
<h3>Float Types</h3>
<p>One class made extensive use of the <strong>float</strong> type (<a href="http://msdn.microsoft.com/en-us/library/b1e65aza(VS.80).aspx">msdn doc</a>) which doesn&#8217;t exist as is a built-in type for Delphi Prism so you&#8217;ll need to convert it to one of the <a href="http://prismwiki.codegear.com/en/Floats">two Float types</a> depending upon the precision you require.</p>
<h3>Operator Overloading</h3>
<p>Operator Overloading is not something that Delphi developers may be traditionally used to but Delphi Prism supports this nicely. However instead of using the sign operator that C# Developers use you&#8217;ll need to lookup the operator name and declaration on the <a href="http://prismwiki.codegear.com/en/Operator_Overloading">Operator Overloading Wiki Page</a>. eg. The Equals operator is declared as so:</p>
<pre class="brush: delphi;">class operator Equal(obj1, obj2: UTIdentifier): boolean;</pre>
<h3>Differences between return, Result and exit</h3>
<p>This should be obvious to any C# Developer but it could be easy to forget about. Don&#8217;t forget that the <strong>return</strong> C# method (<a href="http://msdn.microsoft.com/en-us/library/1h3swy84(VS.80).aspx">msdn doc</a>) terminates execution of the method in which it is being executed and returns to the calling method and therefore be wary of using <strong>Result</strong> blindly in an identical manner, particularly with boolean statements that rely upon this fact. Eg. Consider the following C# Code:</p>
<pre class="brush: csharp;">public override bool Equals(object obj)
{
	if (obj is UTVector)
	{
		if (this._x == ((UTVector)obj)._x &amp;&amp;
			this._y == ((UTVector)obj)._y &amp;&amp;
			this._z == ((UTVector)obj)._z)
		{
			return true;
		}
	}
	return false;
}</pre>
<p>Clearly, if you simply replace the <strong>return false;</strong> with <strong>Result := False;</strong> you will end up with a method that always returns False because the expression will always be executed no matter what Result is set to earlier in the method. In this case I simply moved the <strong>Result := false;</strong> to the top of the method. Delphi Prism also supports the <a href="http://prismwiki.codegear.com/en/Exit_(keyword)">Exit keyword</a> which also allows you to Return a result parameter. This method is a lot closer to the C# return keyword and usage but the <a href="http://prismwiki.codegear.com/en/Exit_(keyword)">Exit page</a> on the Prism Wiki warns against using too many exit keywords to avoid making the code harder to maintain.</p>
<h3>Constructors are not named</h3>
<p>This is a rare example of where the original C# code actually looks much closer to the end Delphi Prism code than a traditional Delphi programmer might think. In C# you might have a class and constructor that might look like this:</p>
<pre class="brush: csharp;">public class UTIdentifier
{
	internal UTIdentifier(string Id)
	{
	}
}</pre>
<p>In Prism, we have nameless <a href="http://prismwiki.codegear.com/en/Constructors">constructors</a> which means that the equivalent Delphi Prism constructor implementation might look like this:</p>
<pre class="brush: delphi;">  constructor UTIdentifier(id: String);
  begin
  end;</pre>
<p>It is important to note that in your class interface should adhere to this rule too. eg <strong>constructor(id: String);</strong></p>
<p>This was something that the C#ToPas tool also generated incorrectly. (Issue #<a href="http://code.remobjects.com/p/csharptoxy/issues/44/">44</a>)</p>
<h3>Short-Circuit Boolean Expressions</h3>
<p>I came across the C# <a href="http://msdn.microsoft.com/en-us/library/6373h346(VS.80).aspx"><strong>||</strong></a> operator which performs a short-circuited OR boolean evaluation of the operands. I wasn&#8217;t sure that the Delphi Prism <strong>or</strong> operator produces the same behaviour but if I read the <a href="http://prismwiki.codegear.com/en/Expression_Evaluation#Boolean_Short-Circuit_Evaluation">Expression Evaluation</a> page correctly then I believe it does (In Delphi 2009, at least, this behaviour is set through the <a href="http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/compdirsbooleanshortcircuitevaluation_xml.html">{$B+/-}</a> compiler flag) .</p>
<h3>Event Assignment</h3>
<p>The Event Assignment routine for multicast delegate type events is slightly different in Delphi Prism from what we&#8217;re used to in Delphi Win32. Looking at the <a href="http://prismwiki.codegear.com/en/Event_Assignment_Operators">Event Assignment</a> page in the wiki we can see that the actual method for assignment is much closer to the C# equivalent and uses the same C# <strong>+=</strong> and <strong>-=</strong> operators. The C#ToPas tool converted this code a little too literally converted this C# code:</p>
<pre class="brush: csharp;">this._connection.OnDataReceived += new EventHandler(DataReceived);
this._connection.OnErrorOccurred += new EventHandler(ErrorOccurred);</pre>
<p>to this:</p>
<pre class="brush: delphi;">Self._connection.OnDataReceived := Self._connection.OnDataReceived + new EventHandler(DataReceived);
Self._connection.OnErrorOccurred := Self._connection.OnErrorOccurred + new EventHandler(ErrorOccurred)</pre>
<p>Which produces a compiler Error that Events in Delphi Prism don&#8217;t allow access to the underlying field. You should use the += operator instead <a href="http://prismwiki.codegear.com/en/Event_Assignment_Operators">as seen on the Wiki</a>. (C#ToPas Issue logged as Issue #<a href="http://code.remobjects.com/p/csharptoxy/issues/45/">45</a>).</p>
<p><em>UPDATE: I&#8217;ve just noticed (after logging my own issue) that the event assignment issue has already been reported and has been marked as Won&#8217;t Fix (Issue #<a href="http://code.remobjects.com/p/csharptoxy/issues/27/">27</a>) so it looks like you&#8217;ll need to check _every_ event assignment in your project manually.</em></p>
<h3>Switch and Case Statements</h3>
<p>The C#ToPas tool did not appear to react well at all to use of the C# <a href="http://msdn.microsoft.com/en-us/library/06tc147t.aspx">switch</a> and case statements. I can&#8217;t give you any specific advice on how to fix these because each case statement was generated slightly differently in my converted code and therefore I can only advise that you check these manually or rewrite each of these methods by hand.</p>
<h3>Reserved Keywords</h3>
<p>Sadly this isn&#8217;t an issue that is related to the C#ToPas tool but more of an intrinsic difficulty when converting interoperable code between languages. I encountered at least one class that made use of a few reserved words in Delphi such as begin and end &#8211; I&#8217;m still not sure what to do with these for now.</p>
<h3>Overall Impression</h3>
<p>Despite a few early bugs the <a href="http://code.remobjects.com/p/csharptoxy/">C#ToPas</a> Tool is a good platform to begin converting your C# code to Delphi Prism although you may wish to ensure that you have some extensive Unit Tests for your code before the main code is converted so as to ensure that any bugs introduced can be picked up on quickly (which you have anyway right?). It is also worth noting that the <a href="http://prismwiki.codegear.com">Delphi Prism Wiki</a> (which now <a href="http://blogs.remobjects.com/blogs/mh/2009/04/27/p277">authenticates via your CDN login</a>) has <strong>excellent coverage</strong> and is an absolutely <strong>invaluable reference</strong> for anyone working with Delphi Prism.</p>
<p>By the time this entry is published I suspect that <a href="http://blogs.remobjects.com/blogs/ck/">Carlo</a> will be very close to fixing some or most of the above bugs in the C#ToPas tool.</p>
<p>The code is nowhere near complete yet and most of the files are still straight out of the Automatic conversion and therefore <strong>will not compile in any way</strong> but I&#8217;ve put what we have so far up on the rather smooth <a href="http://www.github.com">Github</a> site at the <a href="http://github.com/jamiei/PrismUT3RemoteBot">PrismUT3RemoteBot</a> project which anyone can fork and push changes back to. <a href="http://git-scm.com/">Git</a> is a little strange to work with at first because it&#8217;s a different mindset to SubVersion/CVS but it&#8217;s worth checking out if you haven&#8217;t already.</p>
<p>[<strong>UPDATE</strong>: The Prism UT3 Remote Bot conversion project has been completed since this original post and may be used during Jim McKeeth's session at <a href="http://www.delphilive.com/">DelphiLive! Germany Sept 28 - Oct 2 2009</a>.]</p>
]]></content:encoded>
			<wfw:commentRss>http://jamiei.com/blog/2009/04/diary-of-a-c-to-delphi-prism-conversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Language Features in Delphi Prism</title>
		<link>http://jamiei.com/blog/2009/01/new-language-features-in-delphi-prism/</link>
		<comments>http://jamiei.com/blog/2009/01/new-language-features-in-delphi-prism/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 17:47:11 +0000</pubDate>
		<dc:creator>jamiei</dc:creator>
				<category><![CDATA[.NET General]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Delphi Prism]]></category>
		<category><![CDATA[codegear]]></category>
		<category><![CDATA[delphi prism]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[linq]]></category>

		<guid isPermaLink="false">http://jamiei.com/blog/?p=64</guid>
		<description><![CDATA[Continuing my look at Delphi Prism, in my previous post I took a (very short) look at some of the compatibility changes required to port my Delphi.NET  Twitter Library to Delphi Prism, I mentioned that I now needed to learn about some of the new language features provided by Prism. Ever since the release of [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing my look at <a href="http://www.codegear.com/products/delphi/prism">Delphi Prism</a>, in my previous post I took a (very short) look at some of the compatibility changes required to <a href="http://jamiei.com/blog/2008/12/migrating-a-project-to-delphi-prism-from-delphinet/">port my Delphi.NET</a>  Twitter Library to Delphi Prism, I mentioned that I now needed to learn about some of the new language features provided by Prism.</p>
<p>Ever since the release of Delphi.NET there has been much confusion surrounding why you would choose the Delphi language for .NET Development. When Delphi.NET was released there was concern that it was not a first class member of the .NET framework and always seemed to lag 12-18 months behind the lightning fast pace of development of the .NET Framework. With Prism Delphi offerings for .NET are based upon the <a href="http://www.remobjects.com">RemObjects</a> Oxygene compiler which isn&#8217;t required to maintain a loose language compatibility with the Win 32 Delphi compiler and therefore is able to progress at a much faster pace.  </p>
<p>Still, despite this: A recent <a href="http://stackoverflow.com/questions/242584/will-you-use-delphi-prism">Delphi Prism related thread</a> at <a href="http://stackoverflow.com/questions/tagged/delphi">StackOverflow</a> showed that there still seems to be a general feeling that Delphi is a second class citizen in the .NET Development World. Some even seemed to suggest that the language features in Prism make it unrecognisable as Delphi. To try to dispense with this idea: I thought that I would show off some of <em>my own</em> favourite new language features in Delphi Prism and ones which for me make it a natural fit for .NET.  </p>
<p>Please note: This is <strong>not</strong> intended to be a comprehensive guide to the new language features. For that you&#8217;ll need to refer to the <a href="http://prismwiki.codegear.com/en/Main_Page">Delphi Prism Wiki</a> page on <a href="http://prismwiki.codegear.com/en/Delphi_Prism_Syntax_compared_with_Win32_Delphi">Compatibility with Win 32 Delphi</a>.</p>
<p>My favourite new language features which Prism brings to the table for Delphi Developers is <a href="http://msdn.microsoft.com/en-gb/library/bb308959.aspx">LINQ</a>. <a href="http://www.monien.net/blog/">Olaf Monien</a>, who I also follow on Twitter (<a href="http://twitter.com/omonien">@omonien</a>), posted a beautifully simple<a href="http://www.monien.net/blog/index.php/2008/12/delphi-can-do-linq/"> example of using LINQ with Delphi Prism</a> on his own blog and then showed how Delphi Prism can also do <a href="http://www.monien.net/blog/index.php/2008/12/delphi-can-even-linq-to-sql/">LINQ to SQL</a>. I have replicated his basic example below because it also demonstrates another great language feature.</p>
<pre class="brush: delphi;">// Type Declaration
  MusicAlbum = record
  public
    Name: string;
    Artist: string;
    AlbumYear: integer;
  end;</pre>
<pre class="brush: delphi;">var
  MyAlbum: MusicAlbum;
  MyAlbums : List&lt;MusicAlbum&gt;;
begin
// Create our Album List
MyAlbums := new List&lt;MusicAlbum&gt;; 

// Setup a our records
MyAlbum := new MusicAlbum;
MyAlbum.Artist := 'Kanye West';
MyAlbum.Name := '808s and Heartbreak';
MyAlbum.AlbumYear := 2008;
MyAlbums.Add(MyAlbum);  

// Execute our LINQ Query
var AlbumsLastYear := from Album in MyAlbums where Album.AlbumYear.Equals(2008); 

// Add the result to our listbox
for Album in AlbumsLastYear do
begin
  lbFoundAlbums.Items.Add(Album.Artist + ' - ' + Album.Name + ' (' + Album.AlbumYear + ')');
end;

end;</pre>
<p> <br />
This code clipping also demonstrates <a href="http://prismwiki.codegear.com/en/Type_Inference">Type Inference</a> which allows a variable type to be inferred from the context of it&#8217;s usage. For example, consider writing the following: <strong><em>var</em></strong><em> MyGreatList := </em><span class="hl kwa"><strong><em>new</em></strong></span><em> List&lt;</em><span class="hl kwb"><em>String</em></span><em>&gt;; </em>or even something as simple as <strong><em>var</em></strong><em> s := &#8216;string&#8217;;</em>. Type Inference is a useful addition which I can see myself making extensive use of. My only concern about Type Inference is how it affect&#8217;s the readability of the code as I am used to reviewing the var section of a method for a guide to what types are used within a method.</p>
<p>LINQ can also be used with XML. The below example takes our previous sample and reads the data from an XML file instead: </p>
<pre class="brush: delphi;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;albums&gt;
		&lt;album&gt;
			&lt;artist&gt;Kanye West&lt;/artist&gt;
			&lt;title&gt;808s and Heartbreak&lt;/title&gt;
			&lt;albumyear&gt;2008&lt;/albumyear&gt;
		&lt;/album&gt;
		&lt;album&gt;
			&lt;artist&gt;Kanye West&lt;/artist&gt;
			&lt;title&gt;Graduation&lt;/title&gt;
			&lt;albumyear&gt;2007&lt;/albumyear&gt;
		&lt;/album&gt;
		&lt;album&gt;
			&lt;artist&gt;Nas&lt;/artist&gt;
			&lt;title&gt;Unartistd&lt;/title&gt;
			&lt;albumyear&gt;2008&lt;/albumyear&gt;
		&lt;/album&gt;
		&lt;album&gt;
			&lt;artist&gt;Notorious OST&lt;/artist&gt;
			&lt;title&gt;The Notorious B.I.G.&lt;/title&gt;
			&lt;albumyear&gt;2009&lt;/albumyear&gt;
		&lt;/album&gt;
&lt;/albums&gt;
</pre>
<pre class="brush: delphi;">

var
  AlbumData: XDocument;
begin
  // Load our XML Document with a System.Xml.Linq.XDocument
  AlbumData := XDocument.Load('../../albums.xml');

  // Query for albums in the year 2008
  var AlbumsLastYear := from Album in AlbumData.Descendants('album') where Album.Element('albumyear').Value = '2008' select Album;

  for Album in AlbumsLastYear do
  begin
    var s := String.Format('{0} - {1} ({2})', Album.Element('artist').Value, Album.Element('title').Value , Album.Element('albumyear').Value);
    lbFoundAlbums.Items.Add(s);
  end;
</pre>
<p> </p>
<p>Another new language feature that I like in principle but will completely admit to not fully understanding yet is <a href="http://prismwiki.codegear.com/en/Anonymous_Methods_and_Delegates">Anonymous Methods and Delegates</a> which make executing code with different threads much easier. Sadly in my brief testing of Anonymous methods I discovered that they are only available in projects which link to the .NET Framework 3.0 and above (and, in my case, only WPF projects). In order to execute our ListBox adding code from the first code sample as an Anonymous Delegate you can do the following:</p>
<pre class="brush: delphi;">
// Add the result to our listbox
for Album in AlbumsLastYear do
begin
  Dispatcher.Invoke(DispatcherPriority.ApplicationIdle, method(MyAlbum : MusicAlbum);
      begin
      lbFoundAlbums.Items.Add(MyAlbum.Artist + ' - ' + MyAlbum.Name + ' (' + MyAlbum.AlbumYear + ')');
      end, Album);
end;
</pre>
<p>This means that the compiler declares a delegate with a signature matching our anonymous method and we have now easily executed this code within a seperate thread with a minimum of code.</p>
<p>There are several new language features which I personally have no use for but which facilitate the use of the Microsoft Parallels framework such as <a href="http://prismwiki.codegear.com/en/Futures">Futures</a> and <a href="http://prismwiki.codegear.com/en/Sequences">Parallel sequences</a>. Delphi Prism also supports Generics and as well as most of the standard Delphi Win32 syntax.<br />
 <br />
There are also lots of small additions that aren&#8217;t .NET features per-se but demonstrate the usefulness of freeing the Prism compiler and allowing more rapid progression such as <a href="http://prismwiki.codegear.com/en/Boolean_Double_Comparison">Double Boolean Expressions</a>. I&#8217;m sure we&#8217;ve all written a statement like this before:<strong> if</strong> (cost > 400) <strong>and</strong> (cost < 600) <strong>then</strong>. In Delphi Prism this can also be written as: <strong>if</strong> 400 < cost < 600 <strong>then</strong>. </p>
<p>As I quickly discovered whilst going through the Delphi Prism Wiki: the language changes to Delphi Prism were easier to adapt to and to learn than I had originally imagined. The New language features gained mostly did not affect my coding style too much <strong>so any developers who were concerned that Delphi Prism is nothing like Delphi have nothing</strong> to worry about. Many of the new features are useful for compatibility with the .NET Framework and will be a natural fit for existing Delphi or .NET Developers</p>
]]></content:encoded>
			<wfw:commentRss>http://jamiei.com/blog/2009/01/new-language-features-in-delphi-prism/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Migrating a Project to Delphi Prism from Delphi.NET</title>
		<link>http://jamiei.com/blog/2008/12/migrating-a-project-to-delphi-prism-from-delphinet/</link>
		<comments>http://jamiei.com/blog/2008/12/migrating-a-project-to-delphi-prism-from-delphinet/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 16:25:04 +0000</pubDate>
		<dc:creator>jamiei</dc:creator>
				<category><![CDATA[.NET General]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Delphi Prism]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Windows Development]]></category>
		<category><![CDATA[codegear]]></category>
		<category><![CDATA[delphi prism]]></category>
		<category><![CDATA[project conversion]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://jamiei.com/blog/?p=59</guid>
		<description><![CDATA[As we know, now that the future of Delphi.NET is Delphi Prism (based on the RemObjects Oxygene compiler) we have to migrate our Delphi.NET projects to be compatible with the Prism compiler. The Easiest way to get started is to look at the free Oxidizer tool provided on the RemObjects Wiki. The tool helps with [...]]]></description>
			<content:encoded><![CDATA[<p>As we know, now that the future of Delphi.NET is <a href="http://www.codegear.com/products/delphi/prism">Delphi Prism</a> (based on the <a href="http://www.remobjects.com">RemObjects Oxygene</a> compiler) we have to migrate our Delphi.NET projects to be compatible with the Prism compiler.<a href="http://www.codegear.com/products/delphi/prism"><img class="alignright" title="Codegear Delphi Prism Logo " src="http://www.codegear.com/article/38820/images/38820/prism.png" alt="" width="112" height="75" /></a></p>
<p>The Easiest way to get started is to look at the free <a href="http://prismwiki.codegear.com/en/Oxidizer">Oxidizer tool</a> provided on the <a href="http://prismwiki.codegear.com/en/Main_Page">RemObjects Wiki</a>. The tool helps with the conversion of Delphi Win32 projects to Delphi Prism (but I&#8217;m uncertain about how it performs on Delphi.NET to Delphi Prism). The Wiki is also an excellent place to get started, particularly the pages on <a href="http://prismwiki.codegear.com/en/Win32_Delphi_vs._Delphi_Prism">Delphi Win32 vs Delphi Prism</a> which list the major incompatibilities between the two languages. </p>
<p> </p>
<p>Whilst converting my Delphi.NET Library for accessing Twitter, I encountered a few basic hints and tips which I felt I should share here:</p>
<ul>
<li>You need to specify the <strong>namespace</strong> keyword at the top of your unit file instead of the <strong>unit</strong> keyword. The first time I tried to compile after doing this Prism still complained about not having a namespace keyword present, this was fixed by closing the solution and re-opening.</li>
<li>Delphi Prism automatically makes classes that are not explicitly marked otherwise as <strong>strict private</strong>. This meant that I had to go through my library and mark all classes that I wanted to make public. eg. <em>TMyClass = <strong>public </strong>class(System.Object);</em></li>
<li>The <strong>overload</strong> keyword isn&#8217;t neccesary as overloading is now implicit. This isn&#8217;t a problem at all and isn&#8217;t dificult to fix as it simply meant doing a Search and Replace for the overload keyword and removing it.</li>
<li><strong>TObject </strong>no long exists and instead needs to be replaced with <strong>System.Object</strong> which has much the same properties. </li>
<li>I encountered a few problems with the use of <strong>for .. in</strong> loops. It would seem that Delphi Prism loop variables are local to the loop and therefore should be declared at the beginning of the loop (see the <a href="http://prismwiki.codegear.com/en/For_(keyword)">for</a> wiki page for more info). In reality this meant changing: <strong><em>for </em></strong><em>strItem </em><strong><em>in</em></strong><em> list </em><strong><em>do </em><span style="font-weight: normal;">to<em> </em><strong><em>for </em></strong><em>strItem: string </em></span><em>in</em><span style="font-weight: normal;"><em> list </em><strong><em>do</em></strong> and then removing the </span>strItem: string; <span style="font-weight: normal;">declaration in the method var section.</span></strong></li>
<li>The <strong>TObject.Create([...]);</strong> constructor still exists however it is now <a href="http://prismwiki.codegear.com/en/New_(keyword)">recommended</a> that you switch to the <strong>new Object([..]) </strong>keyword for new projects. This may come as a shock to traditional Delphi&#8217;ers who have been <strong>.Create()</strong>&#8216;ing since the dawn of Borland but this is the construction method that sems to fit in with the .NET framework better. There is also a compatibility flag in the Project properties which allows the compiler to work some magic to allow .Create to continue to function.</li>
</ul>
<p>These are not the only changes that you will probably need to make but I found them to be a good starting point. You should definitely consult the <a href="http://prismwiki.codegear.com/en/Main_Page">Prism Wiki</a> for help in which I was able to find answers very quickly (no wading boots required!).</p>
<p>Lastly: My project could do with a lot of refactoring in order to take advatages of the unique language features of Prism. This will take considerably more time as it means learning the new language features first!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamiei.com/blog/2008/12/migrating-a-project-to-delphi-prism-from-delphinet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Homecamp 08</title>
		<link>http://jamiei.com/blog/2008/12/homecamp-08/</link>
		<comments>http://jamiei.com/blog/2008/12/homecamp-08/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 13:19:47 +0000</pubDate>
		<dc:creator>jamiei</dc:creator>
				<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Much ado about Nothing]]></category>
		<category><![CDATA[Windows Development]]></category>
		<category><![CDATA[currentcost]]></category>
		<category><![CDATA[Home Monitoring]]></category>
		<category><![CDATA[homecamp]]></category>

		<guid isPermaLink="false">http://jamiei.com/wordpress/?p=47</guid>
		<description><![CDATA[  I spent all day last Saturday at Homecamp at the Electrical Engineering building at Imperial College London. Homecamp is effectively a hack-day about Home monitoring, home automation reducing energy and energy resource requirements in your home. Previous to hearing of the day, I had become interested in these subjects because I had seen Andy [...]]]></description>
			<content:encoded><![CDATA[<p> </p>
<div id="attachment_46" class="wp-caption alignright" style="width: 310px"><a href="http://jamiei.com/wordpress/wp-content/uploads/2008/12/homecamp.png"><img class="size-medium wp-image-46" title="Homecamp Logo" src="http://jamiei.com/wordpress/wp-content/uploads/2008/12/homecamp.png" alt="A logo for homecamp, created by @ribotminimus" width="300" height="300" /></a><p class="wp-caption-text">A logo for homecamp, created by @ribotminimus</p></div>
<p>I spent all day last Saturday at <a href="http://homecamp.pbwiki.com/">Homecamp</a> at the Electrical Engineering building at Imperial College London. Homecamp is effectively a hack-day about Home monitoring, home automation reducing energy and energy resource requirements in your home.</p>
<p>Previous to hearing of the day, I had become interested in these subjects because I had seen <a href="http://andypiper.wordpress.com/">Andy Piper</a>&#8216;s <a href="http://www.currentcost.co.uk">Current Cost</a> posts and the associated IBM&#8217;ers who had been doing some <a href="http://code.google.com/p/currentcost/">fantastic work</a> on providing code libraries for accessing the Current Cost data. The CurrentCost unit is a great little electricity usage monitoring unit that is available to <a href="http://stores.ebay.co.uk/Current-Cost-Ltd">buy</a> on eBay for about £40. Whilst a large amount of our discussion from that day did revolve around the CurrentCost unit, it was not the limit of our discussion in anyway (discussion around this was easy because it&#8217;s a cool little unit that is low-cost and easy to extract data from!).</p>
<p> </p>
<p>The Day began with <a href="http://dalelane.co.uk/blog/">Dale Lane</a> and <a href="http://twitter.com/yellowpark">Chris Dalby</a> who had organised the day distributing name labels and wireless keys and asked us to give suggestions for sessions. We also had a quick word from <a href="http://www.redmonk.com/jgovernor/">James Govenor (</a><a href="http://twitter.com/monkchips">@monkchips</a>) who was generously sponsoring the event via his <a href="http://greenmonk.net/">GreenMonk</a> consultancy. </p>
<p>The First talk of the day was from Andy Stanford-Clark who is a Master Inventor at IBM. As one might expect, Andy&#8217;s own house is a geeks dream (<a href="http://twitter.com/andy_house">it even twitters!</a>). Almost everything that can be is monitored and automated, even to the mouse traps that are set in his loft which text him or his family when a mousetrap is set off or the cheese used as bait has gone off. He measured his water usage by requesting a new meter which had a magnetised needle, thus allowing him to setup a device which gets a signal every time the needle rotates. Andy was also a big advocate of the <a href="http://mqtt.org/">MQTT</a> protocol which he uses for client projects with IBM and as the central messaging service for his house works. MQTT is a Publish-Subscribe protocol which makes it ideal for things like the house networks that we were talking about. He also mentioned the use of <a href="http://en.wikipedia.org/wiki/X10_(industry_standard)">X10</a> and <a href="http://www.zigbee.org">ZigBee</a> in controlling almost device or system in the house. You can see Andy&#8217;s full talk in the <a href="http://www.viddler.com/explore/andypiper/videos/21/">video</a> that Andy Piper made.</p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.flickr.com/photos/andypiper/3069644362/"><img title="James Governor and the agenda" src="http://farm4.static.flickr.com/3293/3069644362_55c6f4bd0f.jpg?v=0" alt="Photo credit: Andy Piper" width="500" height="281" /></a><p class="wp-caption-text">Photo credit: Andy Piper</p></div>
<p><a href="http://www.joeshort.net/">Joe Short</a> and <a href="http://pbjots.blogspot.com/">Phoebe Bright</a> then did a talk on <a href="http://www.dynamicdemand.co.uk/">Dynamic Demand</a>. This is essentially about smoothing out the hour by hour and minute by minute variations in power demands on the national grid. This is important becuase peak time power requirements mean that power companies have to bring very expensive and very environmentally damaging types of power generator online. We discussed about how this requires social change and we discussed dynamic energy pricing as a method of bringing about this change. In Italy for example the government required dynamic pricing smart meters to be installed in every house. This means that people are rewarded for putting their tumble dryer (if you needed a tumble dryer in a hot country like italy!) on at 3am in the morning when electricity is considerably cheaper. The general message here seemed to be that we have limited scope for activity here until we can push suppliers for dynamic pricing. This will take some time but once this is done, you can for example program washing machines to automatically start when the national price of electricity is at it&#8217;s cheapest throughout the day (very cool).  </p>
<p>Dale Lane took us through some of the ways in which the IBM Hursley users of the CurrentCost units have been trying to address the social aspects of getting people to use less electricity. They have been working on a realtime site for sharing and contrasting data from their units and would like to start creating some XBox live style point scoring awards. This would mean awards for biggest 1 day improvement or lowest house rest point. </p>
<p>We also had a talk from <a href="http://knolleary.net/">Nicholas O&#8217;Leary</a> who gave an interesting talk about the potential for <a href="http://www.arduino.cc/">Arduino</a> use in the home. The Arduino is an open-source electronics platform that allows the flexibility to program and build low cost sensor inputs (light, heat, magnetic etc) to interact with a number of outputs. Nick showed us an ambient orb that he had built to show the amount of power his house is using at that particular moment. It glows green, yellow or red depending on whether the house electricity usage falls within certain limits. You can buy arduino units and shields from a number of sources but I am planning on getting a starter kit which should be back in stock soon at <a href="http://tinker.it/">tinker.it</a>. </p>
<p>There was discussion in both Andy&#8217;s talk and Nick&#8217;s talk about how you could end up consuming more power by measuring and monitoring your home by the time you&#8217;ve got a server plugged into all manner of electrical monitoring devices. We discussed the <a href="http://www.viglen.co.uk/viglen/Products_Services/Product_Range/Product_file.aspx?eCode=XUBUMPCL&amp;Type_Info=Description&amp;Type=Desktops">Viglen MPC-L</a> device which runs on a rediculously small amount of electricity usage (there was some discussion of costing you approx £10 per year on electicity usage). The Arduino can be powered with a normal 9V battery.</p>
<p> </p>
<p>We also had a presentation from the <a href="http://www.pachube.com/">Patchube</a> (Patch-U-Bay) folks who were explaining about how you can get data in to the site and the various ways you use and share that information. I could see a lot of potential for this site but first I need to generate some data to share!</p>
<p> </p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.flickr.com/photos/andypiper/3068813725/"><img title="The Audience" src="http://farm4.static.flickr.com/3286/3068813725_b9fa896e28.jpg?v=0" alt="Photo Credit: Andy Piper" width="500" height="321" /></a><p class="wp-caption-text">Photo Credit: Andy Piper</p></div>
<p>Overall I had a very inspiring day and met some extremely interesting people from all manner of backgrounds, interests and areas. It was nice to meet so many people who I had interacted with on Twitter and some who I had never met before but whom I shall certainly be looking forward to meeting again soon. I will be ordering all sorts of kit to play with as a result of the talks given at Homecamp and so the day will almost certainly cost me a lot of money in gadgets and time in the future but at least I will have a lot of fun doing it! The first thing I will be doing is writing a native Delphi library for the CurrentCost unit and contributing that to the <a href="http://code.google.com/p/currentcost">Google Code</a> Repository. There is another Homecamp planned for March which I hope that I will be around for again and this time able to contribute some ideas and projects towards it.</p>
<p> </p>
<p>Thank-you to <a href="http://twitter.com/yellowpark">Chris Dalby</a>, <a href="http://dalelane.co.uk/blog/">Dale Lane</a> and <a href="http://www.redmonk.com/jgovernor/">James Governor</a> for their work in setting up the day and to everyone who presented or otherwise contributed to the day. I can&#8217;t wait to share what I do as a result of the inspiration that the first day gave me!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamiei.com/blog/2008/12/homecamp-08/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A New Beginning for Delphi</title>
		<link>http://jamiei.com/blog/2008/11/a-new-beginning-for-delphi/</link>
		<comments>http://jamiei.com/blog/2008/11/a-new-beginning-for-delphi/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 19:46:08 +0000</pubDate>
		<dc:creator>jamiei</dc:creator>
				<category><![CDATA[.NET General]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[codegear]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[delphi prism]]></category>
		<category><![CDATA[marketing]]></category>

		<guid isPermaLink="false">http://jamiei.com/wordpress/?p=40</guid>
		<description><![CDATA[Delphi programming is currently being rejuvenated on so many different levels. I was pleased to see that in the November 2008 TIOBE Index of Programming Languages Delphi shot up to 8th place (only .020% behind c#). I believe that this is partially on the excellent efforts of my good friend Jim McKeeth whose community herding has helped [...]]]></description>
			<content:encoded><![CDATA[<p>Delphi programming is currently being rejuvenated on so many different levels. I was pleased to see that in the <a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">November 2008</a> TIOBE Index of Programming Languages Delphi shot up to 8th place (only .020% behind c#). I believe that this is partially on the excellent efforts of my good friend <a href="http://www.delphi.org">Jim McKeeth</a> whose community <a href="http://www.delphi.org/2008/10/delphi-language-of-the-year-2008/">herding</a> has helped out Delphi community to become more visible (&#8220;Delphi Programming&#8221; is simply not a phrase we were used to using!) and partially because of the excellent reviews and community <em>noise</em> that Delphi 2009 is receiving!</p>
<p><a href="http://www.codegear.com/products/delphi/prism">Delphi Prism</a> was announced finally at the Microsoft PDC where we discovered (or some of us) that Delphi Prism is the new Delphi .NET Development solution which drops the slightly crippled compatibility approach that Delphi used to employ and instead fits within the Visual Studio IDE. Delphi Prism now supports all the latest and greatest .NET technologies including WPF, LINQ and Various Language methods. They&#8217;ve achieved this by making use of the extremely cool <a href="http://www.remobjects.com">RemObjects</a> <a href="http://wiki.remobjects.com/wiki/Oxygene">Oxygene</a> Compiler which I would highly recommend that you investigate right away if you&#8217;re interested at all in .NET Development! I will be doing a post soon to discuss some of my favourite new Delphi Prism language features!</p>
<p> </p>
<p>This rejuvenation of Delphi is causing a product marketing effect and is slowly gathering momentum and I fully intend on doing whatever I can to generate enthusiasm for the Delphi Programming Community. This concept of User-led marketing has been widespread for many years as Apple fans will testify. As part of this I have a new project in mind for the Delphi community and will be explaining this in due course. I will certainly require Delphi enthusiasts to help with this venture, if you&#8217;re interested then please contact me.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamiei.com/blog/2008/11/a-new-beginning-for-delphi/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.796 seconds -->
