<?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>Olaf's Thoughts About Development &#187; .NET</title>
	<atom:link href="http://www.monien.net/blog/index.php/category/development/dotnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.monien.net/blog</link>
	<description>Delphi Programming, .NET Philosophy, Web development and more ...</description>
	<lastBuildDate>Wed, 21 Jul 2010 10:55:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>DelphiLive! 2009 &#8211; The Delphi Developer Conference!</title>
		<link>http://www.monien.net/blog/index.php/2009/03/delphilive-2009-the-delphi-developer-conference/</link>
		<comments>http://www.monien.net/blog/index.php/2009/03/delphilive-2009-the-delphi-developer-conference/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 08:38:30 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[IntraWeb]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[CodeGear]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[DelphiLive]]></category>
		<category><![CDATA[Embarcadero]]></category>
		<category><![CDATA[San Jose]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/index.php/2009/03/delphilive-2009-the-delphi-developer-conference/</guid>
		<description><![CDATA[&#160; After quite a while there will be a face-to-face Delphi Developer conference in the US again. The conference is organized by S&#38;S Media and supported by Embarcadero/CodeGear. We have got all the top speakers, including Cary Jensson, Marco Cantu and Ray Konopka. Many (most?) members of Delphi R&#38;D team (including Barry Kelly &#8211; “The [...]]]></description>
			<content:encoded><![CDATA[<p>&#160; After quite a while there will be a face-to-face Delphi Developer conference in the US again.</p>
<p>The conference is organized by <a href="http://software-support.biz/zonen/sus/psecom,id,1,nodeid,1,p,0,_language,en.html" target="_blank">S&amp;S Media</a> and supported by <a href="http://www.codegear.com" target="_blank">Embarcadero/CodeGear</a>.</p>
<p>We have got all the top speakers, including Cary Jensson, Marco Cantu and Ray Konopka.</p>
<p>Many (most?) members of Delphi R&amp;D team (including Barry Kelly &#8211; “The Delphi Compiler”) will be at the conference and there will be of course &quot;Meet the Team&quot; sessions.</p>
<p>All <a href="http://www.delphilive.com/conferences/delphi_live/session/" target="_blank">Sessions</a> are online and <a href="https://www.entwickler.com/ssl/formtool/index.php?id=14&amp;lang=en" target="_blank">registration</a> is now open. The <a href="http://www.delphilive.com/conferences/delphi_live/speaker/" target="_blank">speakers list</a> includes all those who already submitted their bio and photo. For a complete list of speakers please refer to the list of sessions for now.</p>
<p>If you register before April 10th, 2009, then you can take advantage of the Early Bird rebates.</p>
<p><a href="http://www.delphilive.com" target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="DelphiLive" border="0" alt="DelphiLive" align="left" src="http://www.monien.net/blog/wp-content/uploads/2009/03/delphilive.png" width="244" height="68" /></a></p>
<p>When : May 13 &#8211; 16, 2009   <br />Where: San Jose, CA, USA</p>
<p>More information: <a href="http://www.delphilive.com" target="_blank">www.delphilive.com</a></p>
<p>S&amp;S Media is a book/magazine publisher and software conference organizer. S&amp;S is well known in the Delphi community for their Delphi focused &quot;EKON&quot; conferences and &quot;Entwickler&quot; magazines.</p>
<p>For comments, questions or concerns you may use the contact form on the <a href="http://www.delphilive.com" target="_blank">DelphiLive web site</a>, or just leave a comment here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2009/03/delphilive-2009-the-delphi-developer-conference/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>DelphiLive 2009 &#8211; Physical Delphi Conference in the US</title>
		<link>http://www.monien.net/blog/index.php/2009/01/delphilive-2009-physical-delphi-conference-in-the-us/</link>
		<comments>http://www.monien.net/blog/index.php/2009/01/delphilive-2009-physical-delphi-conference-in-the-us/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 14:54:55 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[IntraWeb]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[CodeGear]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[delphi developers]]></category>
		<category><![CDATA[Delphi Prism]]></category>
		<category><![CDATA[delphi win 32]]></category>
		<category><![CDATA[DelphiLive]]></category>
		<category><![CDATA[Embarcadero]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[San Jose]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/?p=228</guid>
		<description><![CDATA[Update: Sessions are online and registration is open now: www.delphilive.com As an Advisory Board member I am proud to post this official pre-announcement for the next, long awaited physical Delphi conference. Where: San Jose, CA, USA When: May 13th – 16th 2009 Who: All Delphi developers, let it be Delphi Win 32, Delphi Prism or [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: Sessions are online and registration is open now:</strong> <a href="http://www.delphilive.com" target="_blank">www.delphilive.com</a></p>
<p>As an Advisory Board member I am proud to post this official pre-announcement for the next, long awaited physical Delphi conference.</p>
<p><a href="http://www.delphilive.com" target="_blank"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="Logo" src="http://www.monien.net/blog/wp-content/uploads/lw/DelphiLive2009PhysicalDelphiConferencein_DFBD/Logo_thumb.gif" border="0" alt="Logo" width="244" height="57" /></a></p>
<p><strong>Where: San Jose, CA, USA<br />
</strong><strong>When: May 13th – 16th 2009<br />
Who: All Delphi developers, let it be Delphi Win 32, Delphi Prism or Delphi for PHP ones.</strong></p>
<p><span id="more-228"></span></p>
<p>We will try to get all the known top speakers, from the US and Overseas to make this event absolutely rocking. The conference will be organized by <a href="http://software-support.biz/zonen/sus/psecom,id,1,nodeid,1,p,0,_language,en.html">Software &amp; Support Verlag</a>, supported by CodeGear / Embarcadero. San Jose was chosen as location as it is close to CodeGear’s HQ, so that CodeGear staff can show up easily.</p>
<h3>Attendees</h3>
<p>For now, block this event in your calendar if you are interested. We will keep the price affordable – details will be posted asap.</p>
<p>To register, please go to the DelphiLive 2009 Website – which will go online in the next two weeks. We will send announcement emails through CodeGear’s Developer Network as soon as registration is open. Make sure you are signed up at <a href="http://dn.codegear.com/">CodeGear Developer Network</a> and CDN emails are not blocked by your spam filters.</p>
<h3>Speakers</h3>
<p>If you want to present sessions at Delphi Live 2009, then please stay tuned for the official Call For Papers, which will be made public in the next 2 days or so.</p>
<h3>Topics</h3>
<p>We will cover from basics to advanced topics all around Delphi. The final topic list will be made available as soon as the call for papers is closed.</p>
<p>Following is a draft of tracks:</p>
<ul>
<li>Architecture / Design</li>
<li>OOP</li>
<li>Database</li>
<li>IDE, Tools &amp; Components</li>
<li>Core Development</li>
<li>Basics / Fundamentals</li>
<li>Native Delphi</li>
<li>Delphi Prism</li>
<li>Delphi &amp; .NET</li>
<li>Delphi &amp; Web</li>
<li>Delphi &amp; PHP</li>
<li>Delphi &amp; Ruby on Rails</li>
</ul>
<p>If you have suggestions for specific topics you would like to be covered (and which you do not want to present yourself), then feel free to post these suggestions as comments to this blog. The same goes for speakers which you would definitely like to see in San Jose.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2009/01/delphilive-2009-physical-delphi-conference-in-the-us/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Implicit Fields and Inline Expressions in Delphi Prism Simplify Property Design</title>
		<link>http://www.monien.net/blog/index.php/2008/12/implicit-fields-and-inline-expressions-in-delphi-prism-simplify-property-design/</link>
		<comments>http://www.monien.net/blog/index.php/2008/12/implicit-fields-and-inline-expressions-in-delphi-prism-simplify-property-design/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 12:00:53 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Delphi Prism]]></category>
		<category><![CDATA[IL]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Pascal]]></category>
		<category><![CDATA[prism]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/?p=226</guid>
		<description><![CDATA[In OOP, we are using Properties to be able to limit access to class members, or to have &#8220;calculated&#8221; values.  In Delphi Native Pascal, a class with 3 properties may look like this: TEmployee = class(TPerson) private FHoursPerWeek: Double; FWeeklyRate: Double; FHourlyRate: Double; procedure SetHourlyRate(const Value: Double); procedure SetHoursPerWeek(const Value: Double); function GetWeeklyRate: Double; public [...]]]></description>
			<content:encoded><![CDATA[<p>In OOP, we are using Properties to be able to limit access to class members, or to have &#8220;calculated&#8221; values.  In Delphi Native Pascal, a class with 3 properties may look like this:</p>
<p><span id="more-226"></span></p>
<pre class="brush: delphi">

TEmployee = class(TPerson)
private
FHoursPerWeek: Double;
FWeeklyRate: Double;
FHourlyRate: Double;
procedure SetHourlyRate(const Value: Double);
procedure SetHoursPerWeek(const Value: Double);
function GetWeeklyRate: Double;
public
property HourlyRate: Double read FHourlyRate write SetHourlyRate;
property HoursPerWeek: Double read FHoursPerWeek write SetHoursPerWeek;
property WeeklyRate: Double read GetWeeklyRate;
end;

...

{ TEmployee }

function TEmployee.GetWeeklyRate: Double;
begin
Result := HourlyRate * HoursPerWeek;
end;

procedure TEmployee.SetHourlyRate(const Value: Double);
begin
FHourlyRate := Value;
end;

procedure TEmployee.SetHoursPerWeek(const Value: Double);
begin
FHoursPerWeek := Value;
end;
</pre>
<p>In the example above &#8220;HourlyRate&#8221; is what an employee get&#8217;s paid per hour. This value can be read and set. &#8220;WeeklyRate&#8221; is a read/only calculated value, which depends on &#8220;HourlyRate&#8221; and &#8220;HoursPerWeek&#8221;.</p>
<p>This all looks fine and we know how to deal with that since years. And it works the same way in Delphi Prism.</p>
<p>But sometimes, when you design a new class, do you always follow the &#8220;property-hides-field&#8221; pattern? Even if Delphi makes life easy with &#8220;Ctrl-Shift-C&#8221;, the code may look pretty much bloated, esp. if you have standard properties, not doing anything special. So you might just use &#8220;simple&#8221; Fields where possible. This is bad design of course, as if you need to change to a &#8220;real&#8221; property later, because you need to calculate something in a get or set method, you would have to change your classes signature, which may break compatibility &#8230;</p>
<p>Delphi Prism introduces two new language features to Pascal, which may prevent code from bloating and actually helps readability.</p>
<h3>Implicit Fields</h3>
<p>Implicit fields are fields which are created by the compiler automatically for properties which do not have any read or write accessors.</p>
<p>This is how the example would look like using implicit fields:</p>
<pre class="brush: delphi">

TEmployee = class(TPerson)
private
FWeeklyRate: Double;
function GetWeeklyRate: Double;
public
property HourlyRate: Double;
property HoursPerWeek: Double;
property WeeklyRate: Double read GetWeeklyRate;
end;
implementation

{ TEmployee }
function TEmployee.GetWeeklyRate: Double;
begin
Result := HourlyRate * HoursPerWeek;
end;
</pre>
<p>So this already look much less bloated. <span style="text-decoration: line-through;">Implicit fields are not an invention of Delphi Prism though, but they were introduced with C# 3.0</span> Implicit Fields exist in Prism since 2004. They were introduced to C# 3.0 just a moment later, in 2008 <img src='http://www.monien.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  , and they are called <a title="Auto-Implemented Properties" href="http://msdn.microsoft.com/en-us/library/bb384054.aspx">Auto-Implemented Properties</a> here. The beauty of Pascal gets apparent though, once you compare Prism&#8217;s syntax with its C# equivalent:</p>
<pre class="brush: csharp">

class TEmployee
{
public Double HourlyRate {get; set;}
public Double HoursPerWeek {get; set;}

...
}
</pre>
<p>In Pascal there is no need to write these &#8220;stub&#8221; get and set calls.</p>
<p>Technically, it&#8217;s important to notice that Prism automatically creates a &#8220;get&#8221; and &#8220;set&#8221; method, plus a hidden private field for these properties. These hidden fields cannot be accessed in the classes code,  just use the Property itself everywhere. If you are not convinced that there are really hidden fields, then lets have a look at the IL code behind that (extracted using Red Gate&#8217;s Reflector):</p>
<pre class="brush: php">

.method public hidebysig specialname instance void set_HoursPerWeek(float64 &#039;value&#039;) cil managed
{
.maxstack 3
L_0000: ldarg.0
L_0001: ldarg.1
L_0002: stfld float64 WindowsApplication5.TEmployee::@p_HoursPerWeek
L_0007: ret
}
</pre>
<p>The field gets obviously hidden by using &#8220;@&#8221; in it&#8217;s name which is not valid for Pascal, thus cannot be accessed. In C#, they are using brackets in the hidden private field name for the same purpose:</p>
<p>&lt;HoursPerWeek&gt;k__BackingField</p>
<h3>Inline Expressions</h3>
<p>With inline expressions you can make the code look even nicer. And best of all, to my knowledge there is no C# equivalent <img src='http://www.monien.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Inline expressions may be used directly after the &#8220;read&#8221; keyword. This may drastically improve the readability of your code. Compare the final code example with the one at the very top!</p>
<pre class="brush: delphi">

TEmployee = class(TPerson)
public
property HourlyRate: Double;
property HoursPerWeek: Double;
property WeeklyRate: Double read HourlyRate * HoursPerWeek;
end;
</pre>
<p>Yes, this the complete TEmployee definition. No further implementation needed. Just 6 Lines, compared to the initial roughly 25 ones!</p>
<p>The <a title="Delphi Prism Wiki" href="http://prismwiki.codegear.com/en/Properties">Delphi Prism Wiki</a> has an entry about &#8220;Class Properties&#8221;, which explains a few more details. (The &#8220;Implicit Fields&#8221; feature is a bit &#8220;hidden&#8221; though)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2008/12/implicit-fields-and-inline-expressions-in-delphi-prism-simplify-property-design/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Delphi can even LINQ to SQL!</title>
		<link>http://www.monien.net/blog/index.php/2008/12/delphi-can-even-linq-to-sql/</link>
		<comments>http://www.monien.net/blog/index.php/2008/12/delphi-can-even-linq-to-sql/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 15:04:02 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[CodeGear]]></category>
		<category><![CDATA[Delphi Prism]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[LINQ to SQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/?p=225</guid>
		<description><![CDATA[As there is obviously still some uncertainty if Delphi Prism is really a fully fledged .NET development environment, I&#8217;m posting an example below to prove that Prism does allow you to LINQ to SQL: This is a &#8220;Customer&#8221; class definition with a manual mapping to a &#8220;Customers&#8221; table on a SQL Server 2005: type [Table(Name [...]]]></description>
			<content:encoded><![CDATA[<p>As there is obviously still some uncertainty if Delphi Prism is really a fully fledged .NET development environment, I&#8217;m posting an example below to prove that Prism does allow you to LINQ to SQL:</p>
<p>This is a &#8220;Customer&#8221; class definition with a manual mapping to a  &#8220;Customers&#8221; table on a SQL Server 2005:</p>
<pre class="brush: delphi">

type
[Table(Name := &#039;Customers&#039;)]
Customer = class(Object)
private
protected
public
[Column(IsPrimaryKey := true)]
property CustNo:Double;
[Column]
property Name: String;
[Column]
property Country: String;
end;
</pre>
<p>This is the actual LINQ to SQL code that relies on the class definition above:</p>
<pre class="brush: delphi">

method MainForm.button2_Click(sender: System.Object; e: System.EventArgs);
var
LCustomers: Table&lt;Customer&gt;;
LDBMain: DataContext;
LConnectionString:String;
begin
LConnectionString := &#039;Data Source=.\SQLEXPRESS;Initial Catalog=DBDEMOS;Integrated Security=True&#039;;
LDBMain := new DataContext(LConnectionString);
LCustomers := LDBMain.GetTable&lt;Customer&gt;();
var USCustomers := from Customer in LCustomers where Customer.Country = &#039;US&#039; select Customer;

for each Customer in USCustomers do begin
listBox1.Items.Add(Customer.Name);
end;
end;
</pre>
<p>Interesting to note is that Prism has a very nice name scope mechanism. Even though &#8220;Customer&#8221; is a Class name, it is also used as local variable in the LINQ and FOR constructs. I am not saying that this is a good practice though <img src='http://www.monien.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Technically, both &#8220;Customer&#8221; variables are <em>different</em> variables &#8211; which is quite important to understand.</p>
<p>The full demo source can be downloaded here: [download#2].</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2008/12/delphi-can-even-linq-to-sql/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Delphi can do LINQ!</title>
		<link>http://www.monien.net/blog/index.php/2008/12/delphi-can-do-linq/</link>
		<comments>http://www.monien.net/blog/index.php/2008/12/delphi-can-do-linq/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 11:29:08 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[.net]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/?p=223</guid>
		<description><![CDATA[There are a couple of people who have asked if LINQ can be used with the new Delphi .NET version aka Delphi Prism.  The cool thing is that with Prism you can utilize all available .NET technologies. LINQ though, requires some additional compiler support &#8211; to allow for the &#8220;compilable query statements&#8221;. The good news [...]]]></description>
			<content:encoded><![CDATA[<p>There are a couple of people who have asked if LINQ can be used with the new Delphi .NET version aka <a title="Delphi Prism" href="http://www.codegear.com/prism">Delphi Prism</a>.  The cool thing is that with Prism you can utilize all available .NET technologies. LINQ though, requires some additional compiler support &#8211; to allow for the &#8220;compilable query statements&#8221;.</p>
<p>The good news is, RemObjects implemented all required compiler support! Excellent!</p>
<p>See the simple example below:<br />
<span id="more-223"></span></p>
<pre class="brush: delphi">

method MainForm.button1_Click(sender: System.Object; e: System.EventArgs);
var
lCustomer: Customer;
lCustomers : List&lt;Customer&gt;;
begin
lCustomers := new List&lt;Customer&gt;;

lCustomer := new Customer;
lCustomer.Name := &#039;Olaf&#039;;
lCustomer.Country := &#039;Germany&#039;;
lCustomers.Add(lCustomer);

lCustomer := new Customer();
lCustomer.Name := &#039;Jim&#039;;
lCustomer.Country := &#039;USA&#039;;
lCustomers.Add(lCustomer);

//Inline declaration using type inference
var GermanCustomers :=
from Customer in LCustomers
where Customer.Country.Equals(&#039;Germany&#039;);

//Has nothing to do with LINQ, but that&#039;s type inference too:
for Customer in GermanCustomers do begin
listBox1.Items.Add(Customer.Name);
end;
end;
</pre>
<p>Interesting to notice is how the variables &#8220;GermanCustomers&#8221; and &#8220;Customers&#8221; are declared. They are both declared <em>inline </em>using <em>type inference</em> &#8211; which is one of the important enhancements over Delphi Win32.</p>
<p>See the <a title="Prism Wiki" href="http://prismwiki.codegear.com/en/LINQ">Prism Wiki</a> for details on LINQ.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2008/12/delphi-can-do-linq/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Enable Sync Editing in Delphi Prism</title>
		<link>http://www.monien.net/blog/index.php/2008/12/enable-sync-editing-in-delphi-prism/</link>
		<comments>http://www.monien.net/blog/index.php/2008/12/enable-sync-editing-in-delphi-prism/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 13:22:02 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[CodeGear]]></category>
		<category><![CDATA[CodeRush]]></category>
		<category><![CDATA[Delphi Prism]]></category>
		<category><![CDATA[DXCore]]></category>
		<category><![CDATA[refactor]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/index.php/2008/12/enable-sync-editing-in-delphi-prism/</guid>
		<description><![CDATA[Delphi Prism comes with a nice “Sync Editing” feature. Unfortunately it’s not enabled by default, because it relies on an external “DXCore” assembly, which is available as free download from DevExpress. This “Sync Edit” works for methods only currently, but it does that in a very intuitive way, you don’t have to remember any shortcuts, [...]]]></description>
			<content:encoded><![CDATA[<p>Delphi Prism comes with a nice “Sync Editing” feature. Unfortunately it’s not enabled by default, because it relies on an external “DXCore” assembly, which is available as free download from <a href="http://www.devexpress.com/Downloads/Visual_Studio_Add-in/DXCore/">DevExpress</a>. This “Sync Edit” works for methods only currently, but it does that in a very intuitive way, you don’t have to remember any shortcuts, just write. As little bonus it also gives you “animated bookmarks”. These bookmarks are used for example when you press <a href="http://prismwiki.codegear.com/en/Variable_Completion">CTRL-SHIFT-V</a> to declare a local variable or property (which depends on the name you give).</p>
<p>DevExpress is a component set and productivity plugin vendor who serves the VCL and .NET market. DXCore is a base library which is heavily used by their CodeRush and Refactor products.</p>
<p>To finally enable Sync Editing after installing DXCore you need to copy one file manually. Just follow the steps in this  <a href="http://prismwiki.codegear.com/en/Sync_Editing">Prism Wiki article</a>.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="737" height="586" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.monien.net/jing/2008-12-08_1411.swf" /><embed type="application/x-shockwave-flash" width="737" height="586" src="http://www.monien.net/jing/2008-12-08_1411.swf"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2008/12/enable-sync-editing-in-delphi-prism/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi Prism: All New Delphi for .NET Edition Has Been Released</title>
		<link>http://www.monien.net/blog/index.php/2008/11/delphi-prism-all-new-delphi-for-net-edition-has-been-released/</link>
		<comments>http://www.monien.net/blog/index.php/2008/11/delphi-prism-all-new-delphi-for-net-edition-has-been-released/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 15:23:02 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[CodeGear]]></category>
		<category><![CDATA[Embarcadero]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/index.php/2008/11/delphi-prism-all-new-delphi-for-net-edition-has-been-released/</guid>
		<description><![CDATA[Apparently, CodeGear, a department of Embarcadero, has chosen Black Friday as release date for the all new .NET edition of Delphi: Delphi Prism Delphi&#160; Prism is basically a plugin for Visual Studio, which delivers the Pascal Language plus some exciting extra features to Microsoft’s .NET development platform. Get a trial version from CodeGear’s Code Central. [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently, <a href="http://www.codegear.com">CodeGear</a>, a department of <a href="http://www.embarcadero.com">Embarcadero</a>, has chosen Black Friday as release date for the all new .NET edition of Delphi:</p>
<h3>Delphi Prism</h3>
<p>Delphi&#160; Prism is basically a plugin for Visual Studio, which delivers the Pascal Language plus some exciting extra features to Microsoft’s .NET development platform.</p>
<p>Get a trial version from <a href="http://cc.codegear.com/Free.aspx?id=26309">CodeGear’s Code Central</a>. Delphi Prism is part of RAD Studio 2009,&#160; the ISO (1.4 GB!) offered for download on that page contains Prism only though. </p>
<p>Prism has to be activated by a license key. You can request a 14 day trial license on the same page and/or use a purchased RAD Studio 2009 license key. In other words the ISO contains the full product.</p>
<p>The <a href="http://www.codegear.com/products/delphi/prism">Prism product page</a> does not yet have a “purchase” link, but the marketing department is currently working on getting an announcement e-mail blown out. I guess that the purchase link will be activated while that happens. As the ISO contains the full product, you can switch from trial to full after the 14 days, just by entering a new license key.</p>
<h3>Technical Information</h3>
<p>Prism is not an upgrade of what you may know as Delphi.NET from RAD Studio 2007 or earlier. Prism is a complete new tool. It has been developed by a partner of CodeGear’s, RemObjects and comes as <em>the</em> solution for .NET and Mono in RAD Studio 2009. It completely “integrates” with the .NET framework. It does not bring any “Delphi Win32” dependencies. This means all executables/assemblies you will create with Prism will be “pure” .NET (or Mono) ones. No more P/invoke weirdness.</p>
<h3>Porting Delphi Applications</h3>
<p>The good news are: Prism Pascal is very compatible to Delphi Native Pascal. There are a couple of differences, which are well documented. </p>
<p>The bad news are: There is no VCL on Delphi Prism. In other words you can port business code more or less easily, but you have to re-implement your GUI code. After all I don’t think that’s&#160; too bad though. You have all .NET possibilities instead. System.Windows.Forms, WPF, Silverlight … </p>
<p>If you want to dig into the technical details, then have a look at the <a href="http://prismwiki.codegear.com/">Delphi Prism Wiki</a>. As Delphi user you might want to start with <a href="http://prismwiki.codegear.com/en/Delphi_Prism_Syntax_compared_with_Win32_Delphi">Delphi Prism syntax compared with Delphi Win32 syntax</a>.</p>
<p><em>More information to come (including German Prism Workshop in Darmstadt) …</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2008/11/delphi-prism-all-new-delphi-for-net-edition-has-been-released/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Delphi 2009: TStringBuilder (Recap and Benchmark)</title>
		<link>http://www.monien.net/blog/index.php/2008/10/delphi-2009-tstringbuilder/</link>
		<comments>http://www.monien.net/blog/index.php/2008/10/delphi-2009-tstringbuilder/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 12:32:05 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[AnsiString]]></category>
		<category><![CDATA[garbage collector]]></category>
		<category><![CDATA[TStringBuilder]]></category>
		<category><![CDATA[Unicode]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/index.php/2008/10/delphi-2009-tstringbuilder/</guid>
		<description><![CDATA[There are a lot of new things to learn with Delphi’s new Unicode string type(s). For example look at Lars’ blog. Quite some interesting posts over the last days. Apparently, the new Delphi 2009 TStringBuilder class has not got much attention yet, so I’ll give a short recap here. Under .NET there is a StringBuilder [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of new things to learn with Delphi’s new Unicode string type(s). For example look at <a href="http://compaspascal.blogspot.com" target="_blank">Lars’ blog</a>. Quite some interesting posts over the last days.</p>
<p>Apparently, the new Delphi 2009 TStringBuilder class has not got much attention yet, so I’ll give a short recap here.</p>
<p><span id="more-214"></span><br />
Under .NET there is a StringBuilder class since the very beginning. This is because in .NET Strings are <em>immutable,</em> which means that once the content of a string instance is set, it is fixed. It cannot be changed anymore. “Quasi modifying” operations require new instances to be created and the old ones to be discarded:</p>
<p>s := s + ‘a’  means “create a new string instance and initialize it with the old content of s plus an ‘a’, then throw the old instance s pointed to into the garbage collector”</p>
<p>Lot of pressure on the memory management system that is.</p>
<p>Thus StringBuilder was invented. The core idea is to prepare some buffer and let all operations work on that buffer, so that you don’t need to recreate instances all the time. The buffer is still managed, and all are happy.</p>
<p>The question is now: “why do we need a TStringBuilder class in Delphi/Win32, and if it is a “real” class (i.e. not just a highly optimized type in System.pas), could it be really fast?”</p>
<p>Well, it appears to be fast, look at this code (test environment: Core 2 Duo, 2GHz):</p>
<pre class="brush: delphi">

// approx 2.2 sec ~45M operations/sec
LStart := GetTickCount;
for i := 0 to 100000000 do begin
SB.Append(&#039; &#039;);
end;
LStop := GetTickCount;
Writeln(&#039;StringBuilder: &#039;, LStop - LStart);

// approx 3.8 sec ~ 26M operations/sec
s:=&#039;&#039;;
LStart := GetTickCount;
for i := 0 to 100000000 do begin
s := s + &#039; &#039;;
end;
LStop := GetTickCount;
Writeln(&#039;String: &#039;, LStop - LStart);

// approx 3.5 sec ~ 28M operations/sec
a:=&#039;&#039;;
LStart := GetTickCount;
for i := 0 to 100000000 do begin
a := a + &#039; &#039;;
end;
LStop := GetTickCount;
Writeln(&#039;AnsiString: &#039;, LStop - LStart);
</pre>
<div id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:10d82691-db74-445e-a107-81b76ed1a4a7" class="wlWriterEditableSmartContent" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p>Download source: <a href="http://www.monien.net/blog/wp-content/uploads/lw/Delphi2009TStringBuilder_CC5E/StringBenchmark.zip" target="_blank">StringBenchmark.zip</a></p>
</div>
<p>So obviously TStringBuilder is useful for certain operations, as its significantly faster than String. As expected AnsiString is faster than String, but its still slower than TStringBuilder.</p>
<p>So this leaves to investigate when TStringBuilder has advantages, besides in this fairly artificial case. To be continued …</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2008/10/delphi-2009-tstringbuilder/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Beta Announced : Delphi Prism &#8211; Next Delphi .NET Incarnation</title>
		<link>http://www.monien.net/blog/index.php/2008/10/beta-announced-delphi-prism-next-delphi-net-incarnation/</link>
		<comments>http://www.monien.net/blog/index.php/2008/10/beta-announced-delphi-prism-next-delphi-net-incarnation/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 10:54:32 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[CodeGear]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/index.php/2008/10/beta-announced-delphi-prism-next-delphi-net-incarnation/</guid>
		<description><![CDATA[You may have noticed that Delphi 2009 includes Win32 (Delphi and C++) personalities only. The .NET part has obviously been scheduled for later. For those of you being curious how the next Delphi for .NET might look like: CodeGear just “inofficially” announced a Delphi Prism Beta which is basically something like Delphi in Visual Studio. [...]]]></description>
			<content:encoded><![CDATA[<p>You may have noticed that Delphi 2009 includes Win32 (Delphi and C++) personalities only. The .NET part has obviously been scheduled for later.</p>
<p>For those of you being curious how the next Delphi for .NET might look like:</p>
<p>CodeGear just “inofficially” announced a <a href="http://blogs.codegear.com/chrispattinson/2008/10/03/38898/" target="_blank">Delphi Prism Beta</a> which is basically something like Delphi in Visual Studio. Nick Hodges showed off some early information at <a href="http://www.sdn.nl" target="_blank">SDN</a> in the Netherlands.</p>
<p>Allen Bauer <a href="http://blogs.codegear.com/abauer/2008/10/06/38874" target="_blank">also comments</a> on these, maybe surprising news. So far it looks like in the future there will be two Delphi products, one for Win 32 Development (in the IDE we all know), and an other VisualStudio based IDE for .NET development.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2008/10/beta-announced-delphi-prism-next-delphi-net-incarnation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SyntaxHighlighter on Blogs or Web sites</title>
		<link>http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/</link>
		<comments>http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 22:00:00 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[SourceCode]]></category>
		<category><![CDATA[Syntax Highlighting]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/</guid>
		<description><![CDATA[If you have a development realted blog or Web site, then you probably paste source code examples from time to time. Using Alex Gorbatchev&#8217;s SyntaxHighlighter makes your snippets look very pretty.  Update: For WordPress there is a SyntaxHighlighter Plus plugin, which is also based on the code below.  I&#8217;ve updated my posts here on the [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a development realted blog or Web site, then you probably paste source code examples from time to time. Using Alex Gorbatchev&#8217;s SyntaxHighlighter makes your snippets look very pretty.<span id="more-180"></span> <em></em></p>
<p><em>Update: For WordPress there is a <a title="SyntaxHighlighter Plus" href="http://wordpress.org/extend/plugins/syntaxhighlighter-plus/" target="_blank">SyntaxHighlighter Plus</a> plugin, which is also based on the code below.  I&#8217;ve updated my posts here on the new WP based blog system to use that plugin.</em></p>
<p>I just found Alex Gorbatchev&#8217;s excellent <a href="http://code.google.com/p/syntaxhighlighter/" target="_blank">SyntaxHighlighter</a> on Google Code. It&#8217;s JavaScript based and makes it very easy to pretty-print your source code examples. It comes with modules for:</p>
<ul>
<li>C#</li>
<li>C++</li>
<li>CSS</li>
<li>Delphi</li>
<li>Java</li>
<li>Javascript</li>
<li>PHP</li>
<li>Python</li>
<li>Ruby</li>
<li>SQL</li>
<li>VisualBAsic</li>
<li>XML</li>
</ul>
<p>It&#8217;s completely modular, so if you need Delphi only, then you don&#8217;t have to load all other modules. Usage is very easy, just add the following to your HTML template that drives your blog or source code pages:</p>
<pre class="brush: html">
&lt;script src=&quot;/js/shCore.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/js/shBrushDelphi.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<p>shCore.js is about 13KB, the language modules and clipboard.swf are just two KB in average. If you need Delphi and C# then just add shCSharp.js to the list above. To show a piece of source code you insert the raw source inside a &lt;pre&gt;&lt;/pre&gt; tag pair. The actual formatting will be done by SyntaxHighlighter.</p>
<pre class="brush: html">
&lt;pre class=&quot;delphi&quot;&gt;
var
  s: string;
begin
  s := &#039;Hello World&#039;;
end;
&lt;/pre&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
