Delphi Blogs of the Week/Month #49

The first list of interesting links and blog post of 2017, focused on Delphi development. Embarcadero Udpates Press release "Embarcadero Announces RAD Studio Desktop Bridge Support for Windows 10 Deployments" including a comment by Kevin Gallo, corporate vice president for the Windows developer platform at Microsoft at http://www.businesswire.com/news/home/20170110005908/en This press release got also referenced by SD Times at http://sdtimes.com/swift-announces-new-project-lead-embarcadero-updates-rad-studio-and-spare5-relaunches-as-mighty-ai-sd-times-news-digest-jan-11-2017/ There is Debugger Hotfix for macOS Sierra and the iOS Simulator for 10.1 Berlin. Information at https://community.embarcadero.com/blogs/entry/debugger-hotfix-for-macos-sierra-and-the-ios-simulator and download at http://cc.embarcadero.com/item/30680 Blog Posts World First! A Linux web service written in Delphi by Craig at http://chapmanworld.com/2017/01/12/world-first-a-linux-web-service-written-in-delphi/ Got a link to this fairly interesting blog on Delphi: https://blog.grijjy.com/ Did you ever use Bold? Check out http://boldfordelphi.blogspot.it/2017/01/help-me-to-make-bold-open-source-project.html I don't know who write this and don't agree in full (and it stirred some discussion), but I found it interesting: https://medium.com/@srcstorm/pascal-independent-language-for-2017-a5a25f7c62d8#.n88868sta A Delphi wrapper for Slack API by Andrea at https://blog.andreamagni.eu/2017/01/introducing-sdriver-a-delphi-wrapper-for-slack-api/ Integrating with you favorite CRM/ERP web based client -- or poor mans integration? -- by Steffen at http://fixedbycode.blogspot.it/2017/01/integrating-with-you-favorite-crmerp.html Webinars and More Check out 2017 upcoming Delphi webinars at https://community.embarcadero.com/article/16466-upcoming-2017-webinars In particular, there is a new BootCamp focused on Arduino and IoT early February, that looks pretty interesting. More information to come.  
Read More

Upcoming 2017 Webinars

We've got a lot of exciting webinars coming in the first quarter of 2017. All these global webinars are offers 3 times a day to accommodate your busy schedule and timezones: 6 AM, 11 AM, 6 PM PDT. Replays will be available after the webinar completes, but be sure to attend for the live Q&A.  Thu, January 19, 2017 - Maximize IDE Productivity with 10.1.2 Berlin Are you using all the latest productivity enhancements? Berlin 10.1 Update 2 Anniversary edition introduces more productivity enhancements than ever. This webinar will bring you up to speed on some of the top productivity boosts provided by your favorite IDE. Tue, January 24, 2017 - Migrating to RAD Server "Moving existing Delphi VCL ""Fat Client"" database applications to scalable client/server architectures with RAD Server.  Five distinct phases: analyze, plan, refactor, build and deploy The key is building a layered architecture" Thu, January 26, 2017 - Web Front End Frameworks Delphi and C++Builder are amazing at building native multi-platform apps. There are also a great collection for Frameworks for building GUI web applications. This webinar will look at building high performance, feature rich web GUIs with your favorite development tool. Tue, January 31, 2017 - Migration Delphi - Case Studies "This webinar focuses on three areas for migrating legacy Delphi to the current Delphi version: Migrating 3rd Party Components / Libraries Migrating Unicode Migrations of Database and Middleware Includes resources, examples and practical advice" Thu, February 2, 2017 - Internet of Things Integration with RAD Server Overview of the Internet of Things components, libraries and support in RAD Studio. Including Beacons, Bluetooth LE, the GetIt IoT Components, Beacon Fencing and more. Week of Mon, February 6, 2017 - Arduino IoT Bootcamp Integrating Arduino and open hardware into your IoT Solution Week long boot camp More details to come Tue, February 14, 2017 - Modernize or Become Extinct Now is the time to move forward. Technology is moving faster and faster. If you were waiting for the right time to integrate with new technology, it is now. Thu, February 16, 2017 - LiveBinding for VCL Developers A guide to using LiveBindings in existing VCL applications Master detail relationships Creating LiveBindings in Code LiveBinding DataSets Tue, February 21, 2017 - Using TMS Cloud Pack to Integrate Your Apps with the Cloud REST services are everywhere, and using them is the key to accessing the cloud. The TMS Cloud Pack components simplify working with common web services including: PayPal, Flickr, Dropbox, Google, Microsoft, Amazon, Twillo and more. Learn the easiest way to integrate the cloud into your mobile and desktop apps. Thu, February 23, 2017 - CaseStudy: Delphi Minifig Mobile App Success Join Delphi Product Manager Marco Cantu for a case study of his successful mini-figure collectors app Available on mobile, using many Delphi and RAD Studio technologies Tue, February 28, 2017 - C++ the C++Builder Way Thu, March 2, 2017 - DevExpress Migration Tue, March 7, 2017 - Beyond Firebird Thu, March 9, 2017 - Building a Microservices Architecture with RAD Server Tue, March 14, 2017 - From Really "Old Delphi" to the Future Thu, March 16, 2017 - Using RiverSoft AVG Components Tue, March 21, 2017 - Advanced HTTP Protocol Hacking Thu, March 23, 2017 - Using JVESoft Components  Schedule subject to change, more details to come!
Read More

