user2022068
user2022068

Reputation:

What is the difference between resolver and mapper speaking about java?

I am not native speaker of English so this is important question for me. What is the difference between resolver and mapper in java and in common software design?

EDITED: I understand that these are not terms of java I meant that applying to java. Because every language has its own specific.

Upvotes: 2

Views: 3512

Answers (2)

MikeThomas
MikeThomas

Reputation: 554

I think of a "mapper" as something that relates a given value to another given value. That is: given one of "these" give me one of "those". So, as the name implies, a Map might be used in many cases to implement such a thing.

I think of a "resolver" in a more general way. That is, I'd create a resolver to help me finish a task that I've started. So for example, I'm about to send an email, but I need help resolving what addresses should receive it. Rather than a simple mapping, it might take some logic to resolve the final value or values.

Of course, this is all just opinion, and practice. But that's how I use these names.

Upvotes: 4

Stephen C
Stephen C

Reputation: 718826

A "resolver" is something that "resolves" things.

A "mapper" is something that "maps" things.

Neither of these terms have a single specific meaning in software engineering. Rather they have a range of meanings which partly overlap.

I recommend that you try to look past the words, and understand the classes (or whatever) in terms of the function that they are performing. In other words, use the contexts in which the words are used to infer their meaning ... in those contexts.

Upvotes: 0

Related Questions