Categories
MVP News

MVP of the Week: Danny Wind

DannyWindThis week we are highlighting Delphi and InterBase MVP Danny Wind. He is an experienced Delphi trainer, consultant and developer for the Delphi Company. He specializes in FireMonkey, User Interfaces and Threading. Danny is also a regular speaker at Developer Days, at SDN conferences, and Delphi launch events in the Netherlands or Belgium, as well as the Delphi training days in the Netherlands. Virtually he is a frequent presenter at our CodeRage online virtual conference, and is regularly blogging.The Delphi Company

You can follow Danny on Twitter, YouTube or LinkedIn. Look forward to a podcast episode with Danny soon as well.

Categories
Audio podCast MVP News podcast

MVP of the Week: Robert Love

Robert LoveThis week we are highlighting the work of Robert Love, MVP. I had the pleasure of meeting Robert around the release of Delphi 6. A coworker and I drove from Boise, Idaho down to Salt Lake City, Utah for the launch event (since there wasn’t one in Boise that year). Robert Love runs the Salt Lake Delphi Users Group, and they scheduled a User Group meeting the night of the launch event, so we stayed for that too.

BlogTwitter | Facebook | G+ | LinkedIn | Stack Overflow

Robert Love's Team Members - State of Utah
Robert Love’s Team Members at the State of Utah

He leads a team of Delphi developers that work for the state of Utah.

Some components they use there:

He is a top 4% contributor on Stack Overflow, having earned the silver Delphi badge. He also contributes to open source Delphi libraries (DunitX, Abbrevia, etc.), speaks at conferences and is a regular presenter for CodeRage.

At home he is in the middle of remodeling his house and working with his kids to add Arduinos and Raspberry Pi to automate everything. When he isn’t programming, Robert competes in competitive dutch oven competitions and volunteers for Boy Scouts of America. He is also an accomplished photographer.

Robert is also working on a replacement for the Component Development Kit that he is planning to make available via open source. I am really looking forward to this IDE add-in. For those that don’t remember, Component Development Kit was an IDE add-in by EagleSoftware back in the Delphi 6 days that walked you through the creation of components. It took Delphi’s simple component development process and made it really powerful.

Robert Love taking pictures at Dutch Oven Event
Robert Love taking pictures at Dutch Oven Event
Robert Love in mountains over house
Robert Love in mountains over his house
Robert Love's Daughter's First Electronics Project
Robert Love’s daughter’s first electronics project
Dutch Oven Cinnamon Rolls - Photograph by Robert Love (prepared by someone else)
Dutch Oven Cinnamon Rolls – Photograph by Robert Love (prepared by someone else)
Dutch Oven Chicken - Photograph by Robert Love (prepared by someone else)
Dutch Oven Chicken – Photograph by Robert Love (prepared by someone else)
Dutch Oven Rolls - Photograph by Robert Love (prepared by someone else)
Dutch Oven Rolls – Photograph by Robert Love (prepared by someone else)
Dutch Oven Cake - Photograph by Robert Love (prepared by someone else)
Dutch Oven Cake – Photograph by Robert Love (prepared by someone else)

 

Categories
MVP News

Embarcadero MVP of the Year for 2015 – Stefan Glienke

Stefan GlienkeAs a way to acknowledge some of the hard work and amazing contributions each of our MVPs provides we are starting a new MVP of the Year program. It is already a few months into 2016, but I would like to start by recognizing our MVP of the year for 2015, Stefan Glienke. (He is missing from the MVP directory, but we will get him added right away.)

Stefan started programming with Turbo Pascal over 15 years ago, and now uses Delphi as his productive language of choice. He is an expert in software design patterns, principles and practices. He developed the DSharp library, Test Insight and is lead developer of Spring4d.

The process of selecting an MVP of the year involves nominations and feedback from other MVPs as well as our internal consideration. Everyone holds Stefan in high regard and appreciates his many contributions. Here is a little about Stefan.

  • Stefan GlienkeVery active in the developer community, especially on G+
  • Shares smart insights and code examples
  • Hosted a Developer Skill Sprint
  • Regular conference speaker
  • Writes great technical blog posts
  • Maintains some important open source libraries
  • Top contributor for Delphi on Stack Overflow
  • Created Test Insight IDE Plugin

Spring4D

You can find Stefan online in some of the following places:

Please join me in thanking Stefan for all that he does to help the community!

Categories
News

What is Your Favorite Delphi Demo?

When you are showing Delphi to someone for the first time, what demo do you turn to? There is so much Delphi can do there really isn’t only one thing that sets it apart. Of course the classic demo is the button, edit box and list box. I’ve just that one a lot, and it is a good way to introduce someone who is new to programming.

I recently showed off my 5 minute REST Client demo. That one is a big hit with seasoned developers when they see how easy it is to consume a REST service and then deploy to 4 different platforms. I’ve done similar demos with InterBase and SQLite, also crowd pleasers. 

Another demo that I think goes over really well with seasoned developers is AppTethering. It makes it so easy for apps to discover each other on the local network and then share data, actions and resources.

Possibly even cooler is how easy Delphi makes it to connect to devices like Bluetooth heart rate monitors, drones, brain-computer interfaces, etc. 

What is your favorite Delphi demo? Maybe your favorite demo is an IDE feature, like the ability to preview an app on multiple platforms in realtime. Or maybe it is building a multi-tier app to safely share data across multiple devices. 

Leave a link, video or description of your favorite demo in the comments below. 

Categories
News

The Year of the FireMonkey

Year of the FireMonkey

Today is the Lunar New Year starting the Chinese year of the Fire Monkey. The first day of the New Year falls on the new moon between 21 January and 20 February, which in 2016 is Monday, February 8th. The animal associated with the year is cyclical, as is the elemental sign. The last year of the monkey was 2004, and that year it was the Wood Monkey. The Fire elemental sign is considered the prosperity stage.

How are you using FireMonkey this year? How will the Monkey help you prosper?

Even Google is in on the Fire Monkey action with their Google Doodle of the day:

Google Doodle for the Lunar New Year 2016

Year of the FireMonkey Octagon is by Jim McKeeth and licensed under Creative Commons Attribution-Share Alike 3.0 Unported (derived from Monkey-2 by Angelus). Google Doodle is by Google.
Categories
News Tools

10 Reasons to Use PAServer for Remote Windows Deployment

Everyone knows PAServer (Platform Assist Server) is the easy way to deploy and debug multi device apps from Windows to Apple OS X and iOS. It handles all the bundling and deployment from your Windows development platform across the network, via a virtual machine, or even to the cloud.

Previously I showed you how to connect to a Android Emulator on another machine (or outside your VM), but did you know you can also use the PAServer to deploy and debug against a remote Windows machine? It isn’t required, so isn’t as immediately obvious, but it is supported and pretty easy to setup.

If you are already developing on a Windows machine, why us PAServer to test against a remote Windows machine? There are a lot of reasons, here are a few . . .

  1. Testing on machine without IDE installed
  2. Windows tablets
  3. Different CPU architectures (64-bit vs 32-bit)
  4. Different numbers of cores
  5. Utilizing specialized hardware
  6. Running outside / inside a virtual machine
  7. Deployment on a server (remote, local, in the cloud)
  8. Debugging on more than one version of Windows
  9. Debugging issue that only occurs on one machine
  10. Bundled deployment options

Now that we see the need, how do we do it?

Install PAServer on the target Windows computer. You can find it at C:\Program Files (x86)\Embarcadero\Studio\17.0\PAServer if you used the default install location during your original install. When installing PAServer, you either need to use a different install location (to a user writable folder), or specify a custom scratch-directory, as the default is not writable (unless you run PAServer as Administrator) and will give you an E0009 PAClient Error. Once PAServer is setup just run it.

Custom PAServer Install Destination

Use the Connection Profile Manager to create a new Windows profile.

RAD Studio Connection Profile Manager

Instead of the default of OS X, choose either Windows 32-bit or 64-bit. The rest of the configuration is the same.

Create Windows 64-bit Profile Connection

Then form the Project Manager, right-click on the Windows platform you want to deploy remotely, and select properties.

Project Manager - Platform Properties

And then select the new connection you want.

Platform Properties - Select Profile

This works with any project type (FireMonkey, VCL, Console, etc.)

Profile Selected

Now you can also use the Deployment Manager for Windows apps as well.

Categories
Source Code

How to Reference a Procedure

