W
W
wolfandman2019-01-27 03:53:25
Spring
wolfandman, 2019-01-27 03:53:25

Spring: what and how to pass to view (pattern)?

Hello! I'm using Spring Boot 2.
I'm doing pagination, I need to pass related search parameters and the phrase "2 products" was found.
I thought about how best to organize the transfer of all the necessary elements to the view.
You can pass the list of products, the paginator and the phrase "2 products" into the view separately. But this way seems doubtful to me.
But you can combine all this into one structure and transfer it one to the view. What is the name of this pattern and in general, how best to organize everything?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
webmaster2, 2019-01-27
@wolfandman

Look towards the DTO (Data transfer object) pattern

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question