0

The Java EE 7 Tutorial says that no-interface view will "exposes a local" and "Business Interfaces" will "implement local business interfaces", but the code is same. What is the difference between them? Please give me an example, I am newbie.

Petr Mensik
  • 26,874
  • 17
  • 90
  • 115
erafraw
  • 61
  • 4

1 Answers1

1

In case that bean is implementing a local interface, the interface can be packaged in different module and this module can be later imported into the client application, thus hiding the implementation. On the other hand, no-interface view means that client would need to have dependency on the implementation which is less flexible solution.

So generally, you can safely use no-interface view when bean will interact only within your service (let's say some DAO helper class) and use bean with local interfaces it there is ever going to be used on the client side.

Nice explanation about all views is here.

Community
  • 1
  • 1
Petr Mensik
  • 26,874
  • 17
  • 90
  • 115