Vote UpVote

Do not expose properties with writeable fields without a chance to react on the writes.

The Wiert Corner – From a chat with a co-worker a while ago: I’m not against properties. Just something against properties properties that are objects with writeable fields. So even if you expose such a property as read-only, it can still get its writeable fields overwritten. That is a pain when those are part of the state of the underlying object. In other words: encapsulate your state changes. Here we solved it by making the type of the property immutable the property writeable react on state changes during the write Proper encapsulation. In this case it was a project mixing C# and Delphi, ...
Favorite? Off-Topic? jpluimers @ 2015-11-04 06:00


Visits: 1155
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)