Spring4D hidden gems

I absolutely love the Spring4D libraries and have used them for years. But I am realising I have only scratched the surface. So I thought I would post some of my favourite but less well known features.

I was today years old when I discovered the TBuffer type - it’s part of the cryptography code - but it’s immensely useful

  • Assignable to/from TBytes
  • ToHexSting method
  • Load from/save to TStream
  • ToString method
  • Access to the underlying memory via Memory property (pointer).
  • Size property
  • Bitwise And/Or/Xor operations.

It’s just an incredibly well thought out type. It’s basically what TBytes should have been!

I only discovered it today when I needed to do some hashing - the spring4d crpytography code is pretty neat too, with support for MD5, SHA1,SHA256, SHA384 and SHA512.

Kudos to @sglienke


BTW, Use the develop branch (which is 2.0rc5) - it’s very stable.

Feel free to chime in with any others you have discovered.


The whole of Spring4D is a gem. I too have only scratched the surface (we primarily use the core features in Collections, Services, Container). I haven’t looked at new features or changes for the last couple of years (note to self - to review).

One hidden gem that we use is Spring.SystemUtils.TEnum that provides convenient ways to convert between enums and strings and integers (e.g. persistence).

Thanks for the tip on 2.0rc5.

1 Like

FWIW Kudos for TBuffer and most things in Spring.Crypto goes to Baoquan Zuo (aka Paul) the author of Spring4D. :sunglasses:


I didn’t know about the Google Group : https://groups.google.com/g/spring4d

And I expect en.Delphi-Praxis.net is a good source for queries also : Forum for Spring4D - Delphi Third-Party - Delphi-PRAXiS [en]

I love DelphiPraxis but it sucks for notifications - any post into the Google group directly goes to my emails (well when Google does not mess it up and leaves it closed for ages due to a false positive on some malicious content filter)
The same is the case for StackOverflow - once a week or so I check the spring4d tag.

1 Like

I use RSS - I have a “bot” (at the moment, a service on a Windows machine) that checks feeds, and posts new entries to related channels in my Slack workspace, e.g. #forum-posts for DP and SO, and #qp for Quality Portal :slight_smile: