<?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>Andreano Lanusse &#124; Technology and Software Development &#187; Embarcadero</title>
	<atom:link href="http://www.andreanolanusse.com/en/tag/embarcadero/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.andreanolanusse.com/en</link>
	<description>Where Andreano Lanusse talk about technology, software development, programming techniques, databases, games and more through articles, tutorials and videos</description>
	<lastBuildDate>Sat, 04 Feb 2012 01:01:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>FireMonkey 3D Text Editor</title>
		<link>http://www.andreanolanusse.com/en/firemonkey-3d-text-editor/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=firemonkey-3d-text-editor</link>
		<comments>http://www.andreanolanusse.com/en/firemonkey-3d-text-editor/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 00:58:59 +0000</pubDate>
		<dc:creator>Andreano Lanusse</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Embarcadero]]></category>
		<category><![CDATA[FireMonkey]]></category>

		<guid isPermaLink="false">http://www.andreanolanusse.com/en/?p=782</guid>
		<description><![CDATA[<p>If you want to learn more about FireMonkey 3D applications, join me on February 14th for the Delphi Birthday Celebration webinar. During this webinar we will have several Delphi experts and members of our R&#38;D team showing great technologies using Delphi. I will be there as well showing something that I have been working for a [...]</p><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></description>
			<content:encoded><![CDATA[<p>If you want to learn more about <a href="http://www.embarcadero.com/products/firemonkey" target="_blank">FireMonkey</a> 3D applications, join me on February 14th for the <a href="http://forms.embarcadero.com/forms/AMUSCA1202DelphiBDayCelebration2-14" target="_blank">Delphi Birthday Celebration webinar</a>.</p>
<p>During this webinar we will have several Delphi experts and members of our R&amp;D team showing great technologies using Delphi. I will be there as well showing something that I have been working for a while, the FireMonkey 3D Text Editor, during the webinar I will show you how it was created and share many tips &amp; tricks related with FireMonkey development.</p>
<p>Bellow some screen shots of what I&#8217;m planning to show:</p>
<div id="attachment_783" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.andreanolanusse.com/en/wp-content/uploads/2012/02/3DEditor-IDE.png"><img class="size-medium wp-image-783 " title="3D Text Editor in the IDE" src="http://www.andreanolanusse.com/en/wp-content/uploads/2012/02/3DEditor-IDE-300x187.png" alt="" width="300" height="187" /></a><p class="wp-caption-text">3D Text Editor in the IDE</p></div>
<p>&nbsp;</p>
<div id="attachment_784" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.andreanolanusse.com/en/wp-content/uploads/2012/02/3DEditor-App.png"><img class="size-medium wp-image-784" title="The 3D Text Editor running on Windows" src="http://www.andreanolanusse.com/en/wp-content/uploads/2012/02/3DEditor-App-300x187.png" alt="" width="300" height="187" /></a><p class="wp-caption-text">The 3D Text Editor running on Windows, it runs on Mac as well <img src='http://www.andreanolanusse.com/en/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></div>
<p>&nbsp;</p>
<div id="attachment_785" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.andreanolanusse.com/en/wp-content/uploads/2012/02/3D-exported-image.png"><img class="size-medium wp-image-785" title="Image generated by the 3D Text Editor" src="http://www.andreanolanusse.com/en/wp-content/uploads/2012/02/3D-exported-image-300x158.png" alt="" width="300" height="158" /></a><p class="wp-caption-text">Image generated by the 3D Text Editor</p></div>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.andreanolanusse.com/en/android-apps-connected-to-delphi-datasnap-server/" title="Android apps connected to Delphi DataSnap Server">Android apps connected to Delphi DataSnap Server</a></li><li><a href="http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/" title="Using Regular Expression on C++Builder FireMonkey Application">Using Regular Expression on C++Builder FireMonkey Application</a></li><li><a href="http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/" title="Using dbExpress Framework on Windows and Mac with C++Builder">Using dbExpress Framework on Windows and Mac with C++Builder</a></li><li><a href="http://www.andreanolanusse.com/en/connecting-to-postgresql-through-dbexpress-odbc-driver/" title="Connecting to PostgreSQL through dbExpress ODBC driver">Connecting to PostgreSQL through dbExpress ODBC driver</a></li><li><a href="http://www.andreanolanusse.com/en/creating-xml-files-with-delphi-and-firemonkey-on-mac/" title="Creating XML files with Delphi and FireMonkey on Mac">Creating XML files with Delphi and FireMonkey on Mac</a></li><li><a href="http://www.andreanolanusse.com/en/video-delphi-xe2-and-firemonkey-app-on-windows-mac-and-ios/" title="Video: Delphi XE2 and FireMonkey app on Windows, Mac and iOS">Video: Delphi XE2 and FireMonkey app on Windows, Mac and iOS</a></li></ul><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.andreanolanusse.com/en/firemonkey-3d-text-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Development, technologies and other matters #5</title>
		<link>http://www.andreanolanusse.com/en/software-development-technologies-and-other-matters-5/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=software-development-technologies-and-other-matters-5</link>
		<comments>http://www.andreanolanusse.com/en/software-development-technologies-and-other-matters-5/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 12:00:44 +0000</pubDate>
		<dc:creator>Andreano Lanusse</dc:creator>
				<category><![CDATA[Monthly Summary]]></category>
		<category><![CDATA[Embarcadero]]></category>

		<guid isPermaLink="false">http://www.andreanolanusse.com/en/?p=779</guid>
		<description><![CDATA[<p>My monthly summary is back after long time, let&#8217;s try to keep this up to date every month Jailbreak for iPhone 4S and iPad 2 finally available, hackers had a lot of work to break the new Apple A5 devices. If you are interested to know how to use the Cloud to scale your applications, [...]</p><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></description>
			<content:encoded><![CDATA[<p>My monthly summary is back after long time, let&#8217;s try to keep this up to date every month <img src='http://www.andreanolanusse.com/en/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ul>
<li><a href="http://greenpois0n.com/?page_id=18" target="_blank">Jailbreak</a> for iPhone 4S and iPad 2 finally available, hackers had a lot of work to break the new Apple A5 devices.</li>
<li>If you are interested to know how to use the Cloud to scale your applications, the Netflix team posted a really nice article sharing their experience with Amazon <a href="http://techblog.netflix.com/2012/01/auto-scaling-in-amazon-cloud.html" target="_blank">&#8220;Auto Scaling in the Amazon Cloud&#8221;</a></li>
<li>I&#8217;m a iPhone fun, maybe switching for Nokia Lumia 900 (Windows Phone) in the future, and Android is not part of my plan. A few weeks ago I saw this article &#8220;<a href="http://parislemon.com/post/15604811641/why-i-hate-android" target="_blank">Why I Hate Android</a>&#8220;, it is at least interesting.</li>
<li>The browser war continues, <a href="http://mashable.com/2012/01/03/internet-explorer-chrome-browser-wars/" target="_blank">Chrome is winning</a> and IE still the number one, not sure for how long</li>
<li><strong>Delphi Open Source Project of the Month</strong> &#8211; <a href="http://code.google.com/p/delphi-orm/" target="_blank">DORM</a> is an ORM framework for Delphi created by <a href="http://danieleteti.it" target="_blank">Daniele Teti</a></li>
<li>If you need to convert your Delphi and C++Builder VCL projects to FireMonkey, check out this solution called <a href="http://www.midaconverter.com/" target="_blank">Mida</a> a commercial product that convert VCL projects to FireMonkey</li>
<li>TMS Software releases <a href="http://www.tmssoftware.com/site/tmsfmxiw.asp" target="_blank">TMS Instrumentation Workshop</a> for FireMonkey, a set of components for instrumentation and multimedia applications for FireMonkey, it support Windows, Mac and iOS</li>
<li>Great opportunity for Embarcadero customers - <a href="http://www.embarcadero.com/bogo-info" target="_blank">BOGO</a> is back!!! &#8211; Buy One Developer Tool, Get a Second Tool FREE!</li>
<li>Great <a href="http://members.adug.org.au/2011/12/15/how-to-create-your-own-firemonkeyimage-filtereffect-to-use-with-firemonkey/" target="_blank">post</a> showing how to create FireMonkey shader effects</li>
</ul>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.andreanolanusse.com/en/firemonkey-3d-text-editor/" title="FireMonkey 3D Text Editor">FireMonkey 3D Text Editor</a></li><li><a href="http://www.andreanolanusse.com/en/amazon-web-service-aws-is-the-first-choice-for-php-developers/" title="Amazon Web Services (AWS) is the first choice for PHP Developers">Amazon Web Services (AWS) is the first choice for PHP Developers</a></li><li><a href="http://www.andreanolanusse.com/en/android-apps-connected-to-delphi-datasnap-server/" title="Android apps connected to Delphi DataSnap Server">Android apps connected to Delphi DataSnap Server</a></li><li><a href="http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/" title="Using Regular Expression on C++Builder FireMonkey Application">Using Regular Expression on C++Builder FireMonkey Application</a></li><li><a href="http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/" title="Using dbExpress Framework on Windows and Mac with C++Builder">Using dbExpress Framework on Windows and Mac with C++Builder</a></li><li><a href="http://www.andreanolanusse.com/en/merry-christmas-and-a-fantastic-2012-to-everybody/" title="Merry Christmas and a fantastic 2012 to everybody">Merry Christmas and a fantastic 2012 to everybody</a></li></ul><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.andreanolanusse.com/en/software-development-technologies-and-other-matters-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Amazon Web Services (AWS) is the first choice for PHP Developers</title>
		<link>http://www.andreanolanusse.com/en/amazon-web-service-aws-is-the-first-choice-for-php-developers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amazon-web-service-aws-is-the-first-choice-for-php-developers</link>
		<comments>http://www.andreanolanusse.com/en/amazon-web-service-aws-is-the-first-choice-for-php-developers/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 08:58:13 +0000</pubDate>
		<dc:creator>Andreano Lanusse</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Embarcadero]]></category>

		<guid isPermaLink="false">http://www.andreanolanusse.com/en/?p=775</guid>
		<description><![CDATA[<p>Today I was reading the article &#8220;Developers will flock to public cloud in 2012&#8243;, which pretty much goes over some of the results of Zend survey with 3,335 developers, and of course if not all of them the majority PHP developers. This survey brings some interesting information, the first one related with the use of [...]</p><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></description>
			<content:encoded><![CDATA[<p>Today I was reading the article <a href="http://gigaom.com/cloud/developers-will-flock-to-public-cloud-in-2012/" target="_blank">&#8220;Developers will flock to public cloud in 2012&#8243;</a>, which pretty much goes over some of the results of Zend survey with 3,335 developers, and of course if not all of them the majority PHP developers.</p>
<p>This survey brings some interesting information, the first one related with the use of public cloud where 61 percent said they expect to use a public cloud for their projects.</p>
<p><a href="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/zend_survey2012-1.jpg"><img class="aligncenter size-full wp-image-776" title="Use of public Cloud - Zend Survey" src="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/zend_survey2012-1.jpg" alt="" width="539" height="354" /></a></p>
<p>And, of those going that route, 30 percent named Amazon Web Services as their public cloud of choice; 28 percent did not yet know which cloud they would use; 10 percent named Rackspace; and 6 percent cited Microsoft Azure.  ”Other” public clouds came in at 5 percent and IBM Smart Cloud at 3 percent.</p>
<p><a href="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/zend_survey2012-2.jpg"><img class="aligncenter size-full wp-image-777" title="Which Cloud - Zend survey" src="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/zend_survey2012-2.jpg" alt="" width="589" height="410" /></a></p>
<p>In terms of overall type of projects, 66 percent of respondents said they will be doing mobile development in 2012, this is a great opportunity for them to try <a href="http://www.embarcadero.com/products/radphp" target="_blank">RadPHP XE2</a> which bring integration with PhoneGap, components for jQuery Mobile and everything they need to optimize their web apps to mobile.</p>
<p>Also 45 percent said they will work on social media integration this year, if they are targeting Facebook another opportunity to try RadPHP XE2 and see how they can rapidly integrate web application with Facebook.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.andreanolanusse.com/en/firemonkey-3d-text-editor/" title="FireMonkey 3D Text Editor">FireMonkey 3D Text Editor</a></li><li><a href="http://www.andreanolanusse.com/en/software-development-technologies-and-other-matters-5/" title="Software Development, technologies and other matters #5">Software Development, technologies and other matters #5</a></li><li><a href="http://www.andreanolanusse.com/en/android-apps-connected-to-delphi-datasnap-server/" title="Android apps connected to Delphi DataSnap Server">Android apps connected to Delphi DataSnap Server</a></li><li><a href="http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/" title="Using Regular Expression on C++Builder FireMonkey Application">Using Regular Expression on C++Builder FireMonkey Application</a></li><li><a href="http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/" title="Using dbExpress Framework on Windows and Mac with C++Builder">Using dbExpress Framework on Windows and Mac with C++Builder</a></li><li><a href="http://www.andreanolanusse.com/en/merry-christmas-and-a-fantastic-2012-to-everybody/" title="Merry Christmas and a fantastic 2012 to everybody">Merry Christmas and a fantastic 2012 to everybody</a></li></ul><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.andreanolanusse.com/en/amazon-web-service-aws-is-the-first-choice-for-php-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android apps connected to Delphi DataSnap Server</title>
		<link>http://www.andreanolanusse.com/en/android-apps-connected-to-delphi-datasnap-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=android-apps-connected-to-delphi-datasnap-server</link>
		<comments>http://www.andreanolanusse.com/en/android-apps-connected-to-delphi-datasnap-server/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 08:15:55 +0000</pubDate>
		<dc:creator>Andreano Lanusse</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[DataSnap]]></category>
		<category><![CDATA[Embarcadero]]></category>

		<guid isPermaLink="false">http://www.andreanolanusse.com/en/?p=771</guid>
		<description><![CDATA[<p>On the following video I&#8217;m showing how you can create DataSnap REST Server in Delphi, expose server methods and call them from an Android application. The video shows all the steps to create the server and the Android application. This is a short recap of the video. In order to have other platforms connecting and [...]</p><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></description>
			<content:encoded><![CDATA[<p>On the following video I&#8217;m showing how you can create DataSnap REST Server in Delphi, expose server methods and call them from an Android application. The video shows all the steps to create the server and the Android application.</p>
<p><iframe width="480" height="360" src="http://www.youtube.com/embed/0pM6VjZGqLA" frameborder="0" allowfullscreen></iframe><br />
This is a short recap of the video.</p>
<p>In order to have other platforms connecting and interacting with your DataSnap Server you need to enable the REST Interface, and for mobile platforms you can use the DataSnap Connectors that generate proxy classes for Android, BlackBerry, Windows Phone and iOS. In the video I&#8217;m showing how to create the Server, let&#8217;s take a look at the Server Method implementation.</p>
<p>The first server method called InsertCountry, connect on my InterBase database and add a new record to the Country table, see the implementation below:</p>
<pre class="brush: delphi">function TServerMethods1.InsertCountry(Country, Currency: String;
  out Error: String): Boolean;
var
  Comm: TDBXCommand;
begin

  Result := False;

  DBConn.Open;
  Comm := DBConn.DBXConnection.CreateCommand;
  Comm.CommandType := TDBXCommandTypes.DbxSQL;
  Comm.Text :=
    Format('Insert Into Country (COUNTRY, CURRENCY) Values ( ''%s'', ''%s'')',
    [Country, Currency]);

  if not Comm.IsPrepared then
    Comm.Prepare;

  try
    Comm.ExecuteUpdate;
    Comm.Free;
    Result := True;
  except on E: Exception do
    Error := E.Message;
  end;

end;</pre>
<p>The second server method is called GetCountries, and returns all the records I have in the COUNTRY table on my InterBase database. This method returns a DBXReader and DataSnap will convert this automatically to JSON at the moment the Android app calls this method, but since we will use the new DataSnap Connector to generate the proxy class, we won&#8217;t need to handle the JSON object and I will explain that after.</p>
<p>The following code represents the GetCountries implementation.</p>
<pre class="brush: delphi">
function TServerMethods1.GetCountries: TDBXReader;
var
  Comm: TDBXCommand;
begin

  DBConn.Open;
  Comm := DBConn.DBXConnection.CreateCommand;
  Comm.CommandType := TDBXCommandTypes.DbxSQL;
  Comm.Text := 'Select * from Country';

  if not Comm.IsPrepared then
    Comm.Prepare;

  Result := Comm.ExecuteQuery;

end;
</pre>
<p>The next step is to create the proxy class for Android using the DataSnap connectors, which is a new feature in Delphi XE2. The generation can be done through command line or via HTTP request on your DataSnap server, and in the video I&#8217;m showing how to do that.</p>
<p>The proxy generator generates only the DSProxy.java, all the other files part of the DataSnap Connectors are the representation of DataSnap Framework in Java, for example you won&#8217;t need to parse the DBXReader as JSON object in Java, just because we have the DBXReader class in Java and it parses the JSON object for you.</p>
<p>The first step to create a REST connection with your DataSnap Server, which will give me a instance of DSRESTConnection. If your DataSnap Server requires authentication you can use the methods SetUserName and SetPassword to define the credentials.</p>
<pre class="brush: java">	private DSRESTConnection getConnection() {
		DSRESTConnection conn = new DSRESTConnection();
		conn.setHost("192.168.254.128");
		conn.setPort(8080);
		return conn;
	}</pre>
<p>Now, let&#8217;s take a look and see how to execute the server methods, starting with the InsertCountry method as you can see in the following code.</p>
<p>After instantiation of the DSRESTConnection, we pass the REST connection object to the TServerMethods1&#8242;s instance, which is the client representation of TServerMethods1 on the server, and from there just call InsertCountry.</p>
<p>Since InsertCountry returns Boolean and also the Error message parameter is passed as reference, InsertCountry methods will return a InsertCountryReturns, which is a static class with two parameters: error that represent the error message and returnValue which represent the value return by InsertCountry.</p>
<pre class="brush: java">protected void Insert() {

	DSRESTConnection conn = getConnection();

	TServerMethods1 sm = new TServerMethods1(conn);

	try {
		InsertCountryReturns ret;
		ret = sm.InsertCountry(editCountry.getText().toString(), editCurrency.getText().toString(), "");

		if ( ! ret.returnValue ) {
			System.out.println(ret.error);
		}

	} catch (DBXException e) {
		e.printStackTrace();
	}

	// Hide keyboard
	InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
	imm.hideSoftInputFromWindow(editCountry.getWindowToken(),0);

}</pre>
<p>The next method is GetCountries. We start as before by getting the DSRESTConnection instance. The GetCountries method returns a DBXReader and the way we work with the DBXReader class in Java is very similar the way we work in Delphi, use the Next method to interact through the result, and getValue/GetAsXXXXX to get the column value. See the following code:</p>
<pre class="brush: java">protected void Refresh() {

	DSRESTConnection conn = getConnection();

	TServerMethods1 sm = new TServerMethods1(conn);

	TDBXReader reader;
	try {
		reader = sm.GetCountries();

		ArrayList COUNTRIES = new ArrayList();

		while (reader.next()) {
			COUNTRIES.add(reader.getValue("COUNTRY").GetAsString());
		}

		// Add the COUNTRIES array in to the list view
		list.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, COUNTRIES));

	} catch (DBXException e) {
		e.printStackTrace();
	}

}</pre>
<p>This is just a short tutorial explaining how to use DataSnap Connector with Android, take some time and watch the video where I&#8217;m going through more details.</p>
<p>The source code is available for download <a href="http://cc.embarcadero.com/download.aspx?id=28682" target="_blank">here</a> and download the video from <a href="http://cc.embarcadero.com/download.aspx?id=28683" target="_blank">here</a>.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.andreanolanusse.com/en/video-connecting-android-applications-with-datasnap-server-delphi-conference-brazil-2010/" title="Video: Connecting Android applications with DataSnap Server – Delphi Conference Brazil 2010">Video: Connecting Android applications with DataSnap Server – Delphi Conference Brazil 2010</a></li><li><a href="http://www.andreanolanusse.com/en/firemonkey-3d-text-editor/" title="FireMonkey 3D Text Editor">FireMonkey 3D Text Editor</a></li><li><a href="http://www.andreanolanusse.com/en/android-apps-connected-to-cbuilder-datasnap-server/" title="Android apps connected to C++Builder DataSnap Server">Android apps connected to C++Builder DataSnap Server</a></li><li><a href="http://www.andreanolanusse.com/en/copyreadertoclientdataset-blob-and-the-message-feature-not-implemented/" title="CopyReaderToClientDataSet, Blob and the message &#8220;Feature not implemented&#8221;">CopyReaderToClientDataSet, Blob and the message &#8220;Feature not implemented&#8221;</a></li><li><a href="http://www.andreanolanusse.com/en/publishing-providers-when-registering-datasnap-server-class-in-runtime/" title="Publishing providers when registering DataSnap Server Class in runtime">Publishing providers when registering DataSnap Server Class in runtime</a></li><li><a href="http://www.andreanolanusse.com/en/caching-data-on-datasnap-server/" title="Caching data on DataSnap Server">Caching data on DataSnap Server</a></li></ul><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.andreanolanusse.com/en/android-apps-connected-to-delphi-datasnap-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Regular Expression on C++Builder FireMonkey Application</title>
		<link>http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-regular-expression-on-cbuilder-firemonkey-application</link>
		<comments>http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 22:11:14 +0000</pubDate>
		<dc:creator>Andreano Lanusse</dc:creator>
				<category><![CDATA[C++Builder]]></category>
		<category><![CDATA[Embarcadero]]></category>
		<category><![CDATA[FireMonkey]]></category>

		<guid isPermaLink="false">http://www.andreanolanusse.com/en/?p=768</guid>
		<description><![CDATA[<p>Here another C++ example showing how to use the RTL regular expression on C++Builder FireMonkey Application. This example  validate a string content based on four different regular expression, which are: Checks if the given text is a validate e-mail address Checks if the given text contains a valid IP address Checks if the given text [...]</p><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></description>
			<content:encoded><![CDATA[<p>Here another C++ example showing how to use the RTL regular expression on <a href="http://www.embarcadero.com/products/cbuilder" target="_blank">C++Builder</a> <a href="http://www.embarcadero.com/products/firemonkey" target="_blank">FireMonkey</a> Application.</p>
<p>This example  validate a string content based on four different regular expression, which are:</p>
<ul>
<li>Checks if the given text is a validate e-mail address</li>
<li>Checks if the given text contains a valid IP address</li>
<li>Checks if the given text is a valid date (dd-mm-yyyy)</li>
<li>Checks if the given text is a valid date (mm-dd-yyyy)</li>
</ul>
<p>The follow code shows the four regular expressions used by this application.</p>
<pre class="brush: cpp">void __fastcall TForm1::lbRegExpChange(TObject *Sender) {
	switch (lbRegExp-&gt;ItemIndex) {
	case 0:
		lbType-&gt;Text = "E-mail for validation";

		MemoRegEx-&gt;Text =
			"^((?&gt;[a-zA-Z\d!#$%&amp;''*+\\-/=?^_`{|}~]+\\x20*" "|\"((?=[\\x01-\\x7f])[^\"\\\\]|\\\\[\\x01-\\x7f])*\"\\"
			"x20*)*(?\.?[a-zA-Z\d!" "#$%&amp;''*+\\-/=?^_`{|}~]+)+|\"\"((?=[\\x01-\\x7f])"
			"[^\"\\\\]|\\\\[\\x01-\\x7f])*\")@(((?!-)[a-zA-Z\\d\\" "-]+(?)$";

		break;
	case 1: {
			// Accept IP address between 0..255
			lbType-&gt;Text = "IP address for validation (0..255)";
			MemoRegEx-&gt;Text =
				"\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\" ".(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\."
				"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b";
			break;

		}
	case 2: {
			// Data interval format mm-dd-yyyy
			lbType-&gt;Text =
				"Date in mm-dd-yyyy format from between 01-01-1900 and 12-31-2099";
			MemoRegEx-&gt;Text =
				"^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[" "01])[- /.](19|20)\\d\\d$";
			break;

		}
	case 3: {
			// Data interval format mm-dd-yyyy
			lbType-&gt;Text =
				"Date in dd-mm-yyyy format from between 01-01-1900 and 31-12-2099";
			MemoRegEx-&gt;Text =
				"^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[01" "2])[- /.](19|20)\\d\\d$";
			break;

		}
	}
	EditTextChangeTracking(EditText);

}</pre>
<p>To execute the validation you can use the method TRegExp::IsMatch as you can see bellow:</p>
<pre class="brush: cpp">void __fastcall TForm1::EditTextChangeTracking(TObject *Sender) {
       // EditText contain the string value and MemoRegEx the regular expression
	if (TRegEx::IsMatch(EditText-&gt;Text, MemoRegEx-&gt;Text)) {
		SEResult-&gt;ShadowColor = TAlphaColors::Green;
	}
	else
		SEResult-&gt;ShadowColor = TAlphaColors::Red;

}</pre>
<p>Since this is a FireMonkey Application, I used a Shadow Effect to show if the Edit box value is valid or not (Green=valid / Red=invalid). The following image shows what happen when you input a invalid e-mail address on Windows and Mac.</p>
<p style="text-align: center;"><a href="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/CBuilderRegExpinAction.png"><img class="aligncenter  wp-image-769" title="Reg Expression in Acton on Windows and Mac" src="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/CBuilderRegExpinAction.png" alt="" width="373" height="386" /></a></p>
<p>Now the results when you provide the correct e-mail address.</p>
<p style="text-align: center;"><a href="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/CBuilderRegExpinAction-green.png"><img class="aligncenter  wp-image-770" title="Regular Expression in Action with C++Builder" src="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/CBuilderRegExpinAction-green.png" alt="" width="373" height="386" /></a></p>
<p>You can download the source code from <strong><a href="https://radstudiodemos.svn.sourceforge.net/svnroot/radstudiodemos/branches/RadStudio_XE2/CPP/RTL/RegExpression/" target="_blank">here</a></strong> or just update your local RAD Studio XE2 samples folder from our RAD Studio SVN <a href="http://radstudiodemos.svn.sourceforge.net/radstudiodemos/" target="_blank">repository</a>.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/" title="Using dbExpress Framework on Windows and Mac with C++Builder">Using dbExpress Framework on Windows and Mac with C++Builder</a></li><li><a href="http://www.andreanolanusse.com/en/firemonkey-3d-text-editor/" title="FireMonkey 3D Text Editor">FireMonkey 3D Text Editor</a></li><li><a href="http://www.andreanolanusse.com/en/connecting-to-postgresql-through-dbexpress-odbc-driver/" title="Connecting to PostgreSQL through dbExpress ODBC driver">Connecting to PostgreSQL through dbExpress ODBC driver</a></li><li><a href="http://www.andreanolanusse.com/en/a-little-bit-about-firemonkey-and-delphi-xe2/" title="A little bit about FireMonkey and Delphi XE2">A little bit about FireMonkey and Delphi XE2</a></li><li><a href="http://www.andreanolanusse.com/en/software-development-technologies-and-other-matters-5/" title="Software Development, technologies and other matters #5">Software Development, technologies and other matters #5</a></li><li><a href="http://www.andreanolanusse.com/en/amazon-web-service-aws-is-the-first-choice-for-php-developers/" title="Amazon Web Services (AWS) is the first choice for PHP Developers">Amazon Web Services (AWS) is the first choice for PHP Developers</a></li></ul><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using dbExpress Framework on Windows and Mac with C++Builder</title>
		<link>http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-dbexpress-framework-on-windows-and-mac-with-cbuilder</link>
		<comments>http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 10:33:58 +0000</pubDate>
		<dc:creator>Andreano Lanusse</dc:creator>
				<category><![CDATA[C++Builder]]></category>
		<category><![CDATA[dbExpress]]></category>
		<category><![CDATA[Embarcadero]]></category>
		<category><![CDATA[FireMonkey]]></category>

		<guid isPermaLink="false">http://www.andreanolanusse.com/en/?p=763</guid>
		<description><![CDATA[<p>During the following weeks I&#8217;m writing a series of C++ examples to demonstrate the use of VCL, FireMonkey, RTL, dbExpress, and others stuff. Each example will have a major focus, but you will be able to learn other stuffs as well. If there is something specific on C++ you would like to see, please let [...]</p><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></description>
			<content:encoded><![CDATA[<p>During the following weeks I&#8217;m writing a series of C++ examples to demonstrate the use of VCL, FireMonkey, RTL, dbExpress, and others stuff. Each example will have a major focus, but you will be able to learn other stuffs as well. If there is something specific on C++ you would like to see, please let me know and I will do my best to bring that in one of my following posts.</p>
<p>In this first post I demonstrate how to use dbExpress Framework to run SQL&#8217;s against your database. Since I want to run the application on Windows and Mac, the console application will target <a href="http://www.embarcadero.com/products/firemonkey" target="_blank">FireMonkey</a>.</p>
<p>The Console Application Wizard for C++ has been updated in <a href="http://www.embarcadero.com/products/cbuilder" target="_blank">C++Builder XE2</a>, adding a Target Framework Option as you can see below.</p>
<p style="text-align: center;"><a href="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/CPPConsoleWizard.png"><img class=" wp-image-764 aligncenter" title="C++Builder Console Application Wizard" src="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/CPPConsoleWizard.png" alt="" width="253" height="184" /></a></p>
<p>The following code shows how to connect to an <a href="http://www.embarcadero.com/products/interbase" target="_blank">InterBase</a> database, execute a SELECT SQL against the COUNTRY table, and display the results, of course you can use dbExpress Framework to run queries against any database supported by dbExpress, just remember that some dbExpress drivers are not available on Mac in XE2, for example SQL Server and ODBC drivers.</p>
<p>If you are C++ developer you will understand pretty quickly the following code, which has some comments to help you to understand the code.</p>
<pre class="brush: cpp">#include &lt;fmx.h&gt;

#pragma hdrstop
#pragma argsused

#include &lt;tchar.h&gt;
#include &lt;stdio.h&gt;
#include &lt;System.SysUtils.hpp&gt;
#include &lt;Data.DBXDynalink.hpp&gt;
#include &lt;Data.DBXCommon.hpp&gt;
#include &lt;Data.DBXInterbase.hpp&gt;
#include &lt;memory&gt;

int _tmain(int argc, _TCHAR* argv[]) {

	// Get database connection instance
	std::auto_ptr&lt;TDBXConnection&gt;conn
		(TDBXConnectionFactory::GetConnectionFactory()-&gt;GetConnection
		("EMPLOYEE", "sysdba", "masterkey"));

	if (conn.get() != NULL) {

		printf("================= Connection Properties ============\n");

		AnsiString s = conn-&gt;ConnectionProperties-&gt;Properties-&gt;Text + "\n";
		printf(s.c_str());

		// create command and transaction objects to execute the query
		std::auto_ptr&lt;TDBXCommand&gt;command(conn-&gt;CreateCommand());

                // initiate a transaction
		TDBXTransaction *transaction =
			conn-&gt;BeginTransaction(TDBXIsolations::ReadCommitted);

		command-&gt;Text = "SELECT * FROM Country";
		command-&gt;Prepare();

		// execute the query and get the cursor (DBXReader)
		std::auto_ptr&lt;TDBXReader&gt;reader(command-&gt;ExecuteQuery());

		// print number of columns and each record
		printf(AnsiString("Number of Columns:" + IntToStr(reader-&gt;ColumnCount) +
			"\n").c_str());

		// display the list of records
		while (reader-&gt;Next()) {
			printf((reader-&gt;Value[reader-&gt;GetOrdinal("COUNTRY")]-&gt;GetAnsiString
				() + "\n").c_str());
		}

		printf("====================================================\n");

		conn-&gt;CommitFreeAndNil(transaction);
	}

	Sleep(5000);
	return 0;
}</pre>
<p>Before you run this code, make sure you have the dbExpress alias EMPLOYEE setup to connect into the EMPLOYEE.GDB database and the InterBase client installed, if everything is ok just compile and run the program on Windows and Mac, the following image shows this application running on Mac.</p>
<p style="text-align: center;"><a href="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/CPPDBXConsoleApp-Mac.png"><img class="wp-image-765 aligncenter" title="C++ application using dbExpress framework on Mac" src="http://www.andreanolanusse.com/en/wp-content/uploads/2012/01/CPPDBXConsoleApp-Mac.png" alt="" width="437" height="515" /></a></p>
<p>There are few things you need to be aware when deploying and running this kind of application on Mac; on my following post I will explain everything about that.</p>
<p>For now we&#8217;ve learned how to use DBX Framework and make the application to compile and run on Windows and Mac.</p>
<p>You can download the source code from <strong><a href="https://radstudiodemos.svn.sourceforge.net/svnroot/radstudiodemos/branches/RadStudio_XE2/CPP/Database/dbExpress/DBXFramework" target="_blank">here</a></strong> or just update your local RAD Studio XE2 samples folder from our RAD Studio SVN <a href="http://radstudiodemos.svn.sourceforge.net/radstudiodemos/" target="_blank">repository</a>.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/" title="Using Regular Expression on C++Builder FireMonkey Application">Using Regular Expression on C++Builder FireMonkey Application</a></li><li><a href="http://www.andreanolanusse.com/en/connecting-to-postgresql-through-dbexpress-odbc-driver/" title="Connecting to PostgreSQL through dbExpress ODBC driver">Connecting to PostgreSQL through dbExpress ODBC driver</a></li><li><a href="http://www.andreanolanusse.com/en/firemonkey-3d-text-editor/" title="FireMonkey 3D Text Editor">FireMonkey 3D Text Editor</a></li><li><a href="http://www.andreanolanusse.com/en/copyreadertoclientdataset-blob-and-the-message-feature-not-implemented/" title="CopyReaderToClientDataSet, Blob and the message &#8220;Feature not implemented&#8221;">CopyReaderToClientDataSet, Blob and the message &#8220;Feature not implemented&#8221;</a></li><li><a href="http://www.andreanolanusse.com/en/a-little-bit-about-firemonkey-and-delphi-xe2/" title="A little bit about FireMonkey and Delphi XE2">A little bit about FireMonkey and Delphi XE2</a></li><li><a href="http://www.andreanolanusse.com/en/new-dbexpress-driver-for-firebird-in-delphi-2010-and-cbuilder-2010/" title="Video: New dbExpress driver for Firebird in Delphi 2010 and C++Builder 2010">Video: New dbExpress driver for Firebird in Delphi 2010 and C++Builder 2010</a></li></ul><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Merry Christmas and a fantastic 2012 to everybody</title>
		<link>http://www.andreanolanusse.com/en/merry-christmas-and-a-fantastic-2012-to-everybody/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=merry-christmas-and-a-fantastic-2012-to-everybody</link>
		<comments>http://www.andreanolanusse.com/en/merry-christmas-and-a-fantastic-2012-to-everybody/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 09:32:17 +0000</pubDate>
		<dc:creator>Andreano Lanusse</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Embarcadero]]></category>

		<guid isPermaLink="false">http://www.andreanolanusse.com/en/?p=761</guid>
		<description><![CDATA[<p>It&#8217;s Christmas, a special day to all of us and the time to have our families together and celebrate. To all my blog readers Merry Christmas!! In a few days starts a new year, and now is time to review our achievements, mistakes and successes in 2011, make plans to improve, set new goals and [...]</p><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s Christmas, a special day to all of us and the time to have our families together and celebrate.</p>
<p>To all my blog readers Merry Christmas!!</p>
<p>In a few days starts a new year, and now is time to review our achievements, mistakes and successes in 2011, make plans to improve, set new goals and be ready to achieve all of them in 2012.</p>
<p>I wish you a prosperous new year and in 2012 you can have the most amazing year of your life.</p>
<p>Regards,<br />
Andreano Lanusse </p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.andreanolanusse.com/en/firemonkey-3d-text-editor/" title="FireMonkey 3D Text Editor">FireMonkey 3D Text Editor</a></li><li><a href="http://www.andreanolanusse.com/en/software-development-technologies-and-other-matters-5/" title="Software Development, technologies and other matters #5">Software Development, technologies and other matters #5</a></li><li><a href="http://www.andreanolanusse.com/en/amazon-web-service-aws-is-the-first-choice-for-php-developers/" title="Amazon Web Services (AWS) is the first choice for PHP Developers">Amazon Web Services (AWS) is the first choice for PHP Developers</a></li><li><a href="http://www.andreanolanusse.com/en/android-apps-connected-to-delphi-datasnap-server/" title="Android apps connected to Delphi DataSnap Server">Android apps connected to Delphi DataSnap Server</a></li><li><a href="http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/" title="Using Regular Expression on C++Builder FireMonkey Application">Using Regular Expression on C++Builder FireMonkey Application</a></li><li><a href="http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/" title="Using dbExpress Framework on Windows and Mac with C++Builder">Using dbExpress Framework on Windows and Mac with C++Builder</a></li></ul><p><a href="http://www.andreanolanusse.com/en">Andreano Lanusse | Technology and Software Development</a><br/>
Follow me on Twitter: <a href="http://twitter.com/andreanolanusse.com">@andreanolanusse</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.andreanolanusse.com/en/merry-christmas-and-a-fantastic-2012-to-everybody/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

