Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 07/07/21 in all areas

  1. Isn't fastest and using Delphi's own classes mutually exclusive? My personal recommendation goes to https://github.com/ahausladen/JsonDataObjects
  2. Have you read Delphi's JSON documentation yet? Particularly the "Reading a JSON With Different Frameworks" examples in the Readers and Writers JSON Framework section. Also see Readers and Writers JSON Framework: Reading JSON Objects
  3. Attila Kovacs

    Using Attributes in class declarations

    Attributes are about that, that you don't have to have form props/code. It's like templating for recurring things. Like Lars' grids or in my case my ORM's. It has a bunch of benefits, like I can easily include them anywhere without any dependency. Also, for the grid example, it can be the default layout which you could overload with custom settings but on deleting them or on a new install, you don't have to deal with the initial data. Also, attributed things can be tested very good. Also, on many parameters it's ugly AF, I'm using JSON strings on complex attributes. Which are very error prone, but can be tested very easily. Yes, it's also not perfect and misses a lot of things like a NameOf(), but we are used to waiting centuries for cookies. No... Yes... Whatever... It's longer than green.
  4. Fr0sT.Brutal

    Using Attributes in class declarations

    Honestly, this example rather shows how awkward attributes are. All options you provided seem to be better defined in form props/code than in class declaration. Drawbacks of attributes IMHO: - hard-coded values - constants are scattered and repeating - violation of abstraction of structure from style (like visual styles defined right in HTML) I could be wrong but so far I see only one really useful application - defining structures for (de)serialization but even here attributes are not required for simple cases. 2nd application, handy but not necessary (the only one I use myself) is marking DUnitX's test methods
  5. Fr0sT.Brutal

    Delphi compatibility with Windows 11?

    My guess: M$ either looses TPM requirements or loses significant piece of virtualized systems market. Anyway W11 is not so much killer-featured to run and buy it. Some will reject upgrading, some will switch to Linux.
×