Sunday, February 19, 2023

DELPHICON 2023: Every APP Trick in Book with Ian Barker

DELPHICON 2023: Every APP Trick in the Book with Ian Barker 

Timestamp links have been added to each of the individual sections of this presentation.


Every App Trick in the Book
https://youtu.be/PJNnCP2JvIY?t=14829
https://github.com/checkdigits/Every_app_trick_in_the_book_-_Ian_Barker
https://blogs.embarcadero.com/delphicon-2023-every-app-trick-in-the-book/

Notifications
https://youtu.be/PJNnCP2JvIY?t=15208

Elevation Button (VCL Only)
https://youtu.be/PJNnCP2JvIY?t=15443

ShellAPI
https://youtu.be/PJNnCP2JvIY?t=15705

Settings Persistence
https://youtu.be/PJNnCP2JvIY?t=15857
TPath

User Authentication OAUTH2
https://youtu.be/PJNnCP2JvIY?t=16100
TMS SOftware Sphinx (€395 - €595)
https://tmssoftware.com/site/sphinx.asp
eSeGeCe OAuth2 Client (€349 - €649)
https://www.esegece.com/websockets/http/oauth2

NEW User BioMetrics
https://youtu.be/PJNnCP2JvIY?t=16484

Check for Internet Conncetion
https://youtu.be/PJNnCP2JvIY?t=16922

Splash Screens
https://youtu.be/PJNnCP2JvIY?t=17115

Adding Some Coolness
https://youtu.be/PJNnCP2JvIY?t=17317
http://tinyurl.com/delphiwowfactor

Themes and Styles
https://youtu.be/PJNnCP2JvIY?t=17350
http://tinyurl.com/delphiw11design

Detecting Dark Mode (and Reacting when it changes)
https://youtu.be/PJNnCP2JvIY?t=17369
https://blogs.embarcadero.com/modernize-your-app-are-you-handling-windows-themes-correctly/

Checking for Updates
https://youtu.be/PJNnCP2JvIY?t=17390
https://blog.marcocantu.com/blog/auto_updating_programs.html (2007)

In-App Scripting
https://youtu.be/PJNnCP2JvIY?t=17498
Python4Delphi
https://github.com/pyscripter/python4delphi
TMS Script Studio Pro (€190 - €630)
https://www.tmssoftware.com/site/scriptstudiopro.asp
DWScript
https://github.com/EricGrange/DWScript

Single Instance
https://youtu.be/PJNnCP2JvIY?t=17640
https://stackoverflow.com/questions/73023379

Manipulating Images
https://youtu.be/PJNnCP2JvIY?t=17767
https://skia4delphi.org

To the Web
https://youtu.be/PJNnCP2JvIY?t=17863
uniGUI ($395 - $890)
https://youtu.be/fN4m-a-C64o
IntraWeb (€399 - €2,399)
https://www.atozed.com/intraweb/
TMS WEB Core (€395 - €1,295)
https://www.tmssoftware.com/site/tmswebcore.asp
https://youtu.be/u-8yjKO3AyM

Let's Encrypt - Free SSL Certificates
https://youtu.be/PJNnCP2JvIY?t=17954
https://letsencrypt.org
Pault Toth Delphi ACME
https://github.com/tothpaul/DelphiACME

Reverse Proxy via NGINX
https://youtu.be/PJNnCP2JvIY?t=18086
https://mginix.org

Enjoy
Semper Fi
Gunny Mike
https://zilchworks.com

Saturday, February 18, 2023

DELPHICON 2023 - User Interface Design with Actions by Ray Konopka

Konopka does a fantastic job showing how to streamline the User Interface using Actions. This is a must see video from DELPHICON 2023.

He starts out showing the typical way of coding in Delphi by using onClick events on Buttons and Menus. He then shows how to build an ActionList from scratch, using Categories and Actions. He then ports all the onClick events to Action onExecute events. He also imparts the knowledge he's learned over the years as to why this is the best way to code a user interface. Absolutely brilliant.

