Reinhard Pötz wrote:
As I'm curious I have a technical question: What's the difference if I read the necessary data in the flow or some milliseconds latter in the view layer? What do I gain?
You gain a cleaner separation of concerns. I simply don't like accessing my persistence layer from the view. The view is passed a model that consisits of Javascript objects, Java beans or DOMs and it should not care where it comes from.
Just IMHO,
There is no "right" answer on this. Some folks don't mind the overhead of populating and passing objects around while others prefer a more direct approach. The latter is most common in the prototyping stage where you are telling management about new things you can do.
That said, I prefer both the view and the flow to merely use objects and not control persistence directly. This allows me the freedom to define a typed "object repository" that encapsulates persistence and caching concerns. But I have worked on projects where it was easier for a quick and dirty approach.
--
"They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin