James P.
James P.

Reputation: 19617

Grouping user interface logic into a sort of UIService?

Being accustomed to using services and the concise calls they provide to interfact with the business layer, I've been wondering if this approach can be applied to the user interface.

For example, in a Swing application I often find myself adding a bit of logic to handle different actions. If this was programmed against an interface this would separate the actual handling from the presentation and perhaps make code clearer to read.

So, could an extra layer be applied for this purpose? Knowing that MVC is most often applied to UIs it seems that an interesting parallel could be made with the idea of a controller.

Upvotes: 1

Views: 70

Answers (1)

Omnaest
Omnaest

Reputation: 3096

Apache Wicket has a very clear approach for its html gui. Most components there have an own component model. In fact this results in many little controllers for each component which makes them really easier to maintain than most other structures I've seen. Your idea of a new layer seems to be a quite similar idea.

Upvotes: 1

Related Questions