Every time I watch Konopka give a presentation I learn something. It's amazing to watch a master demonstrate his craft. 


Video presentation link:
https://youtu.be/PJNnCP2JvIY?t=7483

Source code link:
https://delphibydesign.com/downloads/

Enjoy!
Semper Fi
Gunny Mike
https://zilchworks.com

Sunday, February 12, 2023

Use ChatGPT to Convert Other Language Source Code to Delphi

If you've read some of my previous posts you know how much I've struggled to make the paradigm shift from being a top-down, procedural programmer to an OOP programmer. I've purchased several books on OOP. And one book series I thought would hold some promise are "The Object-Oriented Thought Process" books written by Matt Weisfeld. I have four different editions on my book shelf.

I struggle with OOP for several reasons. One very frustrating reason is the lack of Delphi/Pascal examples used by authors. Most of the code examples are written in Java, or C, or C# or some language other than Delphi/Pascal.

The last bullet point on page 3 of Weisfled's fourth edition, listed under the heading of "What's New in the Fourth Edition", states:

  • Expanded code examples, for certain chapters, in Java, C# .NET, VB .NET, and Objective-C available online on the publisher's website

No Object Pascal or Delphi examples!

No Object Pascal or Delphi examples. I reached out to Weisfeld asking if he might include Object Pascal examples and received a negative response.

I love Pascal. It's elegant. It's easy to read and understand. I've been using Pascal/Delphi since 1985. (2023-1985=38 years). Besides SQL, it's my main programming language. Ok, I confess, I did Active Server Pages (APS) and VB Script for about 10 years.

I've tried loading Java onto my machine so I could follow along and learn the OOP concepts but I just can't wrap my head around the Java syntax.

Today, I discovered the answer that works for me. ChatGPT!

I asked ChatGPT to convert the following Java code from page 24 of "The Object-Oriented Thought Process" to Delphi and the results were very hopeful.

public class IntSquare {

  // private attribute
  private int squareValue;
  
  //public interface
  public in getSquare (int value) {
    
    squareValue = calculateSquare(value);
    return SquareValue
  
  }
  
  //private implementation
  private int calculation (int value) {
    return Math.pow(value,2);
  }
}

Here are the results returned from ChatGPT:

type
TIntSquare = class
private
FSquareValue: Integer;
function CalculateSquare(value: Integer): Integer;
public
function GetSquare(value: Integer): Integer;
end;

implementation

function TIntSquare.CalculateSquare(value: Integer): Integer;
begin
Result := value * value;
end;

function TIntSquare.GetSquare(value: Integer): Integer;
begin
FSquareValue := CalculateSquare(value);
Result := FSquareValue;
end;

end.

I know the results are not the indented and formatted code you would get from inside the IDE. This was my first attempt at using ChatGPT. I took several screen shots of my interaction with ChatGPT so I can show you what happened.

Here is my entire ChatGPT session:






Here is the final output from ChatGPT.

uses
  System.Math;
  
type
  TIntSquare = class
  private
    FSquareValue: Integer;
    function GetSquareValue: Integer;
    procedure SetSquareValue(const Value: Integer);
    function CalculateSquare(value: Integer): Integer;
  public
    property SquareValue: Integer read GetSquareValue write SetSquareValue;
    function GetSquare(value: Integer): Integer;
  end;

implementation

function TIntSquare.CalculateSquare(value: Integer): Integer;
begin
  Result := Round(Power(value, 2));
end;

function TIntSquare.GetSquare(value: Integer): Integer;
begin
  SquareValue := CalculateSquare(value);
  Result := SquareValue;
end;

function TIntSquare.GetSquareValue: Integer;
begin
  Result := FSquareValue;
end;

procedure TIntSquare.SetSquareValue(const Value: Integer);
begin
  FSquareValue := Value;
end;

end.

This looks very promising! Give ChatGPT a try converting code.
https://openai.com/blog/chatgpt/


Enjoy!
Semper Fi
Gunny Mike https://zilchworks.com