Delphi Xe Ehandbook i4a4q

  • December 2020
  • PDF

This document was ed by and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this report form. Report l4457


Overview 6h3y3j

& View Delphi Xe Ehandbook as PDF for free.

More details h6z72

  • Words: 29,829
  • Pages: 133
'; end;

For the second page, I've added a PageProducer tied to a file and responding to the OnHTMLTag event with the code that I'll show you in a while: object PageProducer1: TPageProducer HTMLFile = 'templates\Sample.html' OnHTMLTag = PageProducer1HTMLTag end

The second component of a page is a WebFileDispatcher, which will be used to return a CSS file and an image, both referenced in the HTML of the page. The WebFileDispatcher uses the standard configuration (basically ready for the DataSnap REST Server model). This component has two collections: •

WebFileExtensions is a list of mime types returned depending on the file extension (like 'text/css' for 'css' or 'text/javascript' for 'js')



WebDirectories is a collection of folders (generally sub-folders of the application folder) to be included or excluded when searching for files. I've kept the default settings of including any sub-folder except the templates one: item DirectoryAction DirectoryMask = end item DirectoryAction DirectoryMask = end

Marco Cantù, Delphi XE Handbook

= dirInclude

'*' = dirExclude

'\templates\*'

Chapter 4: XE Libraries - 107

According to the folder structure behind the component, in fact, the templates folders hosts the HTML file that are not returned directly, but rather through a PageProducer with some server side processing. For the example the Sample.html file connected with the second action has one special processing tag for the PageProducer, <#randomlist>: Web Broker Indy Demo 5m3y4f

Web Broker Indy Demo 1z4e46


Dynamic list of items:
<#randomlist>




The special tag, marked with the hash (#) is processed by the server and replaced with some dynamic HTML, in this case a random list of items: Marco Cantù, Delphi XE Handbook

108 - Chapter 4: XE Libraries procedure TWebModule16.PageProducer1HTMLTag( Sender: TObject; Tag: TTag;const TagString: string; TagParams: TStrings; var ReplaceText: string); var I: Integer; begin if (TagString = 'randomlist') then begin for I := 1 to 20 do ReplaceText := ReplaceText + 'Item ' + IntToStr (Random (100000)) + ' - '; end; end;

When rendered with the provided CSS file (not described here but available in the source code of the example) and the image (my company logo), both served through the WebFileDispatcher component, the resulting page will look like the following:

This new WebBroker architecture is available also for SOAP applications and for the new DataSnap REST Server Application structure, both of which rely on WebBroker as their foundation.

Marco Cantù, Delphi XE Handbook

Chapter 4: XE Libraries - 109

SOAP Improvements Beside the integration with the new Indy VCL WebBroker structure, SOAP has been extended by adding for HTTPS, the ability to integrate Client Certificates in the HTTPRIO component (the one used for the actual remote calls to Web Services) and the ability to import and use the standard WS-Security classes. The certificate is provided by the new ClientCertificate property of the HTTPWebNode property of THTTPRIO. This lets a developer select an existing certificate at design time, or (to be more precise) the serial number of a certificate. For security reasons, in fact, the certificate itself is in not embedded in the program, but has to be distributed along with the application.

Microsoft's Azure Native One of the emerging trends of the current landscape is certainly a large set of technologies collectively indicated by the term “cloud computing”. In general, the term implies using some computing services (storage, U time, or even complete virtual machines) offered by a web farm along with Internet connectivity. In the early days, having set up a large Web farm, Amazon started selling some extra storage and bandwidth as a side activity, but this is now turning into a big business for Amazon, Microsoft, Google, and most other major Internet players. As an example, rather than saving a file on your own web server machine, you can host it on a cloud server, which can make the file available to thousands of concurrent s thanks to higher bandwidth and more balanced servers than you can probably achieve with a single machine or small web farm. Notice that even if the cost is very limited, having your own servers will generally be cheaper... unless you have a usage peak, in which case you'll have to invest a lot of money in infrastructure up front. The nice element of cloud computing is you can use it on-demand and it will easily scale. Although the cloud computing offerings are growing on a daily basis, the core tenets are a few: host files (images, PDFs, files, audio and video to be Marco Cantù, Delphi XE Handbook

110 - Chapter 4: XE Libraries

streamed), host databases (both NOSQL28 database and relational ones), host individual applications or offer complete virtual machines. How do you interact with these systems? Mostly using the REST protocol over HTTP, so that building Delphi client applications for these services can be rather simple (the complexity is generally in managing authentication and encryption for security reasons). The data is moved as XML or JSON, two formats for which Delphi has internal components and extended third-party . In Delphi XE there is native and specific for three of the Microsoft's Azure cloud services: Queue, Tables, and Blobs. There is also integrated in the IDE for deployment over Amazon EC2 (Elastic Cloud Computing), a service to which Microsoft is going to offer competition quite soon. As a practical demo, we are going to show you how to use the Azure service components available in the Delphi XE box for a very simple demo: publish some database data on a hosted database, and create an application that can consume that data. We are going to create two Delphi applications, but an interesting feature is that you can let multiple languages and platforms access the same data.

Delphi XE Components for Azure Delphi XE includes some components for Azure, but also and moreover a number of lower level classes, which is where the real power is. These classes provide ready-to-use methods for performing the various operations and deal with the complicated security requirements of the Azure platform. The core non-visual component is the one used to configure the connection to the service, called TAzureConnectionString. Although this component has a few quirks in its interface (it messes up the Object Inspector in the IDE29) it is a handy starting point in which to enter the name and of your .

28 NOSQL (or NoSQL) databases are a new breed of databases that don't follow the relational model. For more information you can refer to http://nosql-database.org/ or to http://en.wikipedia.org/wiki/NoSQL. 29 See for example the bug report http://qc.embarcadero.com/wc/qcmain.aspx?d=86173 Marco Cantù, Delphi XE Handbook

Chapter 4: XE Libraries - 111

Other visual components offer direct navigation and management of the respective data structures: •

TAzureTableManagement is for NoSQL tables30



TAzureBlobManagement is for binary data (that is, files, images, documents...)



TAzureQueueManagement is for managing queuing services

These management components are very nice to learn about these services and examine their status, but aren't generally a good end tool, safe for the real power s. In practical , you'll generally use the low-level classes behind these components rather than the visual “management” TreeView controls. The three core classes, defined in the DSAzure unit, are: •

The TAzureTableService class



The TAzureBlobService class



The TAzureQueueService class

The Azure101 Demo In the Azure101 project I introduce both the visual components and the low level classes, focusing on the Table and Blob services. The programs loads the settings from an INI file: procedure TAzure101Form.FormCreate(Sender: TObject); var fIni: TMemIniFile; begin fIni := TMemIniFile.Create(GetHomePath + PathDelim + 'azure.ini'); try AzureConnectionString1.Name := fIni.ReadString('azure', 'Name', ''); AzureConnectionString1.Key := fIni.ReadString('azure', 'Key', ''); finally FreeAndNil (fIni); end; end; 30 Microsoft's Azure s both relational databases (a cloud version of SQL Server) and NoSQL tables. You can read about the differences among the two on http://www.intertech.com/Blog/post/Windows-Azure-Table-Storage-vs-Windows-SQL-Azure.aspx. In of ing the Azure SQL Server from Delphi, you can even use dbExpress with the proper connection string. Marco Cantù, Delphi XE Handbook

112 - Chapter 4: XE Libraries

There are two Azure visual controls hooked to this configuration component: object AzureTableManagement1: TAzureTableManagement ConnectionInfo = AzureConnectionString1 Active = False end object AzureBlobManagement1: TAzureBlobManagement ConnectionInfo = AzureConnectionString1 Active = False end

As with a database component, you won't generally activate them at design time. Given they might take some time for the setup, you won't probably even turn them on in the OnCreate event handler. In this demo I do it when a button is pressed: procedure TAzure101Form.btnConnectClick(Sender: TObject); begin Caption := 'Connected to ' + AzureConnectionString1.TableURL; AzureTableManagement1.Active := True; AzureBlobManagement1.Active := True; end;

At this point you can use the two controls for browsing the current Tables and Blob containers of your . You can double click on each of them to open a dialog box with more details. Here is the same information in TreeViews:

Marco Cantù, Delphi XE Handbook

Chapter 4: XE Libraries - 113

The information about tables is limited, and you'll have to double click on a table to open a dialog and see more. For the Blobs, instead, you can drill into the list of elements in each container and also see the list of the properties, the meta data, and the access control list right into the main TreeView. For the Blobs you can also use this view to load new files and set their permissions. The button on the side will copy to the clipboard the main URL for your azure data, which in my case is: http://marcocantu.blob.core.windows.net

You can combine this URL, the container name, and the object name to figure out its public URL, like (if you look again at the image above): http://marcocantu.blob.core.windows.net/mydata/euro.jpg

This can be properly seen in a browser only because I set its Content-Type property to a format browsers should recognize (see the details in the image below). Using a URL like the one above anyone can see the image I ed with a Delphi program. This is the set of properties for the object:

In of the tables, you need to open the details of one to see its structure:

Marco Cantù, Delphi XE Handbook

114 - Chapter 4: XE Libraries

Differently from what you might expect, the table data is not displayed in a grid. In fact, this is not a relational database table, but rather a NoSQL table structure, in which each row can have different fields or, to be more precise, named attributes. Now what is more interesting, of course, is to interact with this table in your code. For example, you can add a new row to a table using the InsertEntity method of the TAzureTableService class. The row information is ed in JSON format, so you can use Delphi's TJSONObject class (from the DBXJSON unit) to define the proper data structure. This must have the RowKey and PartitionKey attributes, defined in Delphi with two constants called XML_ROWKEY and XML_PARTITION. The other element is that some rows can have extra fields, which doesn't mean that other rows have those fields empty, but that they won't have them. In fact there is no schema or definition of a table: the table structure is defined by the contents of the records you add to it. Here is the code used to add a new row to the table: procedure TAzure101Form.btnAddRowClick(Sender: TObject); var TableService: TAzureTableService; RowObj: TJSONObject; begin TableService := TAzureTableService.Create( AzureConnectionString1); try

// prepare the “row” data RowObj := TJSONObject.Create; RowObj.AddPair(XML_ROWKEY, TJSONString.Create( 'ID' + IntToStr (Random (100000)))); RowObj.AddPair(XML_PARTITION, TJSONString.Create( TimeToStr (now))); RowObj.AddPair('name', TJSONString.Create('marco')); RowObj.AddPair('site', TJSONString.Create( 'www.marcocantu.com')); if CheckBox1.Checked then RowObj.AddPair('twitter', TJSONString.Create('marcocantu'));

// now add the row to the table Log (TableService.InsertEntity('marco1', RowObj)); finally TableService.Free; end; end;

The other operation done by the program is to query the table for the list of records. This is accomplished with some rather simple code:

Marco Cantù, Delphi XE Handbook

Chapter 4: XE Libraries - 115 var TableService: TAzureTableService; begin TableService := TAzureTableService.Create( AzureConnectionString1); try Log(TableService.QueryEntities('marco1'));

The result of this call, however, uses an XML format (basically an ATOM format) that the program logs without parsing it. You'll get something like: marco1 26733h http://marcocantu.table.core.windows.net/marco1 2011-05-27T22:11:48Z <entry> http://marcocantu.table.core.windows.net/ marco1(PartitionKey='1',RowKey='2') 2a1yg 2011-05-27T22:11:48Z <m:properties> 1 2 2010-09-08T11:36:24.4320437Z myself <entry> http://marcocantu.table.core.windows.net/ marco1(PartitionKey='10%3A50%3A09%20AM',RowKey='ID20195') 2a1yg 2011-05-27T22:11:48Z <m:properties> 10:50:09 AM ID20195 2010-11-18T09:50:16.7935308Z marco www.marcocantu.com marcocantu ...

The interesting element of this approach is that once we have created this data structure (or table), it can be used by anyone with the proper permissions and an Internet connection. There is a cost associated, of course, but quite minimal compared to alternative hosting solutions.

Marco Cantù, Delphi XE Handbook

116 - Chapter 4: XE Libraries

The Azure Publish and Consume Demo The Azure101 demo can get you started using Delphi's Azure , but it certainly falls short in of demonstrating its usefulness. The “management” views are quite nice, but that's hardly the interface you'll want to present to an average end . That's why I decided to add a second demo, made of two programs: •

The first is a publishing application that pulls data from a database and makes it available in an online Azure Table, while the content of graphical fields is published in an Azure Blob.



The second is a browsing application that pulls the data from the Azure cloud storage and shows it to the end . Notice that this way the end doesn't require a connection to the database and can benefit from the high bandwidth offered by Azure.

To stick to a classic Delphi theme, the database in question is the Biolife table from the FishFact database. In this case I'm using the ClientDataSet version for simplicity. Let's look at the CloudPublish application first. The main form of this program has two fields referring to the services we are going to use: private TableService: TAzureTableService; BlobService: TAzureBlobService;

These are initialized in the OnCreate event handler after loading the settings from the INI file, like in the previous example. Before publishing the data, you have to create the corresponding containers. const tablename = 'biolife'; procedure TFormCloudPublish.btnCreateTableClick(Sender: TObject); begin TableService.CreateTable (tablename); BlobService.CreateContainer(tablename) end;

There is also a second button for emptying and deleting these containers, in case you want to start over. To publish the data of a single record, we have to create a JSON data structure, include a row key (in this case the record id) and a partition key (in this case a time stamp), and also post a stream with the image using as name the same record id: Marco Cantù, Delphi XE Handbook

Chapter 4: XE Libraries - 117 procedure TFormCloudPublish.btnPostOneClick(Sender: TObject); var strTable: string; RowObj: TJSONObject; content: TBytes; begin RowObj := TJSONObject.Create; RowObj.AddPair (XML_ROWKEY, TJSONString.Create (cdsBioSpeciesNo.AsString)); RowObj.AddPair (XML_PARTITION, TJSONString.Create (TimeToStr (now))); RowObj.AddPair('category', TJSONString.Create(cdsBioCategory.AsString)); RowObj.AddPair('commonname', TJSONString.Create(cdsBioCommon_Name.AsString)); RowObj.AddPair('speciesname', TJSONString.Create(cdsBioSpeciesName.AsString)); RowObj.AddPair('length', TJSONString.Create(cdsBioLengthcm.AsString)); RowObj.AddPair('notes', TJSONString.Create(cdsBioNotes.AsString)); TableService.InsertEntity(tablename, RowObj); BlobService.PutBlockBlob(tablename, cdsBioSpeciesNo.AsString + '.jpg', JpegContentOf, '', nil, 'image/jpeg'); end;

The image is published as a JPEG, which means we have to transform it from the original bitmap format to the new format, using a temporary memory stream: function TFormCloudPublish.JpegContentOf: TBytes; var jpgImg: TJPEGImage; aStream: TMemoryStream; begin Image1.Picture.Assign(cdsBioGraphic); jpgImg := TJPEGImage.Create; aStream := TMemoryStream.Create; try jpgImg.Assign(Image1.Picture.Graphic); jpgImg.SaveToStream (aStream); aStream.Position := 0; SetLength(Result, aStream.Size); aStream.ReadBuffer(Result[0], aStream.Size); finally jpgImg.Free; aStream.Free; end; end;

Marco Cantù, Delphi XE Handbook

118 - Chapter 4: XE Libraries

Another button let's you scan the database table and post each record. I haven't told much about the interface of this program because it is very bare bones.

Now let's look at the browsing application, called CloudBrowse. When this form is created, it does an initialization similar to the other Azure programs. For this demo, I'm using a single , but you can set up Azure to have a separate with read-only rights. The first specific operation of the browsing demo is a call to QueryEntities to get a list of the records as XML. This return string is processed using an XMLmapper generated interface. However, to parse the actual content of each node we cannot use the interface, as the presence of a nested XML name space causes the interface to fail whilst reading the information (as requests return empty strings in case of a name space mismatch). That's why in the code I end up parsing the innermost XML data structure as a string: procedure TFormCloudBrowse.btnListClick(Sender: TObject); var strXml: string; iFeeed: IXMLFeedType; iEntry: IXMLEntryType; I: Integer; strContent: string; initPos: Integer; countPos: Integer; strRowKey: string; strPartKey: string; begin

// ask for the entities Marco Cantù, Delphi XE Handbook

Chapter 4: XE Libraries - 119 strXml := TableService.QueryEntities(tablename); XMLDocument1.LoadFromXML(strXml); XMLDocument1.Active := True; iFeeed := AzureTableXmlInterfaces.Getfeed(XmlDocument1); for I := 0 to iFeeed.Entry.Count - 1 do begin

// fixup (namespace issues workaround) strContent := iFeeed.Entry[I].Content.XML; initPos := Pos (rowkeynode, strContent) + Length (rowkeynode); countPos := Pos ('', strContent) - initPos; strRowKey := copy (strContent, initPos, countPos); initPos := Pos (partitionkeynode, strContent) + Length (partitionkeynode); countPos := Pos ('', strContent) - initPos; strPartKey := copy (strContent, initPos, countPos); ListBox1.Items.Add(strRowKey + '=' + strPartKey); end; end;

The list will show the row and partition keys, used later to retrieve the details as a double clicks on a list item:

The code used to fetch the record details (which logs the XML, without parsing it) and the image is the following: procedure TFormCloudBrowse.ListBox1DblClick(Sender: TObject); var strRowKey: string; strXml: string; Marco Cantù, Delphi XE Handbook

120 - Chapter 4: XE Libraries memStream: TMemoryStream; strPartKey: string; begin strRowKey := ListBox1.Items.Names [ ListBox1.ItemIndex]; strPartKey := ListBox1.Items.ValueFromIndex [ ListBox1.ItemIndex]; strXml := TableService.QueryEntities(tablename, TIDUri.ParamsEncode(strPartKey), strRowKey); memo1.Lines.Text := strXml; memStream := TMemoryStream.Create; try BlobService.GetBlob(tablename, strRowKey + '.jpg', memStream); memStream.Position := 0; Image1.Picture.Graphic.LoadFromStream(memStream); finally MemStream.Free; end; end;

Again, notice that this browsing application doesn't require a connection to the original database or to a custom web server, but relies only on the tables and images provided by Azure cloud storage, which has almost infinite bandwidth. It is hard to tell how much cloud computing will be a temporary fad and how much of our computing power will reside in web farms owned by a few companies in a few years time, but what is relevant to notice here is that Delphi can be used in this scenario and that there is no “single preferred vendor” (like in other architectures) but rather the ability to use services of multiple companies. The net result is that in many cases you can extend your native Windows application with a new reach to the Internet, without having to rewrite them as Web applications.

Amazon Web Services and More AWS (Amazon Web Services, information at http://aws.amazon.com) is a much older and currently more complete service than Microsoft's Azure. AWS has services similar to those we have uses, like S3 (Simple Storage Service) that corresponds to Azure Blobs and Simple DB that corresponds to Azure Tables. Although Delphi XE has no in the box for these services, I have written some component to help use them, available (among other Delphi REST client components) at: Marco Cantù, Delphi XE Handbook

Chapter 4: XE Libraries - 121 http://code.marcocantu.com/p/delphirestclients/

Still, Delphi XE has native for a different AWS service, which is a hosting service more than a storage one. Called EC2 (Elastic Cloud Computing), this service let's you create and run an instance of Windows (or Linux) in the Amazon cloud, deploy applications to it, and run your Delphi application in this Windows instance. Before you can try this step, you need to create an AWS and use the AWS console to create Windows instance. As you start this instance, it will receive a public DNS name and an IP. You'll generally use the DNS name for configuration (although it will change when you stop and re-start the instance). The configuration for my instance in the AWS console (with the public DNS highlighted) looks like this:

Deploy to the Cloud Deployment to EC2 is integrated in the Delphi IDE. After selecting the Project | Deploy to the Cloud menu item, you have to fill in the dialog box with your public access key in the field called “ name” and your secret access key in the field called “” (the name of these fields are quite confusing).

Marco Cantù, Delphi XE Handbook

122 - Chapter 4: XE Libraries

Next click the Get Machines button, pick the hosting web farms (in my case useast-1), and you'll see the list of your running instances in that region:

Next, you have to pick one or more files to deploy (notice that the deployment wizard won't automatically pick the executable file of the current project or any other file), and select a target folder for each. The target folder must be an existing folder on the target computer. In the next page, you'll get a chance to review the list of files to deploy, and you can press the Deploy button to perform the actual process. As you press the Deploy button you'll get another request. In this case you need to use the Windows name and of the EC2 Windows instance we are deploying onto, not the EC2 . Consider also that you cannot deploy to the same folder of an existing version if the program is running... and that you can also deploy by simply hooking your local drivers to the instance running in the cloud using the Microsoft's Remote Desktop Connection.

Marco Cantù, Delphi XE Handbook

Epilogue - 123

Epilogue The chapter on libraries ends this book on Delphi XE. As mentioned, I'm not covering the updates in the DataSnap portion of the product, which are significant (but would have further delayed the release of this book). I did cover some of the JSON extensions and Azure (which is formally part of DataSnap, but in practice completely unrelated).

DataSnap White Papers One of the reasons I decided not to cover this area is the availability of a couple of in-depth free Embarcadero white papers on the topic, one of which I wrote: •

Bob Swart's white paper titled “Multi-Tier Application Development with DataSnap in RAD Studio XE” is currently hosted at: http://www.embarcadero.com/rad-in-action/datasnap-xe



My white paper titled “REST Servers in Delphi XE using DataSnap” (and covering also the development of client jQuery applications for the Delphi REST server) is currently hosted at: http://www.embarcadero.com/rad-in-action/datasnap-rest

Marco Cantù, Delphi XE Handbook

124 - Epilogue

Everything XE Demo Finally, I want to point out a further demo, included among the book source code in the “epilogue” section, which I wrote to highlight a number of recent features of Delphi in a single, all-encoming demo. The idea is to create a demo which would be extremely difficult to write in Delphi 2007, thus suggesting that upgrading to a recent version of Delphi really adds a lot to your code. The goal of the program is to take an input string, translate it to a different language using Google Translate, create a colorful bitmap with the translated string (using Direct2D), transform it to a JPEG, publish it on Azure, and copy the public image URL to the clipboard. The program uses several recent features of Delphi: •

Unicode (available since Delphi 2009)



Anonymous threads (Delphi XE)



JSON processing (Introduced in Delphi 2010 and updated in Delphi XE)



Azure components (Delphi XE)



Direct2D (Delphi 2010)



JPEG conversion (Delphi 2009)

Here I don't want to list the source code of the program, as most of the techniques are actually covered elsewhere in the book, but only to underline once more that recent versions of Delphi really brought the product to a new, higher level. In the following image there a screen shot with a Hindi translation:

Marco Cantù, Delphi XE Handbook

Epilogue - 125

By right clicking on the secondary form (the one with the image), you can post it on Azure. In my case, this image is ed at the URL: http://marcocantu.blob.core.windows.net/translations/hi.jpg

You can see a video about this program on YouTube at: http://www.youtube.com/watch?v=4nZ0jp9NAjs

More Books Coming As a conclusion, I want to point out I'm planning to keep covering the features of new versions of Delphi, like in this and past “Delphi Handbook” volumes, but also offer solid foundations for Delphi developers (like in the old “Mastering Delphi” volumes) as well as more feature-oriented summaries. This is a lot of work and it will take some time. Any about this book and the overall plan is appreciated. Stay tuned to my blog and twitter for up-to-date information.

Marco Cantù, Delphi XE Handbook

126 - Epilogue

Marco Cantù, Delphi XE Handbook

Index - 127

Index About Myself................................................7 AlignTest example......................................61 Amazon Web Services..............................120 Andrea Magni...............................................7 AngleArc.....................................................92 Anonymous threads...........................80, 124 Apache......................................................103 Apache Foundation....................................36 Apache Module.........................................102 AQTime......................................................54 ArcTo..........................................................92 Aspect Oriented Programming..................65 AssortedRtl example.......................67pp., 84 attribute.......................................................... JSONReflect..........................................97 Audits.........................................................50 AuditsCLI.exe.............................................51 AWS console.............................................121 Azure..............................................109p., 124 Azure SQL Server......................................111 Azure101 example......................................111 Barry Kelly..................................................62 Beyond Compare...............................15, 43p. BinaryFiles example...................................71 BlackFish SQL............................................92 blog...............................................................8 Bob Swart..................................................123

Borland.......................................................47 Browse Repository.....................................42 Build Events................................................17 Build Groups...............................................15 Build Tools..................................................17 busy waiting...............................................84 Cary Jensen..................................................7 CGI............................................................102 Checkout.....................................................37 Chris Hesik.................................................30 Class Diagrams...........................................48 cloud computing.......................................109 CloudBrowse example..............................118 CloudPublish example..............................116 CodeRage......................................................7 CodeSite................................................51, 53 CollabNet..............................................36, 39 Command Line...........................................50 Command Line Parsing.............................68 Commit.......................................................37 Compare.....................................................43 compiled regular expression......................79 Compiler.....................................................60 Configuration Manager..............................16 Content-Type............................................113 ControlStyle................................................92 CreateAnonymousThread.......................80p. Marco Cantù, Delphi XE Handbook

128 - Index

CurrentThread...........................................82 CVS.............................................................35 Daniele Teti................................................99 DataSnap..................................................123 DateUtils unit.............................................67 DefaultEncoding........................................66 Delphi Developer Days.................................7 Delphi wiki.................................................20 Delphi XE.....................................................5 Difference Viewer.......................................43 Direct2D...................................................124 Distributed version control systems..........36 DocGenCli.exe.............................................51 Elastic Cloud Computing...................110, 121 email.............................................................8 Embarcadero............................................123 EnterMethod..............................................53 Everything XE example............................124 Example.......................................................... AlignTest................................................61 AssortedRtl................................67pp., 84 Azure101...............................................111 BinaryFiles.............................................71 CloudBrowse........................................118 CloudPublish........................................116 Everything XE.....................................124 FinalDemo.............................................56 InterceptBaseClass................................64 JsonMarshal.........................................98 JsonTests........................................93, 96 LoggingDemo........................................52 ParseJSONValue...................................93 RegExPrimer.........................................76 SpinWaiting..........................................86 ThreadedQueue....................................88 UmlDemo..............................................49 XmlIniTest..........................................100 ExitMethod.................................................53 exponential back-off algorithm..................85 Fabrizio Schiavi............................................2 Facebook page..............................................8 File Browser................................................14 FinalBuilder..........................................26, 55 FinalDemo example...................................56 Find references...........................................18 FindCmdLineSwitch..................................69 Marco Cantù, Delphi XE Handbook

Format Project Sources........................15, 24 Formatter Profiles......................................25 Formatter.exe.............................................51 Formatting.................................................24 FreeOnTerminate.......................................81 Generate Sequence Diagram......................49 GetCurrentThread......................................81 GetHomePath.............................................67 git..........................................................36, 46 Google.........................................................94 Google Code...............................................38 Google groups..............................................8 Google Translate.................................94, 124 GUID..........................................................69 hash...........................................................107 Help Insight.............................................22p. History View...............................................44 Holger Flick..................................................7 HTML.......................................................107 HTTPS......................................................109 IDE Insight.................................................13 Incremental Searches................................20 Indefero......................................................39 Indy.....................................................82, 102 Indy HTTP Server...............................29, 102 INI files.....................................................100 InsertEntity...............................................114 Install Component wizard..........................28 Integrated Development Environment......13 InterceptBaseClass example......................64 ISAPI.........................................................102 IsMatch.......................................................75 IsSingleProcessor.......................................83 Jan Goyvaerts.......................................74, 77 JavaScript Object Notation........................92 Jeroen Pluimers............................................7 JPEG..................................................117, 124 JSON.......................................92, 94, 96, 114 JSON Marshaling.......................................97 JsonMarshal example................................98 JSONReflect...............................................97 JsonTests example...............................93, 96 Live Templates...............................20, 22, 52 LoggingDemo example...............................52 Marshaling..................................................97 Mastering Delphi..................................7, 125

Index - 129

Match..........................................................75 Matches.......................................................75 Mercurial..............................................36, 46 Metrics........................................................50 MicroFocus.................................................47 Microsoft's Azure......................................109 Microsoft's Visual Source Safe...................35 Named Threads..........................................30 NameThreadForDebugging.......................30 NewGuid.....................................................69 NOSQL......................................................110 O'Reilly.......................................................74 OnAfter.......................................................63 OnBefore...............................................63pp. Ondrej Kelle................................................41 OnExcept....................................................64 OnException...............................................63 OnHTMLTag............................................106 Open From Version Control.......................41 OutputDebugString....................................52 Package Diagrams......................................47 PageProducer......................................105pp. ParamCount...............................................68 ParamStr....................................................68 ParseJSONValue........................................93 ParseJSONValueUTF8...............................93 PartitionKey..............................................114 Paste Special...............................................27 PCRE...........................................................75 Peter Wood...............................................2, 7 Philip Haze.................................................75 ProcessorCount....................................70, 83 Profiling......................................................54 Project Manager...........................14p., 41, 43 proxy configuration..................................103 QueryEntities............................................118 RAD Studio Version Insight.......................46 Raize Software............................................51 Ray Konopka...............................................51 RegExPrimer example................................76 Regular Expressions...................................73 Remote Desktop Connection....................122 Replace..................................................75, 78 REST...................................................94, 110 roCompiled.................................................79 RowKey.....................................................114

RTTI......................................................62, 72 Rudy Velthius.............................................28 Run Time Library.......................................66 Run with Profiler........................................54 Run Without Debugging......................14, 30 Search for Usages....................................18p. Search Short Cut Keys................................19 Select Configurations dialog box................16 Sequence Diagrams....................................49 Show in Explorer........................................14 Simon J. Stuart.............................................7 Simple DB.................................................120 Simple Storage Service.............................120 Sleep.....................................................83, 87 SmartBear Software...................................54 SOAP.........................................................109 Source Code..................................................6 Source Code Control System......................34 Source code formatting..............................24 SourceForge.........................................38, 46 SpinUntil....................................................87 SpinWaiting example.................................86 Split.............................................................75 SplitString..................................................68 Subversion..............................................6, 36 Clients...................................................39 CollabNet..............................................39 In Delphi IDE........................................41 Indefero.................................................39 Live blame.............................................46 Servers...................................................38 TortoiseSVN..........................................39 VisualSVNServer...................................38 Surround Windows.....................................21 Synchronization.........................................80 TableToJSON.............................................96 TAzureBlobManagement...........................111 TAzureConnectionString..........................110 TAzureQueueManagement.......................111 TAzureTableManagement.........................111 TAzureTableService..................................114 TBabelGoogleRest......................................94 TBinaryReader...........................................70 TBinaryWriter............................................70 TCountdownEvent.....................................86 TDBXJSONTools.......................................96 Marco Cantù, Delphi XE Handbook

130 - Index

TEncoding............................................66, 93 TGroup........................................................75 TGuidHelper..............................................69 Thread Status.............................................30 Thread-Safe Queue....................................88 ThreadedQueue example...........................88 Threading...................................................80 THTTPRIO...............................................109 TIdCustomHTTPServer............................105 TIdHTTPWebBrokerBridge.....................104 time zones...................................................67 TInterlocked............................................83p. TISODateTimeInterceptor.........................99 TJPEGImage.............................................117 TJSONMarshal...........................................97 TJSONObject.............................................93 TJSONValue...............................................93 TLightweightEvent.....................................86 TLightweightSemaphore............................86 TMatch........................................................75 Together......................................................47 TortoiseSVN.........................................39, 43 TPerlRegEx.................................................75 TRegEx.............................................75, 77pp. TSpinLock..................................................85 TSpinWait..................................................85 TStopWatch................................................79 TStringList.................................................66 TStringListInterceptor...............................98 TTextReader...............................................70 TTextWriter................................................70 TThread..........................................70, 80, 83 TThreadedQueue ................................88 TTimeZone.................................................67 TValue.........................................................72 TVirtualMethodInterceptor.......................63 TWebRequest...........................................102 TWebResponse.........................................102 Twitter ............................................8 TXmlIniFile..............................................100 UML Modeling...........................................47 UmlDemo example....................................49 Unicode.....................................................124

Marco Cantù, Delphi XE Handbook

unit................................................................. DBXCommon........................................97 DBXJSONCommon..............................96 DBXJSONReflect..................................97 DSAzure................................................111 Generics.Collection...............................88 IOUtils...................................................67 RegularExpression................................75 RegularExpressionCore.........................75 StrUtils..................................................68 SyncObjs............................................83p. SysUtils..................................................67 TimeSpan..............................................67 XMLIniFile..........................................100 Update........................................................37 UTF8...........................................................93 Uwe Schuster........................................41, 46 VER220......................................................60 Version Control Systems............................34 Version Insight...........................................46 Vincent Parrett...........................................55 Virtual Method Interceptor........................65 Virtual Methods Interceptors....................62 VisualSVNServer........................................38 VSoft Technologies Pty Ltd........................55 Web App Debugger.............................29, 102 Web Server Application.............................29 Web Sites..................................................132 WebBroker................................................102 WebFileDispatcher...................103, 106, 108 White Papers.............................................123 Wintech Italia Srl.........................................2 Wizards......................................................28 WriteBOM..................................................66 WS-Security..............................................109 XML...................................................100, 119 XMLDoc...............................................20, 22 XmlIniTest example.................................100 Yield............................................................83 YouTube....................................................125 $ALIGN.......................................................61 $CODEALIGN............................................62 $STRINGCHECKS.....................................60

Index - 131

Marco Cantù, Delphi XE Handbook

132 - Index

Web Sites by Marco Cantù Here is a partial list of the diverse and somewhat unrelated web sites I manage (or don't manage enough, as some of them are quite old and static) Main sites are in English language: http://www.marcocantu.com http://blog.marcocantu.com http://www.thedelphisearch.com http://www.wintech-italia.com http://dev.newswhat.com http://delphi.newswhat.com http://ajax.marcocantu.com http://www.delphimentor.com

Here are other sites in Italian language: http://www.marcocantu.it http://www.wintech-italia.it http://shop.wintech-italia.com http://www.delphiedintorni.it http://www.piazzacavalli.net

Personal pages on community sites and micro-blogging sites: http://twitter.com/marcocantu http://www.facebook.com/marcocantu http://www.linkedin.com/in/marcocantu

My online shops (where you can buy books, tools, and services) include: http://sites.fastspring.com/wintechitalia http://blog.marcocantu.com/bookstore.html http://shop.wintech-italia.com (Italian)

Marco Cantù, Delphi XE Handbook

Related Documents 543cg

Delphi Xe Ehandbook i4a4q
December 2020 0
Guia De Componentes - Delphi Xe 1k2t1e
August 2022 0
Instalao Zeos 7 - Delphi Xe + Postgresql 9 144k17
August 2022 0
Delphi 436q4c
December 2019 63
Delphi 436q4c
May 2020 39
Delphi 436q4c
March 2021 0