The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

    • @iRepeltje Slim plan. En dan nog wat eten voor hem? (als soort stok achter de deur) 21 minutes ago
    • RT @nrc: De AVG wist cookies eronder te krijgen, maar nu storten adverteerders zich op alternatieven die de privacy nog meer bedreigen. Hoe… 36 minutes ago
    • RT @gathara: #BREAKING Dutch police have brutally crushed protests demanding fundamental freedoms, which officials see as embarrassing for… 36 minutes ago
    • RT @Carend_2020: Opnieuw verzorgen we de Webinar: "Interculturele en existentiële zorg bij corona!" Speciaal voor artsen, verpleegkundigen… 39 minutes ago
    • @EinsteinBarbie @bpschut Die heeft me tijden geleden al een keer geblocked. Vast omdat ik iets van je ge-retweet heb (: 39 minutes ago
  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,230 other followers

Archive for January 31st, 2018

Which class memory management model would you prefer for Delphi?

Posted by jpluimers on 2018/01/31

An interesting discussion on ARC and classic memory management in Delphi and ideas on hybrid ways: [WayBack] Which class memory management model would you prefer for Delphi? Or better, which one would fit better for your needs? – Malcon X Portela – Google+

–jeroen

Posted in Delphi, Development, Software Development | 9 Comments »

Life Beyond Distributed Transactions – ACM Queue

Posted by jpluimers on 2018/01/31

This article focuses on how an application developer can build a successful scalable enterprise application when he or she has only a local database or transaction system available. Availability is not addressed, merely scale and correctness.

I’m re-reading [WayBackLife Beyond Distributed Transactions – ACM Queue as it such a great article.

Via: [WayBack] Pat Helland on scaling: If you are not willing to pay the cost of distributed transactions, what options do you have and what are the costs associated with this choice – Kristian Köhntopp – Google+

Executive Summary: embrace uncertainty. It can’t be avoided.

–jeroen

Posted in Design Patterns, Development, Software Development | Leave a Comment »

As Delphi generics are not supported for free functions, wrap them in a record container.

Posted by jpluimers on 2018/01/31

Of the things not possible with generics in Delphi, I already wrote about Impossible: Property using Generics in Delphi.

Now it’s time to write about simulating a free function with generics as this is impossible:

function CreateManaged<T>(const value: T): IManaged<T>;

Usually I create a static record method for these, as records do not have VMT overhead, less RTTI overhead and I’ve been used to see records as helpers for other types long before helpers initially were introduced in Delphi 8 to extend classes..

Spring4D has an excellent example of such a record workaround in the Managed.New<T> commit:

type
  Managed = record
  public
    class function New<T>(const value: T): IManaged<T>; static;
  end;

...

class function Managed.New<T>(const value: T): IManaged<T>;
begin
  Result := TManaged<T>.Create(value);
end;

It basically is a factory for classes implementing the IManaged interface.

In the mean time, Managed has been renamed to Shared but the above code shows my point.

–jeroen

Reference: [WayBackClass Helpers documented in Delphi 2007, introduced in Delphi 8

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 5 Comments »

 
%d bloggers like this: