0

I've grabbed the below text from a book about learning programming languages: the whole text is as follow:

Why Decoupling Is Good?

I’ve kind of alluded to that earlier, and we’ll cover it in more detail when we come to implementing these concepts, but in short decoupling our interfaces (or contracts) from our implementations provides the following benefits:

• Security: We may not want to expose potentially sensitive data contained in our implementation (think our Model) to our external consumers. Providing an external representation (e.g., a DTO) with sensitive information removed addresses this.

• Change Agility: Separating out our interface – which should remain consistent so as not to break our “contract” with our consumers – means we can then change our implementation detail without impacting that interface. We then have the confidence to react quickly to market demands without fear of breaking existing agreements. We’ll demonstrate this concept more when we come onto using dependency injection and our repository.

Now my question is that the highlighted part above(removed addresses this) makes sense or not? If yes, what does it mean? If not, then what does the whole following sentence mean?

Providing an external representation (e.g., a DTO) with sensitive information removed addresses this.

2 Answers 2

1

You are slightly misreading the sentence. It is the sensitive information that is removed which, in turn fixes / cures [addresses] the security problem.
You could rewrite it, with the same meaning, by saying:

This problem can be solved by providing an external representation (e.g., a DTO) not containing the sensitive information.

1

The sentence makes sense. The paragraph starting 'Security' first states a potential problem:

We may not want to expose potentially sensitive data contained in our implementation [..] to our external consumers

Then a solution to the problem is described:

Providing an external representation (e.g., a DTO) with sensitive information removed addresses this.

'This' is a demonstrative pronoun referring back to the problem stated in the previous sentence. The action (providing a representation with sensitive information removed) addresses (deals with) the problem previously stated.

Address (verb) DEAL WITH

Demonstrative pronouns

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .