neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 221 forks source link

FYI: Why we use "Id" instead of "Identifier" (for Neos 9) #5024

Closed mhsdesign closed 2 months ago

mhsdesign commented 2 months ago

This is not a real issue but i think it should have been in 2022 ^^ This is just to document the discussions and implementation that refactored Node::nodeAggregateIdentifier to Node::nodeAggregateId

Initially the idea was first discussed in team meetings and later put on discuss: https://discuss.neos.io/t/rfc-use-id-instead-of-identifier-for-neos-9/6001 After general approval the change was committed https://github.com/neos/neos-development-collection/commit/5f80a56210ba903e484e79a99d82b457a226198f (directly on 9.0 as this was heavy under development with several changes daily to get a working version after the merge of the escr into Neos)

Later this change was discussed and criticised again in slack and a related pr:

One point that stood out was that the rule to consistently use abbreviations originated from when there was not such good code autocompletion and linting in php. Modern day IDE's like phpstorm make it a breeze to work with either of them as you just check whats available. But this is not true for Fusion and EEL. Here time dials back and many user use the try and error approach. And here it is generally easier to work with if you have a few rules in your head which you know they apply like: No abbreviations.

We are currently conceptualising a translation layer in eel to restore the node.identifier syntax for ease of use: https://github.com/neos/neos-development-collection/issues/5022