Delphi To Go: Include resource files in your Delphi build process

b.gif

Something to remember: Delphi To Go: Include resource files in your Delphi build process Note it’s not enough to add a line like this to your .dpr file: {$R ‘New1.res’ ‘New1.rc’} The resources actually needs to be part of your .dproj file (which basically is an XML msbuild file adhering to the MSBuild Project File Schema […] … Read More

Read More

Merry Christmas and 25% Off for XtremeDocumentStudio

We wish all of our valued customers warm holiday greetings! Here at the Neos Eureka Support office in Kissimmee Florida, USA it is an especially warm holiday. Last week the temperature got up to 95F/35C! There is not much snow on offer, but we can offer some good news. If you haven't downloaded it already, we have a maintenance release v7.5.1.0 available if you have a valid subscription. Log in to your EurekaLog account on our web site and you will find the installer there. This release addresses many bug fixes that you have been asking for. If your subscription is out of date then you can renew it from your login page and get instant access to the new version. 2017 promises a major new EurekaLog release, probably in the first quarter. If you have a EurekaLog subscription in good standing at the time of the release then you will receive it at no extra charge. We would like to announce a new partnership with Gnostice, the makers of XtremeDocumentStudio, a document-processing and PDF library compatible with Delphi and other languages. We will begin offering a 25% discount coupon on XtremeDocumentStudio to any registered EurekaLog customer. Gnostice XtremeDocumentStudio Delphi [25% Off] Gnostice XtremeDocumentStudio Delphi is a suite of multi-format document processing components for VCL and FMX. You can View, Print, Convert PDF, DOCX, DOC, RTF, BMP, JPEG, PNG, WMF, EMF and images, OCR images to searchable PDF, and much more. The NextGen version with deeper support for FMX is currently in beta and we are offering all EurekaLog customers a special pre-release discount until December 31, 2016. You can apply this discount code on XtremeDocumentStudio Delphi and XtremeDevSystem Delphi. To purchase with discount, please choose the item from the buy page and use code ELOGDEC16 on order. To know more and download the trial version, please log on to: https://www.gnostice.com/XtremeDocumentStudio_Delphi.asp So, Happy Holidays from the EurekaLog Team! We wish you a prosperous new year!
Read More

Generating PDF files cross-platform with ease

PDFLib1.png

With the new 1.7 release of the TMS FNC UI Pack we’ve added a completely new PDF library built from the ground up, that is capable of generating PDF files on all supported frameworks (FMX, VCL, LCL). Via all supported frameworks, you can easily target minimum 5 different operating systems: Windows, macOS, iOS, Android, Linux (&Raspbian),.. To introduce this new PDF library I’ve written a small tutorial to start generating your own PDF files.

Getting Started

To get started with the PDF library, add the FMX.TMSFNCPDFLib, VCL.TMSFNCPDFLib or LCLTMSFNCPDFLib depending on the chosen framework. The PDF library class is called TTMSFNCPDFLib, and the code is shareable between the three supported frameworks.

Starting a new document

Starting a new document can be file-based, or TMemoryStream-based. To start a new document, call the BeginDocument function. The BeginDocument always needs to be paired with EndDocument, which is responsible for writing the contents to a file or TMemoryStream. When the AFileName parameter in the BeginDocument call is empty, the contents will be written to a TMemoryStream, returned by the EndDocument call. The EndDocument call also has an additional parameter to allow opening the generated PDF file in the default PDF reader application.

procedure TForm1.GeneratePDF(AFileName: string);
var
  p: TTMSFNCPDFLib;
begin
  p := TTMSFNCPDFLib.Create;
  try
    p.BeginDocument(AFileName);
    p.EndDocument;
  finally
    p.Free;
  end;
end;

Adding pages

Adding pages can be done by calling the NewPage function. The NewPage is responsible for starting a new page content stream on which the graphics / text can be written. Each NewPage call will clear the content buffer and allow you to start with new text and graphics. Please note though that all appearance settings such as fill, stroke and font are stored for the entire document, so starting a new page will allow you to continue in the same appearance settings as the previous page.

procedure TForm1.GeneratePDF(AFileName: string);
var
  p: TTMSFNCPDFLib;
begin
  p := TTMSFNCPDFLib.Create;
  try
    p.BeginDocument(AFileName);
    p.NewPage;
    p.EndDocument;
  finally
    p.Free;
  end;
end;

Drawing content on a page

After adding a new page, the page can be filled with content such as HTML formatted text, plain text as well as some basic drawing primitives such as rectangles, circles and lines. To starting drawing content, the pdf library has a Graphics property that provides access to the drawing functionality. The following sample uses the Fill and Stroke properties to generate a PDF with a gradient rectangle and a dotted border.

procedure TForm1.GeneratePDF(AFileName: string);
var
  p: TTMSFNCPDFLib;
begin
  p := TTMSFNCPDFLib.Create;
  try
    p.BeginDocument(AFileName);
    p.NewPage;
    p.Graphics.Stroke.Color := gcRed;
    p.Graphics.Stroke.Width := 3;
    p.Graphics.Stroke.Kind := gskDashDotDot;
    p.Graphics.Fill.Kind := gfkGradient;
    p.Graphics.Fill.Color := gcBlue;
    p.Graphics.Fill.ColorTo := gcOrange;
    p.Graphics.DrawRectangle(RectF(10, 50, 100, 150));
    p.EndDocument(True);
  finally
    p.Free;
  end;
end;

Drawing Text

Drawing text on a PDF page is done via the DrawText function. The DrawText has a set of parameters to allow drawing wordwrapped text in a rectangle, or simply as-is at a specific position. The DrawText function has a set of overloads that also supports column drawing. Each call to DrawText returns a value that can either contain the calculated text rectangle or the amount of left-over characters after an overflow is detected when drawing text in a column.
The font that is used when drawing text can be controlled separately via the Font property. With this property, the font name, size, color and style can be set.

procedure TForm1.GeneratePDF(AFileName: string);
var
    p: TTMSFNCPDFLib;
begin
    p := TTMSFNCPDFLib.Create;
  try
    p.BeginDocument(AFileName);
    p.NewPage;
    p.Graphics.Font.Name := 'Segoe UI';
    p.Graphics.Font.Size := 16;
    p.Graphics.Font.Color := gcRed;
    p.Graphics.Font.Style := [TFontStyle.fsBold];
    p.Graphics.DrawText('Hello World !', PointF(10, 50));
    p.EndDocument(True);
  finally
    p.Free;
  end;
end;

HTML formatted text

HTML formatted text is also supported by using the DrawHTMLText call. When passing a TMSFNCBitmapContainer reference it can even draw images referenced by the <IMG> tag. HTML support is based on the miniHTML reference.

procedure TForm1.GeneratePDF(AFileName: string);
var
  p: TTMSFNCPDFLib;
  s: string;
  r: TRectF;
begin
  p := TTMSFNCPDFLib.Create;
  try
    s := 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum     has been the industry''s standard dummy'+
'text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. '+
'It has survived not only five centuries, but also the leapintoelectronic typeset'+
'ting, 
remaining essentially unchanged. It'+ ' was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with des'+ 'ktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.'; p.BitmapContainer := TMSFNCBitmapContainer1; p.BeginDocument(AFileName); p.NewPage; p.Graphics.Font.Name := 'Arial'; p.Graphics.Font.Size := 10; p.Graphics.Fill.Color := gcNull; r := RectF(10, 50, 300, 400); p.Graphics.DrawHTMLText(s, r); p.EndDocument(True); finally p.Free; end; end;

The PDF library supports more than simple text and graphics. More information on the PDF library and the features can be found at the following page
http://www.tmssoftware.com/site/tmsfncuipack.asp?s=fncpdf#features.

The PDF library is also available in the TMS FMX UI Pack and is coming to the TMS Component Pack at the beginning of 2017!

Read More

Read More

Ken Thompson – quotes – Reflections on Trust

b.gif

Some of the Ken Thompson – Wikiquote entries come from a great 1983 ACM Turing Award Acceptance Lecture “Reflections on Trusting Trust”. That lecture used to be on http://cm.bell-labs.com/who/ken/trust.html But it isn’t, and it’s not in the WayBack machine and neither in the Google Cache because of the robots.txt. Historic link rot galore! The lecture is about compiler […] … Read More

Read More

2016 Cool App Winners

2016 Cool App Winners

When we first launched our Cool App contest, we knew there would be some stiff competition. The winners represent some truly amazing innovations that are helping people live and work more creatively and compassionately. I want to congratulate all these great developers for their innovative use of Embarcadero tools. If this year is any indication, I truly can’t wait to see what’s in store for 2017.

The very first entry to the Cool App contest was 1Password for Windows. This is the premier password and identity manager, and many of us already used it and were fans, but we didn’t know it was written in Delphi. When interviewing the Stefan van As, the developer of 1Password for Windows, it was really clear why he used Delphi: it has a great collection of encryption libraries, fast native code, and everything you need to make amazing user interfaces.

[YoutubeButton url=’https://www.youtube.com/watch?v=CkUF42OPKvE’]

Our next Cool App winner already have a few other awards to it’s name, notably a Technical Achievement Emmy award. And that winner is FrameForge Previz Studio. If you’ve ever seen behind the scenes of a movie you’ve no doubt seen them working with storyboards. A real low-tech way of working through the story and framing before filming begins. Well that has all changed with the introduction of FrameForge 3D pre-visualization software. Not only does it make it much easier to create the storyboard frames, but it understands things like camera spacing, perspective, set layouts and more.

A little back story. I’m a big fan of the TV series Orphan Black, which is about a bunch of clones. This means the main actress plays a number of different roles, and is regularly in scenes where she is interacting with herself. From the very beginning I was impressed with how well the scenes worked. So much so that I checked the credits to see if she was quintuplets or something. When I was interviewing Ken Schafer, the developer of FrameForge, he mentioned that FrameForge was used in the production of Orphan Black. It all made sense. It is only with a tool as powerful and versatile as FrameForge could something so impressive be pulled off so well.


[YoutubeButton url=’https://youtu.be/PIDlpxdXiY4′]

I come from a very musical family. Both of my parents released music albums and all my siblings play a couple instruments by ear and sing beautifully. I’m the one they call when they have computer trouble, but I’ve never been musical. I tried. Took a couple classes, but never really got it. That is where the next winner of our Cool App contest comes in. Introducing EarMaster for the iPad. This is the app for people who want to learn music theory like rhythm and the ability to carry a tune. I downloaded EarMaster and installed it on my iPad and I kid you not, within a few minutes my wife noticed a difference. I’m not ready to release an album yet, but I’m planning to work with EarMaster some more.

Hans Lavdal Jakobsen is the lead developer behind EarMaster. He developed the original EarMaster for Windows in Delphi, and when it came time to create an iPad version he wanted to use Delphi. A few people told him it wouldn’t work, but the end result was he shared 97% of code with the Windows and macOS versions, got to market quicker and had a fantastic native app for iPad.


[YoutubeButton url=’https://www.youtube.com/watch?v=91Bh-JCYKkM’]

I was starting to think nothing else could impress me as much as these first few winners. I was wrong, and I’m OK with that. Expresii is the most impressive paint program I’ve ever seen. It uses the GPU for real-time physics simulation of watercolors. I can watch their showcase video over and over again. It is mesmerizing the way you can reposition the tablet to control the flow of the paint as the water flows down the canvas – in real-time! I’m starting to wonder if there is any reason to use paper anymore at all! Nelson Chu tells me that the GPU simulated physics are powered by GLSL and GLScene, and he uses the built in sensor components that come with Delphi to determine the tip of the tablet. He is looking forward to using the new parallel programming library to simulate a split brush in parallel.


[YoutubeButton url=’https://youtu.be/Tu3O5qvVVHo’]

Our most recent Cool App winner is something completely different. Built by two sixth grade girls, Suresh and Safalta, from Sherwood Middle School in Shrewsbury, Massachusetts, HOP is designed to help prevent both hunger and obesity. The idea is to help people understand the relation between their caloric intake and obesity. So those who are overweight can reduce their caloric intake, and then donate the money they would have spent on food to feed the hungry. It is a brilliant idea.

The thing I love about this story is Suresh and Safalta’s school taught them to use Java and Python for app development, but they were not satisfied with the selection of tools they saw. Until they tried Delphi. As they put it, “Embarcadero provided [an] easy button tool for compiling codes for multiple devices including android, iOS etc. which helped us to develop app quite faster. We are planning to recommend the use of Embarcadero [Delphi] to other kids interested in developing apps.”


[YoutubeButton url=’https://youtu.be/1I0OEi2gOcE’]

We have an impressive collection of apps as contenders for future cool app winners, but we are always looking for more. Maybe it will be your app. Enter today and you could win the opportunity to be highlighted in a future newsletter, blog post and press release, not to mention receiving a $500 Amazon (or equivalent) gift card.

Read More

Read More

Live Now: Intensive Delphi 2016 – The biggest online Delphi event in Brazil, for free!

intensive_delphi.jpg

(Este link em portugu?s)

Intensive Delphi 2016 is happening right now. It’s the biggest online Delphi event in Brazil, and it’s free for everyone! Already started on Monday, 19th and going on until 24th, it’s six days full of sessions about the most different topics: Mobile development, Rest/JSON servers, Firemonkey, VCL, Beacons, Arduino, best practices, and many many more.

To access the conference, use the follow link:
Intensive Delphi 2016 Official Link

Each day starts as early as 8 am local brazilian time, and goes on until up to 10 pm at night. Outside the official schedule for session streaming, sessions replays are provided in those alternative schedules. The chat windows is available for you to interact with speakers at specific session times, specially at night (brazilian time).

There will be sessions available in both Portuguese (most of them) and English.

More than 25 speakers and counting will be present at conference, including Marco Cantu, Jim Mckeeth and, from TMS Software, Wagner Landgraf with a session about TMS Business product line. The TMS Business session schedule is Thursday, 22th, 8 pm brazilian time (UTC-02:00) and Wagner will chat with attendees. Here is the full list of speakers in alphabetical order:

Adriano Santos

Alan Glei

Alan Victor (Bruto do Delphi)

Alister Christie

Amarildo Lacerda

Boian Mitov

Carlos Agnes (Tatu)

Emanoel Deivison

Jackson Gomes

Jim Mckeeth

Jonatan Souza

Jorge Eduardo

Kelver Merlotti

Kleberson Toro

Laercio Guerco

Landerson Gomes

Marco Cantu

Marcos Moreira

Marcus Vinicius

Mauricio Abreu

Newton Oliveira

Regys Silveira

Ricardo Boaro

Rodrigo Mourao

Samuel “Muka” David

Thulio Bittencourt

Wagner Landgraf (TMS Software)

Read More

Read More

shadow_cs / delphi-leakcheck — Bitbucket

b.gif

On my research list, as it works on both Windows and Android: shadow_cs / delphi-leakcheck — Bitbucket: Multi-platform leak checking library for Delphi via: I’ve created a multi-platform leak checking library with DUnit integration and per test memory leak details… – Honza Rameš – Google+ –jeroenFiled under: Delphi, Delphi 10 Seattle, Delphi XE, Delphi XE2, Delphi […] … Read More

Read More

Introducing the myCloudData REST Client for Delphi & C++Builder

We are very excited to announce the launch of our new open-source myCloudData.net REST client for Delphi & C++Builder. The myCloudData REST Client is completely free and open-source and hosted on Github, this means that you can freely use or customize the code for your commercial or hobby projects. Our goal was to provide you with an easy way of using the myCloudData.net service in all your applications, without having to worry about all the difficulties that come with integrating with a complex REST service. The myCloudData REST Client takes care of handling the HTTP requests, the parsing of the JSON responses and the OAUTH2 authentication. All you have to do is drag the component on to your form and you can start using your cloud databases as they were local databases. The library is developed from the ground up and is based on the REST technology that is included in RAD Studio 10.1 Berlin. It can be used with your Delphi, C++Builder, RAD Studio 10.1 Berlin IDE as-is, no need to install extra commercial libraries. There is a REST client for VCL applications (for Win32/Win64) and FMX applications (for Win32/Win64/iOS/macOS/Android) To get you started, here are some highlights of commonly used patterns in consuming structured cloud data storage via myCloudData.net. Some simple code examples Creating a table Typically, at the startup of your application, you'll want to check if the table you want to work with already exists on the current myCloudData account. The code example below does just that, it looks for the table on the Tables property of the myCloudData component and if it isn't found it will create the table with all the necessary fields. var LContactsTable : TmyCloudDataTable; begin // Search for an existing table LContactsTable := MyCloudData.Tables.GetTableByName('MyApplication_Contacts'); if LTableName = nil then begin // Create the table LContactsTable := MyCloudData.Tables.CreateTable('MyApplication_Contacts'); // Start adding your fields: LContactsTable.Fields.Add('ID', ftInteger); LContactsTable.Fields.Add('Name', ftWideString, 30); LContactsTable.Fields.Add('EmailAddress', ftWideString, 50); LContactsTable.Fields.Add('CountryCode', ftWideString, 2); // Save the fields to the myCloudData.net service LContactsTable.Fields.Save(); end; // You can start working with the table here. end; Working with the entities Once you have your table, let's add some data to it. The next example shows how you can insert a new entity and populate its fields. var LContact : TmyCloudDataEntity; begin // Create the new entity on the table LContact := LContactsTable.Entities.CreateEntity(); // Populate the fields on the entity LContact.SetValue('ID', 285); LContact.SetValue('Name', 'John Doe'); LContact.SetValue('EmailAddress', 'johndoe@gmail.com'); LContact.SetValue('CountryCode', 'USA'); // Save the entity to the myCloudData.net service LContactsTable.Entities.Save; end; The following code shows you how to query the table and retrieve existing entities. // Optionaly set the page size and index LContactsTable.PageSize = 20; LContactsTable.PageIndex = 0; // Optionaly add one or more filter conditions LContactsTable.Filters.Add('Name', coLike, 'John'); LContactsTable.Filters.Add('Email', coEndsWith, 'gmail.com', loAnd); // Optionaly add one or more sorting statements LContactsTable.Sorting.Add('Company', soAscending); LContactsTable.Sorting.Add('Name', soDescending); // execute the query LContactsTable.Query(); // now you can use the result of that query by accessing the Entities property for LContact in LContactsTable.Entities do begin ContactsListBox.items.Add(LContact.GetValue('Name')); end; Blobs All the above examples work for both the free and the subscription accounts on myCloudData.net. However, working with blob fields requires you to be connected with a subscription account. To avoid unexpected behaviour, you'll always want to check if the current user can use the blob feature before actually creating or using a blob field. This example shows how you can create a blob field in a table. // Check if the current user can use blob fields if MyCloudData.CurrentUser.CanUseBlobFields; then begin // Add the field to the table LContactsTable.Fields.AddOrUpdate('Picture', ftBlob); end; Saving a new file to the blob field can be done as follows. var LPictureField : TmyCloudDataBlob; begin // Fetch the Entities on the table LContactsTable.Query(); // Get an entity by its ID LContact := LContactsTable.Entities.GetEntity(LEntityId); // Get the blob field LPictureField := LContact.GetBlobField('Picture'); // Save a new image LPictureField.FromFile('c:path oyourimage.jpg'); end; We invite you to start experimenting with these new free REST client components and we are very eager to learn how these will be used to build your creative & amazing apps with myCloudData.net and RAD Studio 10.1 Berlin. Please take a look at the Github repository and let us know what you think!
Read More