On 10/19/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > I think there are no fractal patterns, but fractal architectures, > which follows same pattern in different levels. Example: > a typical 3-tier can be considered MVC > the presentation layer in the 3-tier could itself be an MVC too (jsp > the view, action the controller, bean the model)... > > Therefore fractal, using same pattern in part of the pattern again.
And, as it stands, I believe we tend to leave too much of the work to the presentation layer framework. In most the MVC diagrams, the business layer is a little box marked "There lie POJOs". Readers are left with the implication that the only place where we can have standardization, the only place where we can share utility between projects, is the presentation layer. I believe that many tasks we now leave to presentation layer frameworks -- like Struts, Spring MVC, WebWork, et al. -- can just as easily be handled by a business layer framework. Chores like data conversion, formatting, validation, and localization do not need to be done by every presentation layer. Many tasks can just as easily be done by a business layer framework and then shared between presentation layers. After all, it's not presentation layer that cares whether we use commas or dots. It's the *business* people who care. To the presentation, it's all arbitrary text that needs to injected into the markup stream. The presentation layer is not about text or data, it's about markup. If we consider unit tests to be a presentation layer, then *every* application should be designed to work with multiple presentation layers. The testing layer and the shipping layer. If we start thinking along these lines, then DTOs become more useful again. DTOs are how an application layered with "fractal" fameworks communicates. Of course, not all DTOs need to be dirt stupid. The original HTTP request carries only values. But, the Java HttpRequest includes many helper methods. Ditto for an ActionForm. Likewise, we can pass a DTO from an Action to a business layer framework using a DTO that not only carries data, but includes helper methods to adapt the data to Struts (or any given presentation layer). -Ted. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]