<?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>Desiderata software® and consultancy blog</title>
	<atom:link href="http://www.desiderata.com.au/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.desiderata.com.au/blog</link>
	<description>specialising in clinical database solutions for Australian hospitals</description>
	<lastBuildDate>Wed, 24 Apr 2013 05:45:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Migrating to DevArt&#8217;s UniDAC database connection components</title>
		<link>http://www.desiderata.com.au/blog/?p=607</link>
		<comments>http://www.desiderata.com.au/blog/?p=607#comments</comments>
		<pubDate>Wed, 13 Feb 2013 05:59:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[DBExpress]]></category>
		<category><![CDATA[devart]]></category>
		<category><![CDATA[UniDAC]]></category>

		<guid isPermaLink="false">http://www.desiderata.com.au/blog/?p=607</guid>
		<description><![CDATA[I have a complex Delphi 2007 multi-user 24&#215;7 MS SQL Server and Sybase ASE database application which uses dozens of TClientDatasets connected to TDatasetProviders which then connect to separate datamodules containing TDatasets (eg. TQuery or TSQLQuery) which link to a connection component (eg. TDatabase or TSQLConnection). I have 3 almost identical versions with different datamodules: a BDE&#8230;]]></description>
				<content:encoded><![CDATA[<p>I have a complex Delphi 2007 multi-user 24&#215;7 MS SQL Server and Sybase ASE database application which uses dozens of TClientDatasets connected to TDatasetProviders which then connect to separate datamodules containing TDatasets (eg. TQuery or TSQLQuery) which link to a connection component (eg. TDatabase or TSQLConnection).</p>
<p>I have 3 almost identical versions with different datamodules:</p>
<ul>
<li><strong>a BDE version</strong> using TQuery components and this gives good performance and can do nested SQL statements but the BDE is problematic to install in a network environment, particularly with 64bit windows becoming more common, but more importantly, the BDE truncates varchar fields to 255 characters which is very limiting unless in SQL you convert them to text in which case they become memo fields, but then you need to inform user their input will be truncated to maximum of varchar setting.</li>
<li><strong>a DBExpress version</strong> using TSQLDatasets which gives good performance but tends to have a few issues and cannot do nested SQL statements for complex reports.</li>
<li><strong>an ADO version</strong> using TADOQuery components which gives poor performance, presumably as the ADO components also cache the data as do the TClientDatasets. I no longer use this version.</li>
</ul>
<p>The word from Embarcadero now that they have purchased the excellent 3rd party database components &#8211; AnyDAC, is that AnyDAC will be included in Delphi XE4 &#8211; presumably late 2013 &#8211; but is no longer available for purchase separately, and that the DBExpress technology is likely to be deprecated given they had troubles addressing a few of its issues.</p>
<p>Given this news and not wanting to wait until Delphi XE4, I decided to jump in and buy <a href="http://www.devart.com/dac.html" target="_blank">DevArt&#8217;s UniDAC components for Delphi </a>which come highly recommended.</p>
<h3><strong>The process of migration and the issues it raises.</strong></h3>
<p>After installing the Unidac components &#8211; very painless process indeed, you will discover a new item on the Delphi IDE menu bar &#8211; UniDAC under which you will find a Migration Wizard tool.</p>
<p>The good news is that the <strong>Migration Wizard is very easy to use and seems to work well by converting the BDE components</strong> to UniDAC components &#8211; just tell it which folder to convert and away it goes (best to back everything up first of course, although the wizard does have an optional backup functionality).</p>
<p>The bad news is that although the wizard will migrate from BDE, ADO and other DevArt components such as SDAC,  <strong>there is no option to migrate from DBExpress</strong> &#8211; this seems like it would require a significant amount of search and replace work in the pas and dfm files.</p>
<p>Obviously some BDE features will not be supported such as aliases and if your database connection or your code relies on this then these aspects will need addressing.</p>
<p>You will have to <strong>set the properties on the TUniConnection component</strong> (UniDAC database driver, server, database, username, password, then look in SpecificOptions to enter ApplicationName, WorkstationID, etc), plus you will need to <strong>reconnect all your dataset.connection properties</strong> to the TUniConnection component, plus if you are like me and using TClientDatasets, then you should set all the <strong>TUniQuery.UniDirectional = true.</strong></p>
<p>If any of your <strong>SQL has double quotes</strong>, these will need to be changed to single quotes &#8211; easiest way to do this is by opening the datamodule as text file (right click then select &#8220;View as text&#8221;), then do a search and replace, replacing all &#8221; with two single quotes.</p>
<p>Finally, you will need to <strong>drop the UniDAC provider components onto your datamodule &#8211; eg. TSQLServerUniProvider, TASEUniProvider</strong>.</p>
<h3><strong>Issues thus far:</strong></h3>
<ul>
<li>certain TClientDatasets with Sybase &#8220;text datatype&#8221; fields crash the system when active set to true in either IDE or runtime if using the Sybase ASE connection &#8211; I am yet to work out what specifically is causing this when other similar datasets function well, and the TUniQuery opens rapidly without issue and the supplied DevArt dbMonitor suggests all is well. This is presumably an issue with the Sybase ODBC driver rather than UniDAC, and I would try changing to the DBExpress Sybase driver via UniDAC if I didn&#8217;t have to change all my datetime fields to SQLTimestamp fields.</li>
<li>UniDAC TUNiQuery does not allow nested SQL statements even if these are returning a single dataset.</li>
<li>Sybase ASE, Access, DB2, DBF databases are accessed via ODBC driver instead of a Direct UniDAC driver as is the case with Oracle, MS SQL Server, PostgreSQL, SQLite, and NexusDB</li>
<li>I am getting key violation errors which I didn&#8217;t get with record inserts with the BDE version &#8211; this may be related to the Sybase ODBC component &#8211; will investigate</li>
</ul>
<h3>Benefits of UniDAC:</h3>
<ul>
<li><strong>no dll&#8217;s or BDE to install</strong> on end-user system which allows for a self-installing, self-configuring application to be easily made</li>
<li>performance seems good</li>
<li>ability to use <strong>multiple database engines and even write database-specific SQL</strong> with macros allowing clauses such as if Oracle then &#8230; etc. &#8220;server-independent SQL&#8221;</li>
<li><strong>built-in debug option</strong> &#8211; set debug property to true and when dataset is opened, a dialog will display the SQL statement being sent</li>
<li>supplied with a <strong>dbMonitor</strong> which will show each SQL command sent, including parameters and time taken &#8211; just drop a TUniDBMonitor component on your datamodule and set it to active to allow this functionality (dbMonitor must be running prior to running your application).</li>
<li>it has far more versatility than DBExpress including:</li>
<ul>
<li>ability to do SQL batch scripting to create and delete tables.</li>
<li>map data types &#8211; this can be particularly useful when using persistent fields and different database drivers</li>
<li>encryption functionality</li>
<li>assign table update SQL statements &#8211; although not needed if using TClientDatasets</li>
<li>stored procedure call generator</li>
<li>improved transaction control</li>
<li>ability to set a server table lock mode for each TUniQuery</li>
<li>each UniDAC driver has server specific options which can be set and these as well as the UniDAC driver are compiled within your application</li>
<li>ability to use other DevArt drivers such as SDAC if you need even more control over SQL Server or you wish to access SQL Server Compact Edition.</li>
</ul>
<li>Disconnected Model with automatic connection control for working with data offline</li>
<li>Connection timeout management</li>
<li>Ability to search for installed servers in a local network</li>
<li>Local Failover for detecting connection loss and implicitly reexecuting certain operations</li>
<li>it seems fairly simple yet versatile</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.desiderata.com.au/blog/?feed=rss2&#038;p=607</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi XE3 announced</title>
		<link>http://www.desiderata.com.au/blog/?p=582</link>
		<comments>http://www.desiderata.com.au/blog/?p=582#comments</comments>
		<pubDate>Thu, 23 Aug 2012 15:50:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://www.desiderata.com.au/blog/?p=582</guid>
		<description><![CDATA[Embarcadero&#8217;s Delphi RAD Studio programming IDE has a new version coming Sept 2012 &#8211; Delphi XE3. I attended their World Tour presentation in Melbourne today and this post is to briefly inform of the new features it brings. Windows 8 support: easy VCL or FireMonkey form conversion to Windows 8 &#8220;Metro&#8221; style ability to compile&#8230;]]></description>
				<content:encoded><![CDATA[<p>Embarcadero&#8217;s <strong>Delphi RAD Studio</strong> programming IDE has a new version coming Sept 2012 &#8211; <strong>Delphi XE3</strong>.</p>
<p>I attended their World Tour presentation in Melbourne today and this post is to briefly inform of the new features it brings.</p>
<h2>Windows 8 support:</h2>
<ul>
<li>easy VCL or FireMonkey form conversion to Windows 8 &#8220;Metro&#8221; style</li>
<li>ability to compile Windows 8 Desktop applications (32bit or 64bit) in either Delphi Object Pascal or with C++ (although 64bit C++ compiler will be in Q4)</li>
<li>new Windows 8 GUI &#8220;Metropolis&#8221; components such as MetropolisUIListBox</li>
<li>Office 2013 styling</li>
<li>Live Tiles WinRT support (but no WinRT application Delphi compiler as yet &#8211; this is coming, although you can compile WinRT apps using Delphi Prism and .NET via Visual Studio 2013)</li>
<li>video playback utilises DirectShow</li>
<li>support for gyrosensors, location services, etc</li>
<li>support for Surface Pro and Slate tablets</li>
<li>&#8220;Fat Finger&#8221; touch ready</li>
<li>the &#8220;Metropolis&#8221; Win8 Metro GUI-style Desktop apps can be used on Win XP, Vista, Win 7 or Win 8 and work as touch-enabled apps thanks to Delphi gesture control functionality</li>
</ul>
<h2>Mac OS X Mountain Lion support:</h2>
<ul>
<li>FireMonkey components automatically can detect and be optimised for pixel-perfect display on either Retina or non-Retina displays in the same binary executable</li>
<li>video playback utilises Quicktime</li>
<li>non-client area FireMonkey styling</li>
<li>Mac Apple store compatible</li>
</ul>
<h2>Revamped Firemonkey framework:</h2>
<ul>
<li>vector based, cross platform FireMOnkey framework was introduced in Delphi XE2</li>
<li>the framework has been revamped in XE3 and is now called FireMonkey2</li>
<li>it has been simplified via adding Visual Live Bindings, wizards, and support for anchors, layouts, non-client area styling, audio/video controls, actions and action lists</li>
<li>Mac OS Retina display optimised</li>
<li>a new component TPrototypeBindSource allows one to automatically generate a virtual dataset complete with data to link to to assist with mock up application development without need to create an actual database, and this component can also be used to create Live Bindings to custom classes.</li>
<li>TDatasource is no longer needed, just link a BindSource to a dataset such as TClientDataset</li>
</ul>
<h2>New Visual Live Bindings:</h2>
<ul>
<li>makes creation of Live Bindings far easier &#8211; just drag and drop</li>
<li>ability to group various Live Bindings together into a &#8220;layer&#8221; which allows simplification of the visual appearance of these by optionally &#8220;disabling&#8221; other layers to make the layer you are working with easier to see.</li>
<li>layer data is stored in files with extension .vlb</li>
<li>seems the Visual Live Bindings functionality can only represent one form at a time?</li>
<li>improved dataset lookup support</li>
<li>can be used in VCL or Firemonkey</li>
</ul>
<h2>New HTML5 Builder:</h2>
<ul>
<li>a totally revamped IDE of what was formerly RadPHP</li>
<li>visual design of HTML5, CSS, javascript for client side, while using PHP scripting for server side web apps</li>
<li>utilises jQuery technology</li>
<li>deployment to mobile devices via PhoneGap services</li>
<li>&#8220;Phonegap takes your generated html, javascript and css files and injects it into a real .exe file for both Android and iOS. This real .exe file creates it’s own browser instance, puts the browser in full-screen – and disables the security restrictions that public browsers impose on you. Once wrapped, you can create persistent (non cached) databases beyond the usual 5 to 10 megabyte limitation.&#8221;</li>
<li>extensive code completion and help</li>
<li>embedded multimedia playback in web browsers</li>
<li>as I understand, this module does not allow one to program in Object Pascal while the compiler generates javascript so it will be interesting to see how this compares with IDE&#8217;s which generate HTML5, javascript from Object Pascal code such as <a href="http://smartmobilestudio.com/about/" target="_blank">Smart Mobile Studio</a> (costs ~$450)</li>
</ul>
<h2>&#8220;Mobile&#8221;:</h2>
<ul>
<li>there will be a new, separate software package for compiling native mobile apps for iOS, android, Blackberry, and Windows Phone 7 called &#8220;Mobile&#8221;</li>
<li>this can be purchased and used separate to Delphi, or it can be added into the Delphi IDE as an optional add-on</li>
<li><strong>it is NOT included in RAD Studio XE3 pricing!</strong></li>
<li>it REPLACES the Delphi XE2 mechanism for compiling mobile apps which relied upon FreePascal and compiling in XCode</li>
<li>the new mechanism is MUCH easier to use and does not require external management</li>
<li>allows same Object Pascal code to generate native iOS, Android apps</li>
<li>new Interbase ToGo database can be deployed to mobile devices as an alternative to SQLite</li>
<li>Datasnap compatible</li>
<li>SQLite driver for DBX</li>
<li>supports device hardware such as gyro, GPS, camera and accelerometer</li>
<li>mobile device form designers</li>
</ul>
<p><strong>Delphi XE3 is a very timely product launch which will leverage the new requirements of Windows 8, and Mac OS Retina displays whilst significantly extending and simplifying cross-platform and mobile application development with tools such as FireMonkey and HTML5/CSS/javascript apps.</strong></p>
<p><strong>This will be a must buy version for those interested in such application development.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.desiderata.com.au/blog/?feed=rss2&#038;p=582</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting to a password-protected Microsoft Excel spreadsheet using Delphi TADOConnection</title>
		<link>http://www.desiderata.com.au/blog/?p=553</link>
		<comments>http://www.desiderata.com.au/blog/?p=553#comments</comments>
		<pubDate>Sun, 11 Mar 2012 06:57:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[ADO]]></category>
		<category><![CDATA[Excel]]></category>

		<guid isPermaLink="false">http://www.desiderata.com.au/blog/?p=553</guid>
		<description><![CDATA[There is a little trick to connecting to a password protected .xls Excel spreadsheet using the Jet 4.0 OLEDB driver. &#160; If one uses the obvious Password=xxx;User Id=Admin you will get an error &#8220;Workgroup Information file missing or file is in use by another user&#8221;. &#160; The ADOConnection will return an active connection is using&#8230;]]></description>
				<content:encoded><![CDATA[<p>There is a little trick to connecting to a password protected .xls Excel spreadsheet using the Jet 4.0 OLEDB driver.</p>
<p>&nbsp;</p>
<p>If one uses the obvious Password=xxx;User Id=Admin you will get an error &#8220;Workgroup Information file missing or file is in use by another user&#8221;.</p>
<p>&nbsp;</p>
<p>The ADOConnection will return an active connection is using the following connection string but in Delphi 2007 I am still getting an error on trying to read the file &#8220;Could not decrypt file&#8221;.</p>
<p>&nbsp;</p>
<p>So here is the Connection String which will open the connection successfully in Read Only mode:</p>
<p>&nbsp;</p>
<p><code>Provider:=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp\MyExcel.xls;Mode=Read;Extended Properties=Excel 8.0;Jet OLEDB:Database Password="xxx";</code></p>
<p>&nbsp;</p>
<p>It appears that &#8220;Could not decrypt file&#8221; error is due to a well known limitation of the Jet OLEDB 4.0 engine in that it always returns this error on trying to read a password protected Excel file even if passwords are known.</p>
<p>The hack around this is to open the file in Excel first in full read/write mode BEFORE opening the TADOConnection &#8211; just opening it in READ ONLY mode in Excel WILL NOT work!</p>
<p>This is not only an issue in Delphi but in any application that uses Jet 4.0 OLEDB engine.</p>
<p><strong>Of course, another solution is to use COM OLE automation such as:</strong></p>
<ul>
<li>CreateOLEObject method &#8211; see <a href="http://www.scalabium.com/faq/dct0153.htm" target="_blank">here</a></li>
</ul>
<h2>Excel 2007 and higher files (.xlsx):</h2>
<p>If you are dealing with .xlsx Excel 2007 or later files, you cannot use the Jet engine, but you can use the ACE OLEDB driver:</p>
<ul>
<li><strong>ACE 32bit OLEDB driver if 32bit Office is installed:</strong></li>
<ul>
<li><code>Provider := Microsoft.ACE.OLEDB.12.0;Data Source="C:\temp\MyExcel.xlsx";Extended Properties="Excel 12.0 Xml;HDR=YES;</code>&#8220;;Jet OLEDB:Database Password=&#8221;";</li>
</ul>
<li> <strong>ACE 64bit OLEDB driver if 64bit Office installed and 64bit ACE installed:</strong></li>
<ul>
<li><code>Provider := Microsoft.ACE.OLEDB.14.0;Data Source="C:\temp\MyExcel.xlsx";Extended Properties="Excel 12.0 Xml;HDR=YES;</code>&#8220;;Jet OLEDB:Database Password=&#8221;";</li>
</ul>
<li>NB. YES you read correctly, that is Jet OLEDB:Database Password=&#8221;"; and NOT ACE OLEDB:Database Password=&#8221;"; !!! AND strangely enough, you can connect to a password protected file without supplying a password at all BUT, whether or not you supply a password, the password protected Excel file MUST be already open in full edit mode within Excel first!</li>
<li>NB. to install ACE 64bit on a machine which already has ACE 32bit installed, use command line: AccessDatabaseEngine_X64.exe /passive</li>
<li>to connect to Excel 97-2003 .xls via ACE use Extended Properties=&#8221;Excel 8.0;HDR=YES;&#8221;</li>
<li>to connect to Excel 2007-2010 .xlsx via ACE use Extended Properties=&#8221;Excel 12.0 Xml;HDR=YES;&#8221;</li>
<li>to connect to Excel 2007-2010 .xlsm via ACE use Extended Properties=&#8221;Excel 12.0 Macro;HDR=YES;&#8221;</li>
<li>to connect to Excel 2007-2010 .xlsb via ACE use Extended Properties=&#8221;Excel 12.0;HDR=YES;&#8221;</li>
<li>if you get the error &#8220;could not find installable ISAM&#8221;, you have probably made an error with the connection string.</li>
<li>unfortunately, if the Excel file is password protected to read, you will get an error &#8220;External table is not in the expected format&#8221; unless it is already opened in Excel and user has edit rights to the spreadsheet! So we have the same old situation as with the Jet OLEDB provider!</li>
<li>and don&#8217;t bother trying Password=&#8221;xxx&#8221;;User ID=Admin; as additional parameters, because as soon as you add a value for password, you get the same old Jet issue of &#8220;The workgroup information file is missing or opened exclusively by another user&#8221;.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.desiderata.com.au/blog/?feed=rss2&#038;p=553</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database application development pathways with RAD Studio XE2</title>
		<link>http://www.desiderata.com.au/blog/?p=535</link>
		<comments>http://www.desiderata.com.au/blog/?p=535#comments</comments>
		<pubDate>Mon, 29 Aug 2011 14:38:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[database programming]]></category>
		<category><![CDATA[mobile phones]]></category>

		<guid isPermaLink="false">http://www.desiderata.com.au/blog/?p=535</guid>
		<description><![CDATA[Embarcadero&#8217;s RAD Studio XE2 allows the following database development pathways: &#160; Delphi Object Pascal or C++ generated DataSnap middle tier data servers which run on a Windows server and allows the following thin clients to connect to it: Delphi Object Pascal or C++ VCL WinForms clients compiled for either Win32 or Win64 Delphi Object Pascal&#8230;]]></description>
				<content:encoded><![CDATA[<p>Embarcadero&#8217;s RAD Studio XE2 allows the following database development pathways:</p>
<p>&nbsp;</p>
<p><strong>Delphi Object Pascal or C++ generated DataSnap middle tier data servers</strong> which run on a Windows server and allows the following thin clients to connect to it:</p>
<ul>
<li><strong>Delphi Object Pascal or C++ VCL WinForms</strong> clients compiled for either <strong>Win32 or Win64</strong></li>
<li><strong>Delphi Object Pascal FireMonkey</strong> compiled for native client application for any of the following platforms:</li>
<ul>
<li><strong>Win64</strong></li>
<li><strong>Win32</strong></li>
<li><strong>Mac OS X</strong></li>
<li><strong>iOS</strong></li>
<li>and in 2012, <strong>Linux</strong> and Java for <strong>Android</strong></li>
</ul>
<li><strong>via Mobile Connectors:</strong></li>
<ul>
<li>Eclipse compiled java client for <strong>Android</strong></li>
<li>XCode compiled iOS client for <strong>iPad, iPhone</strong></li>
<li><strong>Blackberry</strong> client</li>
<li><strong>Windows Phone 7</strong> client</li>
</ul>
<li><strong>isapi.dll web client</strong> hosted on a Windows web server<br />
<strong></strong></li>
<li><strong>RADPhP web application</strong> hosted on a web server (requires the DataSnap server to be a REST application)</li>
<li><strong>RADPhP mobile application</strong> packaged for mobile devices via PhoneCap</li>
<li><strong>.NET client</strong> created using Delphi Prism (REMObject&#8217;s Oxygene) Object Pascal for .NET running in MS Visual Studio</li>
<li><strong>ASP.NET web database application</strong> created using Delphi Prism (REMObject&#8217;s Oxygene) Object Pascal for .NET running in MS Visual Studio.</li>
<li><strong>Java client</strong> created using <a href="http://www.remobjects.com/tv/oxygene.aspx?video=oxygene-04-CooperBeta">REMObject&#8217;s Cooper project</a> &#8211; Object Pascal for java running in MS Visual Studio (in development)</li>
</ul>
<p>Third party REMObjects is extending its Hydra technology to allow FireMonkey plugins to work on VCL Winforms, and vice versa, as well as WPF plugins to work in FireMonkey apps and vice versa &#8211; see <a href="http://blogs.remobjects.com/blogs/ejay/2011/08/18/p2909">here</a>.</p>
<p><strong>RADPhP web database application</strong> using MySQL database.</p>
<p><strong><br />
</strong></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.desiderata.com.au/blog/?feed=rss2&#038;p=535</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FireMonkey for cross-platform stunning visual business database applications &#8211; details</title>
		<link>http://www.desiderata.com.au/blog/?p=493</link>
		<comments>http://www.desiderata.com.au/blog/?p=493#comments</comments>
		<pubDate>Fri, 12 Aug 2011 04:47:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Embarcadero]]></category>
		<category><![CDATA[FireMonkey]]></category>

		<guid isPermaLink="false">http://www.desiderata.com.au/blog/?p=493</guid>
		<description><![CDATA[I had the honor yesterday of attending Embarcadero&#8217;s most exciting pre-release RAD Studio event yet &#8211; a summary of the new features are in the previous post. This post I will explore the FireMonkey aspect of Delphi XE2 a bit more deeply. Vector-based architecture features and implications: Firemonkey architecture is presumably a significantly enhanced non-VCL successor&#8230;]]></description>
				<content:encoded><![CDATA[<p>I had the honor yesterday of attending <a href="http://www.embarcadero.com/products">Embarcadero&#8217;s</a> most exciting <strong>pre-release RAD Studio event</strong> yet &#8211; <a href="http://www.desiderata.com.au/blog/?p=486">a summary of the new features are in the previous post</a>.</p>
<p>This post I will explore the <strong>FireMonkey</strong> aspect of <strong>Delphi XE2</strong> a bit more deeply.</p>
<h3>Vector-based architecture features and implications:</h3>
<ul>
<li>Firemonkey architecture is presumably a significantly enhanced non-VCL successor to <a href="http://www.ksdev.com/">Kryukov&#8217;s KSDev vector-based VCL components</a> including <a href="http://www.ksdev.com/wiki/index.php?title=VGScene">VGScene</a>, <a href="http://www.ksdev.com/wiki/index.php?title=DXScene">DXScene</a>, ImageFX and <a href="http://www.ksdev.com/wiki/index.php?title=IOS_Development">his iOS compiler, </a>for which Embarcadero acquired the IP (apparently in Jan 2011 when further development of his VCL components was ceased, and would explain why the Delphi community was taken by surprise with the recent announcement of FireMonkey).</li>
<li>allows 3D modeling with all computing work performed by the device&#8217;s GPU (thus 3D features currently will not display if remote desktop or Citrix environment)</li>
<li>allows assigning data points on a 3D model which can then linked via the new LiveBindings functionality to a source data, thereby enabling live 3D charting, etc</li>
<li>can import various 3D models such as 3ds or Collada, with potential to add more support later.</li>
<li>full zoom in and out capability without image degradation which means controls look good even on small devices when zooming is applied</li>
<li>ability to apply 3D effects and filter effects to forms or components, thus one could create a page turning effect potentially.</li>
<li><strong>a critical difference</strong> to other vector based frameworks such as <strong>Abobe Flash</strong> and<strong> Microsoft&#8217;s WPF</strong> (an XAML DirectX .NET based technology with data bindings, upon which <strong>Silverlight</strong> is built), is that Apple allows FireMonkey applications to be added to their iTunes app store and thus made available for use on iPhones and iPads (ie. <strong>it is FPC-compatible</strong>).</li>
<li>when compiled to a Windows platform, it utilises Direct2D and Direct3D, when compiled to Mac OS X or iOS, it utilises OpenGL.</li>
<li>it is currently designed for native applications (ie. running independently of any web browser) and not for Rich Internet Applications (RIA) within web browsers (as does Silverlight or Air), and is not specifically targetting gaming development.</li>
</ul>
<h3>FireMonkey components:</h3>
<ul>
<li><strong>does not use Windows messaging</strong> and thus does not play well with visual VCL components in the same application, thus avoid them, BUT one <strong>still uses TDatasource, TClientDataset</strong>, etc.</li>
<li>source code included &#8211; 99% is Object Pascal code with only a small section of non-pascal GPU code</li>
<li>components designed to make migration from VCL as simple as possible by keeping similar naming and properties where possible but obviously events that take Windows messaging parameters had to be changed.</li>
<li><strong>new LiveBindings functionality</strong> (which also is now on VCL) means almost any property of a control can be unidireectionally or bidirectionally linked to a source &#8211; be it a form variable or TDatasource.dataset field, or other control parameter, this also means, some properties such as position x are no longer integer but Double.</li>
<li>TFmxObject = class(TComponent);</li>
<li>any object can contain other components to make it versatile and <strong>very easy to create customised objects</strong></li>
<li>just drop a component onto another component and it will become a child of that component &#8211; need to take care in the IDE when dropping components onto a form!</li>
<li>heavily dependent upon interfaces</li>
<li><strong>IControl</strong> handles focus, mouse and keyboard events, implemented by TControl and TControl3D</li>
<li><strong>IRoot</strong> is interface to top-level containers and is implemented by TCustomForm</li>
<li><strong>IScene</strong> is the container for 2D objects and is implemented by TForm and TCustomLayer3D</li>
<li><strong>IViewPort</strong> is the container for 3D objects (and requires a GPU), and is implemented by TForm3D and TViewPort3D</li>
<li><strong>GPU-based shading filters</strong> which can be applied to bitmaps, forms and controls to give Photoshop-like effects</li>
<li><strong>new Animation functionality</strong> which allows one to modify a property value over time and thereby create changing colors, changing position, etc.</li>
<li><strong>new Styles is a CSS-like functionality which allows dynamic skinning</strong> with ability to save, load and modify at run time to dramatically alter the appearance of the application.</li>
<li><strong>new StyleBook</strong> is a container for styles and provided styles include Win7, MacOSX, etc, but of course one can create their own styles.</li>
</ul>
<h3>Live Bindings:</h3>
<ul>
<li>available in VCL as well as FireMonkey and in effect makes ALL components and their properties data aware if you wish &#8211; very versatile and quite different to VCL&#8217;s data-aware approach which is not available in FireMonkey.</li>
<li>can specifiy unidirectional or bi-directional links which have read/write capability via use of expressions</li>
<li><strong>a binding consists of 4 aspects:</strong></li>
<ul>
<li>source object &#8211; this may be a TDatasource.dataset.field or a form variable or component</li>
<li>source expression &#8211; a string which can be edited at runtime. For example, the name of the source property value you wish to bind to such as DisplayName if source is a TField</li>
<li>control object &#8211; this is the destination object that you are binding to.</li>
<li>control expression &#8211; a string which allows one to format the bound data for display, etc. and to specify the control property value which will be linked eg. label.text</li>
</ul>
<li>bindings are stored in <strong>TBindingsList</strong>, and also allow you to register methods available to be called from the expression strings. The expression evaluation engine also accesses the RTTI.</li>
<li>one also needs to set a scope for the binding and this may be done automatically and uses <strong>TBindScope and TBindScopeDB</strong> (if linking to a TDatasource)</li>
<li>instead of TDBNavigator, there is a<strong> TBindNavigator</strong> which links to a TBindScopeDB or a TBindScope.</li>
<li>LiveBindings introduces wonderful new versatile opportunities (eg. you can bind to any component property and even to points on a 3D model) but does introduce a significant <strong>potential for runtime errors</strong> as the expression strings are no longer part of the compiler syntax mechanism, and particularly, if you change the name of a control or variable during refactoring and forget to change it within the expression, or just do a typing error, you will not get a compiler error but a potentially difficult to detect runtime error which may or may not create an exception.</li>
<li><strong>to create a LiveBinding on a form control</strong>, just click on the LiveBindings property of the control and you will have the option of creating one manually or choosing &#8220;Link to DB Field&#8221; which will automatically place the LiveBinding comonents on the form, and will display all TDatasources and their fields for you to select a field to bind to.</li>
</ul>
<h3>Cross-platform RTL support:</h3>
<ul>
<li><strong>TFormatSettings</strong> in SysUtils</li>
<li><strong>TOSVersion</strong></li>
<li><strong>TZipFile</strong> in System.zip for crossplatform zip/unzip of files &#8211; now this will make life much easier!</li>
<li><strong>TLoginCredentials</strong></li>
<li><strong>TPointF</strong></li>
</ul>
<h3>Cross-platform debugging:</h3>
<ul>
<li>this has been simplified &#8211; one copies the Embarcadero <strong>Platform Assistant</strong> to the target machine or virtual machine, specify port and optionally password then just run it.</li>
<li>within Delphi IDE, define a <strong>remote profile</strong> specifying IP address, port and optionally password and remote paths.</li>
<li>Run with Debug</li>
</ul>
<h3>Cross-platform development limitations:</h3>
<ul>
<li>platform specific functionality obviously is not available for cross-platform compilation eg. Windows messaging (and thus the VCL), COM, menus (not available on iOS), OS API&#8217;s, MS XML transforms, etc</li>
<li>whilst many GUI applications MAY be applicable for use as is across multiple platforms, the reality is that you would probably wish to have a GUI that is optimised for each platform, and this too is obviously not only possible with FireMonkey, but the best approach for many applications.</li>
<li>presumably one could use compiler directives to access different API&#8217;s or to use COM for Windows compiles, or access iOS camera for iOS compiles.</li>
<li>issues with Free Pascal for developing iOS apps &#8211; see <a href="http://web.me.com/macpgmr/ObjP/Xcode4/ObjP_Part6.html">here</a>.</li>
</ul>
<h3>Current limitation issues which will almost certainly be addressed by XE3 release in late 2012:</h3>
<ul>
<li><strong>cannot compile to Linux, Android</strong> <strong>or Blackberry</strong> (but there are java based Datasnap client solutions for these platforms in the interim)<strong><br />
</strong></li>
<li><strong>no Windows 8 specific support</strong> as this has not yet been released by Microsoft.</li>
<li><strong>no customisable gesture support</strong> as is currently in the VCL, but usual gestures such as those on an iPad will work as they do normally without programming.</li>
<li><strong>compilation to iOS is only Object Pascal</strong> (not C++ yet) as it relies upon compilation using <strong>FreePascal</strong> (and thus certain features such as Generics, Anonymous methods are not supported), and then requires one to use <strong>Apple&#8217;s xCode IDE</strong> to do the final compile &#8211; but at least one can debug and edit the Object Pascal code within xCode and changes made within Delphi are automatically visible in xCode without having to go through the FreePascal again.</li>
<li><strong>iOS compile requirements:</strong></li>
<ul>
<li>Mac Snow Leopard on an Intel Mac</li>
<li>iOS SDK with developer subscription (4.2, 4.3)</li>
<li>xCode 3.25 or 3.26 to do the final compile</li>
<li>installed <a href="http://www.freepascal.org/download.var">official FreePascal 2.4.4 binary</a> required to build FPC 2.5.1</li>
<li>if using virtual machine on the Mac such as VMWare Fusion, ensure you save your project to a shared folder that can be accessed by xCode</li>
<li>once project saved in Delphi, use a command line utility to export to xCode files (in a subdrectory)</li>
<li>then run xCode in OS X and open that project in the xCode subdirectory and compile, debug or run on a connected physical device or an emulation of the device</li>
<li>your original object pascal code will be accessible, debuggable and editable within xCode!</li>
</ul>
</ul>
<h3>Development machine:</h3>
<ul>
<li>It would seem for cross-platform development, the preferred environment may be Mac OS X running Delphi within a 64bit Windows VMWare Fusion virtual machine.</li>
</ul>
<ul>
<li>This would then allow running Apple&#8217;s xCode on the same machine and allow all debugging to be performed with the one computer.</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.desiderata.com.au/blog/?feed=rss2&#038;p=493</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embarcadero&#8217;s RAD Studio XE2 Delphi upgrade brings new exciting technology opportunities &#8211; native Win32, Win64, OSX, iOS, and Android apps and a new development platform &#8211; FireMonkey!</title>
		<link>http://www.desiderata.com.au/blog/?p=486</link>
		<comments>http://www.desiderata.com.au/blog/?p=486#comments</comments>
		<pubDate>Thu, 04 Aug 2011 13:35:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[PhP]]></category>
		<category><![CDATA[RAD Studio]]></category>

		<guid isPermaLink="false">http://www.desiderata.com.au/blog/?p=486</guid>
		<description><![CDATA[Delphi developers are in for a big surprise as the World Tour of RAD Studio XE2 brings them some very unexpected opportunities as well as the expected Win64 compiler. Here are a few of the new features in XE2: 64 bit Windows compiler: for most Win32 projects, just select compile to Win64 and you have&#8230;]]></description>
				<content:encoded><![CDATA[<p>Delphi developers are in for a big surprise as the World Tour of RAD Studio XE2 brings them some very unexpected opportunities as well as the expected Win64 compiler.</p>
<p><strong>Here are a few of the new features in XE2:</strong></p>
<h3>64 bit Windows compiler:</h3>
<ul>
<li>for most Win32 projects, just select compile to Win64 and you have native 64bit Windows executable or DLLs!</li>
<li>if your project uses 32-bit assumptions, then these will need to be addressed, but otherwise it should just work.</li>
<li>NB. NativeInt, NativeUInt, pointers, indexes to dynamic arrays, tag properties (now nativeInt) are 64bit</li>
<li>Use your same source code and project files &#8211; just select an additional platform to build for in the project window</li>
<li>Use the same Windows API calls in your code, although Microsoft have renamed some (eg. SetWindowsLong is now SetWindowsLongPTR)</li>
<li>Use the same Runtime Library classes and functions</li>
<li>Use the same VCL components and non-visual components</li>
<li>new compiler directives include Win64, CPUX64</li>
<li>can only access 64bit versions of dlls, ActiveX controls, bitmaps and COM objects (eg. 64bit MS Office will only work with 64 bit exe&#8217;s and vice versa)</li>
<li>Win64 now ignores register, pascal, cdecl, and stdcall, so these are ignored in 64bit compilations.</li>
<li>No Extended type</li>
<li>issues with assembly code, SHL and SHR</li>
</ul>
<h3>New FireMonkey GPU framework for NATIVE deployment to Win32, Win64, OSX, iOS and Android:</h3>
<ul>
<li>1st the bad news &#8211; to convert your existing projects, you will have to migrate all your VCL-based code and components to FireMonkey components as the two are not compatible in the same project (because it does not directly use Windows messaging like the VCL does), and instead of data-aware components as in VCL, we now have Live data bindings for all components (these are also now available in VCL)</li>
<li>Now, the fantastic news:</li>
<li>awesome 2D and 3D rotatable, visual forms and components with enormous potential for native GUI apps</li>
<li>you can apply the Gaussian Blur filter on your form at a strength you deem appropriate when a modal form is activated in front of it</li>
<li>improved animations of visual controls</li>
<li>compatible with TClientDataset and DBExpress components</li>
<li>NATIVE deployment as Object Pascal code to target platforms including iOS and thus satisfies Apple&#8217;s iTune apps requirements</li>
<li>Create a single application and target both Windows and OS X</li>
<li>the framework makes extensive use of interfaces to establish contracts, not inheritance</li>
<li>it is not managed code like .NET nor does it use AIR, Silverlight, HTML5 or CSS for its functionality but native code</li>
</ul>
<h3>Enhanced DataSnap DBExpress functionality:</h3>
<ul>
<li>DBExpress ODBC driver</li>
<li>new mobile and cloud connectivity in RAD Cloud &#8211; Microsoft Azure and Amazon support</li>
<li>supports https</li>
<li>new Datasnap server functionality includes client connection information and management of the connection from the server with ability to limit number of requests per connection, and ability to detect connects, disconnects, and to forecfully disconnect clients.</li>
<li>DataSnap clients can be created for nearly every common device natively via FireMonkey although Linux, Android and Blackberry devices currently are limited to using java Datasnap mobile connectors, while Windows Phone 7 devices are limited to using C#/Delphi Prism Datasnap mobile connectors.</li>
<li>one creates an Android Datasnap client in Delphi XE2 by creating a REST application and ticking the mobile connectors option which adds a DSProxyDispatcher component which will generate project java files such as DSProxy.java which can then be imported into Eclipse IDE for packaging as an Android app.</li>
</ul>
<h3>Enhanced VCL functionality:</h3>
<ul>
<li>the VCL is NOT being made redundant as it is needed for Windows specific applications (eg. using COM, etc) and backward compatibility</li>
<li>new functionality includes option of using the incredibly versatile <strong>LiveBindings functionality</strong> (see next post on FireMonkey) and<strong> new VCLStyles</strong> which allows a different mechanism of skinning to FireMonkey as it allows the use of a vsf file to be loaded at runtime, or added to the executable in Project options application appearance section, and then allows use of TStyleEngine and TStyleManager to set styles or load from file, but these styles are not applicable to menus, popupmenus or ribbons.</li>
</ul>
<h3>New RadPHP functionality:</h3>
<ul>
<li>rich jQuery mobile components</li>
<li>Create mobile-optimized web applications and standalone apps for iOS and Android devices using RadPHP &#8211; PhoneGap wizard allows packaging your application by creating java files for import into Eclipse java IDE, selecting a target platform (eg. Android v2.2) and running in the emulator before uploading to the Android store.</li>
<li>Create mobile optimized web applications that work on all types of mobile devices with elements that behave similar to native mobile apps.</li>
<li>Take advantage of touch optimized layouts, user interface elements, and professional looking theming using HTML5, CSS3, and JavaScript on the client and PHP on the server in an easy-to-use and visual way that only RadPHP can offer.</li>
<li>Using <strong>jQuery</strong> in <strong>RADPHP</strong> and a technology called <strong>PhoneGap</strong>, you can now package up a PHP application and deploy it as a native Android application</li>
</ul>
<p><strong>Very exciting times indeed!!</strong></p>
<p>You can register for the Australian part of the World Tour demonstrations <a href="http://forms.embarcadero.com/forms/APAURADWorldTourEvent">here</a> &#8211; the Melbourne event is next Thursday, the 11th August 2011.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.desiderata.com.au/blog/?feed=rss2&#038;p=486</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft buys Skype for $8.5 billion &#8211; not bad for a Delphi application!</title>
		<link>http://www.desiderata.com.au/blog/?p=463</link>
		<comments>http://www.desiderata.com.au/blog/?p=463#comments</comments>
		<pubDate>Fri, 03 Jun 2011 13:59:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Skype]]></category>
		<category><![CDATA[VOIP]]></category>

		<guid isPermaLink="false">http://www.desiderata.com.au/blog/?p=463</guid>
		<description><![CDATA[Skype was written in Delphi which made it easy to download to users with any Windows machine without having to worry about users having to download MB&#8217;s of java or .NET support files. This ease of configuration from the net was one of the reasons that made Skype so popular. It will be interesting to&#8230;]]></description>
				<content:encoded><![CDATA[<p>Skype was written in Delphi which made it easy to download to users with any Windows machine without having to worry about users having to download MB&#8217;s of java or .NET support files.</p>
<p>This ease of configuration from the net was one of the reasons that made Skype so popular.</p>
<p>It will be interesting to see what Microsoft does with it now that Google is also entering into the VOIP marketplace with its <a href="http://voice.google.com/">Google Voice</a> product which uses SIP addresses (SIP technology is now in some of the new mobile phones) &#8211; Google Voice is currently only available in the US.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.desiderata.com.au/blog/?feed=rss2&#038;p=463</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft shows Windows 8 and all talk of HTML5 and none of .NET and Silverlight</title>
		<link>http://www.desiderata.com.au/blog/?p=460</link>
		<comments>http://www.desiderata.com.au/blog/?p=460#comments</comments>
		<pubDate>Fri, 03 Jun 2011 13:51:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[programming languages]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.desiderata.com.au/blog/?p=460</guid>
		<description><![CDATA[Following my last post on Microsoft&#8217;s announcement that HTML5and javascript is now their preferred cross-platform development technology and apparently leaving .NET and Silverlight for only Windows and Mac development, Microsoft unveiled Windows 8 this week and seems to be pushing for HTML5 apps as their main apps, with no mention of .NET or Silverlight.]]></description>
				<content:encoded><![CDATA[<p>Following my last post on Microsoft&#8217;s announcement that HTML5and javascript is now their preferred cross-platform development technology and apparently leaving .NET and Silverlight for only Windows and Mac development, Microsoft unveiled Windows 8 this week and seems to be pushing for HTML5 apps as their main apps, with no mention of .NET or Silverlight.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/p92QfWOw88I&amp;feature" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/p92QfWOw88I&amp;feature"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.desiderata.com.au/blog/?feed=rss2&#038;p=460</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where to now with rich client application development?</title>
		<link>http://www.desiderata.com.au/blog/?p=389</link>
		<comments>http://www.desiderata.com.au/blog/?p=389#comments</comments>
		<pubDate>Mon, 07 Mar 2011 00:28:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[programming languages]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://www.desiderata.com.au/blog/?p=389</guid>
		<description><![CDATA[In the 1990&#8242;s, C/C++ and Java ruled the enterprise application world while Microsoft&#8217;s Visual Basic was a very limited Windows application tool, and we had Borland&#8217;s Delphi with its far more powerful architecture providing one of the best native Windows Rapid Application Development (RAD) tools. Sun took Microsoft to court when Microsoft tried to add&#8230;]]></description>
				<content:encoded><![CDATA[<p>In the 1990&#8242;s, <strong>C/C++</strong> and <strong>Java</strong> ruled the enterprise application world while Microsoft&#8217;s <strong>Visual Basic</strong> was a very limited Windows application tool, and we had <strong>Borland&#8217;s Delphi</strong> with its far more powerful architecture providing one of the best native Windows Rapid Application Development (RAD) tools.</p>
<p>Sun took Microsoft to court when Microsoft tried to add proprietary extensions to Java which was owned by Sun and this ended Microsoft&#8217;s desire to use Java.</p>
<p>Microsoft then hired one of the architects of Delphi to come up with its own equivalent of Java &#8211; and this was the <strong>C# language</strong> which became the basis of <strong>Microsoft&#8217;s .NET</strong> technology and <a href="http://en.wikipedia.org/wiki/Windows_Presentation_Foundation">Windows Performance Framework (WPF)</a> which was the .NET graphical engine for rendering user interfaces on Windows operating systems.</p>
<p>Microsoft then disgarded its Winforms-based development tools such as MS Visual Basic and forced VB users to migrate to <strong>VB.NET</strong> which would work alongside C# as a programming tool in the <strong>MS Visual Studio suite</strong>.</p>
<p>This change of direction pushed most developers to .NET, and away from native compiled Windows applications and also away from Java.</p>
<p><strong>Borland</strong> responded by creating a .NET version of Delphi which has now evolved to be Delphi Prism but in the process meant it lost its way, and eventually sold Delphi to <strong>Embarcadero</strong> which is now again leveraging its power and versatility, particularly with its re-vitalised Win32 native application development which will hopefully soon also be able to create <strong>native compiled Win64, Linux and MacOS apps</strong>, but also with its relationships with <strong>RemObjects</strong> and the furthered development of Delphi Prism .NET to include ports to MacOS.</p>
<p>In the first decade of this millenium, the vast majority of Windows application development was targeting .NET and if you were not making .NET, companies would think twice about your product.</p>
<p>In 2007, Microsoft released <a href="http://en.wikipedia.org/wiki/Microsoft_Silverlight">Silverlight</a> &#8211; a C#, .NET, WPF technology designed to compete with <strong>Adobe Flash</strong> and provide a graphical plugin environment for web browser which would run on other major operating systems including MacOS. Developers again rushed to embrace this new technology which has a lot of nice features but also a few downsides.</p>
<p><strong>In late 2010, Microsoft created an uproar amongst the developer community by its apparent lack of ongoing commitment to Silverlight</strong> which although provides the richest client experience on Windows browsers, does not run on the multitude of new devices such as Android. <strong>Microsoft and Apple now seem to have abandoned .NET and Silverlight and are pursuing HTML5 and javascript technology</strong> as  the future of cross-platform web browser applications. Adobe have created their <a href="http://labs.adobe.com/technologies/wallaby/">Wallaby conversion tool</a> to allow Flash developers an easier way to migrate their work to HTML5 given that Flash developed websites are locked out of the Apple iOS devices.</p>
<p>see:</p>
<ul>
<li><a href="http://www.amazedsaint.com/2010/10/silverlight-vs-html-5-debate-dilemma.html">http://www.amazedsaint.com/2010/10/silverlight-vs-html-5-debate-dilemma.html</a></li>
<li><a href="http://www.itwriting.com/blog/3127-microsoft-wrestles-with-html5-vs-silverlight-futures.html">http://www.itwriting.com/blog/3127-microsoft-wrestles-with-html5-vs-silverlight-futures.html</a></li>
<li><a href="http://team.silverlight.net/announcement/pdc-and-silverlight/">http://team.silverlight.net/announcement/pdc-and-silverlight/</a></li>
<li><a href="http://www.itwriting.com/blog/3921-where-is-microsoft-going-with-its-rich-client-api-microsoft-drops-some-clues-as-developers-fret.html">http://www.itwriting.com/blog/3921-where-is-microsoft-going-with-its-rich-client-api-microsoft-drops-some-clues-as-developers-fret.html</a></li>
<li><a href="http://andrewtokeley.net/archive/2010/09/04/when-should-you-use-silverlight.aspx">http://andrewtokeley.net/archive/2010/09/04/when-should-you-use-silverlight.aspx</a></li>
<li></li>
</ul>
<p>This leaves many developers wondering about the future of .NET itself when Microsoft does not actually create any major Windows applications using .NET but rather uses native compiled applications for their better performance.</p>
<p>For instance even though Microsoft totally revamped Office apps in 2007, they did not resort to using .NET to architect these.</p>
<p>Likewise, Microsoft Office is not architected with .NET and has a much better user interface than the browser webmail version which demonstrates the limitations of browser-based rich client application development.</p>
<p><strong>If you follow the arguments currently flying around the web, Silverlight and .NET are just not fast enough for major enterprise-wide rich client major applications, and Winforms is still the preferred technology base for such applications.</strong></p>
<p>I know where this leaves me, very happy that I did not change to .NET and abandon Delphi Win32 and its fast natively compiled Windows applications with full access to Windows API&#8217;s and memory management, with potential to have native Win64, MacOS compiled apps in the near future.</p>
<p>Furthermore, <strong>HTML5 web client solutions need data driven web servers</strong>, and these can be created in Delphi 32, Delphi 64, Delphi Prism .NET or Delphi PHP or C++ Builder, depending on your fancy, either with REST/JSON, SOAP/XML, REMObjects or other messaging and with either Azure, Amazon EC2 cloud, DBExpress, ADO, ADO.NET or ASP.NET data technologies, and all with the same RAD Studio programming tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.desiderata.com.au/blog/?feed=rss2&#038;p=389</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating database agnostic and database engine agnostic applications in Delphi</title>
		<link>http://www.desiderata.com.au/blog/?p=371</link>
		<comments>http://www.desiderata.com.au/blog/?p=371#comments</comments>
		<pubDate>Fri, 18 Feb 2011 00:47:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.desiderata.com.au/blog/?p=371</guid>
		<description><![CDATA[Two major dilemmas arise with database application development: How to manage the different SQL dialects: whilst sticking to ANSI-SQL 92 syntax will help, particularly with table joins, data conversion or calculation routines and simple data elements such as current date vary with each database vendor making code re-use a nightmare. if you ever plan in&#8230;]]></description>
				<content:encoded><![CDATA[<p>Two major dilemmas arise with database application development:</p>
<p><strong>How to manage the different SQL dialects:</strong></p>
<ul>
<li>whilst sticking to ANSI-SQL 92 syntax will help, particularly with table joins, data conversion or calculation routines and simple data elements such as current date vary with each database vendor making code re-use a nightmare.</li>
<li>if you ever plan in supporting multiple vendors such as MS SQL server and Oracle, then you need to consider your application design to factor this in.</li>
</ul>
<p><strong>How to swap between different database engines:</strong></p>
<ul>
<li>DB Express may be fine for many functions, but it has limitations which are not present in Borland Database Engine (BDE), or you may wish to use ADO or other engine technology.</li>
<li>unfortunately, each engine technology has different programming syntax, and indeed different non-visual Delphi components for the database connection and the TQuery component.</li>
<li>furthermore, they tend to return different data types, for example DBX uses TSQLTimeStamp while BDE uses TDateTime, while BDE and ADO differ on how they determine which field is a numeric or integer field. This makes using persistent fields problematic.</li>
</ul>
<h2>On my research, there are 5 main Delphi approaches:</h2>
<h3>The traditional Delphi / MIDAS / Datasnap approach:</h3>
<ul>
<li>see <a href="http://www.desiderata.com.au/blog/?p=251">here</a> for details on how I use this approach</li>
<li>this requires maintaining separate datamodules for each database engine, and potentially separate datamodules for different vendors unless you write code to manually modify SQL statements dynamically.</li>
<li>easy to visualise and TClientDatasets work as designed with persistent fields, but not so easy to maintain as you need to remember to add your modifications to each version of datamodule.</li>
</ul>
<h3>The Dimeric Virtual Database approach:</h3>
<ul>
<li>in 2002, Dimeric Software created a database abstraction technology (VDB) for Delphi 6 to help address the above issues and add extra functionality such as database connection pooling, enhanced transaction capabilities, enhanced control over prepared queries, etc.</li>
<li>it uses interfaces to abstract the Dephi components such as TDatabase, TDataset and TDatasetProvider but leaves TClientDataset unchanged.</li>
<li>they support the following database engines BDE, ADO (dbGo), DBX (DataSnap), IBX (Interbase Express), ADS (Advantage database server), DBISAM, and Flash Filer 2.</li>
<li>it uses a set of &#8220;Function Escapes&#8221; to convert SQL statements to vendor specific statements on the fly &#8211; ie. in your SQL statement you would use [today()] and the VDB will convert this into the vendor specific SQL command to retrieve today&#8217;s date.</li>
<li>they have support for the following database vendors or dialects: MS SQL Server, Sybase, Oracle, Interbase, Informix, MySQL, Paradox, DB2, and MS Access.</li>
<li>this interface approach is powerful and inexpensive ($US99) but may not be the easiest to use if you wish to use persistent fields in TClientDatasets</li>
<li>see <a href="http://www.dimeric.com">their website</a> for more details.</li>
<li>Misha Charrett utilises this technology in his CSI Distributed Application Development Framework which makes developing multi-threaded applications easier &#8211; see <a href="http://www.csinnovations.com/framework_delphi.htm">here</a>. This is freely available for use but does require Delphi 2005 or higher.</li>
</ul>
<h3>RemObjects Data Abstract:</h3>
<ul>
<li>a more expensive solution (~$US990) which will require you to replace TClientDatasets with their equivalent component as well as all the other non-visual database connection components.</li>
<li>you will not be able to use persistent fields but all fields on the client side are declared in the classes which means a change in the way you approach programming.</li>
<li>uses Schema to handle different database vendors</li>
<li>it does allow for data push functionality</li>
<li>there is no easy conversion from a legacy Delphi application.</li>
<li>see <a href="http://www.desiderata.com.au/blog/?page_id=354">here</a> for more details.</li>
</ul>
<h3>kbmMW Development Framework:</h3>
<ul>
<li><a href="http://components4developers.com/">kbmMW</a> is another option which may be considered and new licence for the Professional version is $US478</li>
<li>they do have a free, limited functionality version without source code but only for the current version of Delphi.</li>
<li>supports different  database backends directly without having to write any code.</li>
<li>advanced connection pooling on both client to  server and server to database, caching of result sets on both client to server  and server to database</li>
<li>can mimic as a SOAP server, a WEB server, a AJAX server, a AMF3  server</li>
<li>only the Enterprise version supports multiple messaging topologies incl. Peer  2 Peer, Hub/Spoke and Broadcast using Publish/Subscribe based messaging via  multiple types of fully developer accessible and configurable  message  queues</li>
<li>supports client side controlled transactions, and supports transactions, even spanning multiple databases.</li>
<li>supports most database vendors</li>
<li>Automated       datastore/database connectivity recovery on connection loss or database        breakdown</li>
<li>compiled as an assembly, kbmMW can be used,  feature complete, from within VS.Net to develop both client and server side  code</li>
<li>a native PHP extension exists for both Win32 and Linux that allow  direct access to a kbmMW based application server</li>
<li>an application server can also be accessed from portable devices via a fully portable native C client, a Compact Framework compatible native  C# client, a SOAP interface, or an XML interface (only available in Enterprise version).</li>
<li>the free version &#8220;CodeGear&#8221; is available for Delphi versions 2007 and later.</li>
<li>unfortunately, attempting to install this D2007 version failed with the latest Indy version installed, it presumably needs the Indy version shipped with Delphi 2007 (ie. Indy 10.1). Design package could not load as procedure entry point @Idtcpclient@TIdTCPClientCustom@SetBoundPortMin$qqrxi could not be located in IndyCore100.bpl.  The difference in the Indy source seems to be that the constant for this procedure is now TIdPort:Word instead of integer;</li>
<li>this is an issue as the CSI framework requires the latest Indy version installed.</li>
</ul>
<h3>ASTA:</h3>
<ul>
<li><strong><a href="http://www.astatech.com/index.asp">ASTA</a> </strong>is another data abstraction technology from the 1990&#8242;s</li>
<li>in Nov 2010, they announced ASTA 4 with Unicode support for Delphi 2009, 2010 and XE.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.desiderata.com.au/blog/?feed=rss2&#038;p=371</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