It was pointed out in the comments and on G+ that this covers type aliases, but not procedure aliases. Instead it shows how to have a variable that references a procedure and then allows you to call it by this new variable. While I used alias as meaning “reference by a different name” it does in fact have a specific definition in this context. Sorry if there was any confusion or undue frustration at imprecise terminology.

I just answered a question about how to alias a procedure. I thought it was interesting enough to share here.

It is easy enough to alias a type . . .

type
  my_integer = integer;

then we can just use my_interger in place of integer as a type. But what about a procedure (or function for that matter)?

There are two different ways, depending on if the procedure is a member of a class. For straight up procedural procedures and functions it looks a little something like this:

procedure HelloWorld; // declare our procedure
begin
  ShowMessage('Hi');
end;

var
  my_proc: Procedure; // declare our alias

begin
  my_proc := HelloWorld; // assign the alias
  
  // ...

  if assigned(my_proc) then // verify the reference
    my_proc; // call the alias
end;

This is pretty straight forward. We just create an alias reference variable of the right type, and assign it to the procedure we want to alias reference. If you call an alias reference variable that is unassigned you will get a null reference access violation.

You can also streamline it a little like this

var // or as const
  my_proc: procedure = HelloWorld;

Then you know it is assigned. I guess this would be useful if you want to alias reference a procedure declared in a different unit.

This works the same for functions or procedures with parameters.

procedure Hello(name: String);
begin
  ShowMessage('Hello ' + name);
end;

function Nine: integer;
begin
  Result := 9;
end;

var
  argumentative: procedure(s: string) = Hello;
  number: function: integer = Nine;

Notice that the name of the argument doesn’t have to match, but the number, order and types do. If they don’t then you will get the error

E2009 Incompatible types: ‘Parameter lists differ’

Now what if you are dealing with procedures or functions that are members of an object? If you try to assign them to the above types you will get the error

E2009 Incompatible types: ‘regular procedure and method pointer’

And that is because members of an object are method pointers. Fear not, you can handle them with just a slightly different type declaration:

type
  TMethod = procedure of object;
  TFunc = function: integer of object;
  TNotifyEvent = procedure(Sender: TObject) of object;

In this case they are declared as types with “of object” added to the end. This indicates that they are procedures of an object. AKA members or method pointers.

You can read more about procedural types and method pointers in the DocWiki.

Why would you want to do any of this? First of all, the method pointer is how the VCL & FMX handles dependency injection through event handlers. This is also really useful when combined with anonymous methods and the parallel programming library.

Categories
DataBase Source Code

New Delphi Seattle MongoDB Sample

I created some more Delphi 10 Seattle samples to show off MongoDB and FireDAC functionality: LocalSQL, Indexing & Geospatial.

FireDAC MongoDB NoSQL

The first one queries some data from MongoDB allowing you to specify the match, sort and projection, then it stores the results in a DataSet. At that point you can use LocalSQL to write a SQL query against the result set. While FireDAC gives you full native support for MongoDB, it also puts the SQL back into NoSQL.

MongoDB FireDAC LocalSQL

Indexing is used to improve your query performance. It is really easy to work with MongoDB queries with FireDAC.

MongoDB FireDAC Indexes

And one of the cool features of MongoDB is that you can do spatial queries. Here is an example that shows how to create a Spatial index and then do a spatial query with FireDAC. This uses the restaurant data that is included with the shipping samples, so make sure you load the restaurant data first.

Geospatial MongoDB FireDAC

If you missed my previous post I had a MongoDB FireDAC and C++Builder sample.

[You can download my new samples here.]

Categories
News

More Coding In Delphi in More Formats

More Coding in Delphi by Nick HodgesFor everyone who updated to Delphi or RAD Studio 10 Seattle, you get a free copy of Nick Hodges new book More Coding in Delphi (At least if you update before the special offer runs out.) Just yesterday this was updated to include the book in ePub and Mobi format, in addition to the PDF version. This is great if you have a Kindle (Mobi) or other eReader (ePub) since these formats are more flexible.

So Upgrade to RAD Studio 10 Seattle today and download More Coding in Delphi by Nick Hodges and load it on your favorite eReader. Then buy a print copy too, because those are easier to get autographed.

Categories
News

Another Android Background Services Video

Here is a snippet of my video from our Saturday Deep Dive that covers Android Background Services and iOS Background Mode.

For more information check out the original blog post.