0

In various development environments, a layer around native functionality is referred to as a "native bridge" (For example: RoboVM).

Why is this called a bridge? and does it have any relation to the Bridge design pattern ?

lysergic-acid
  • 19,570
  • 21
  • 109
  • 218

1 Answers1

2

I believe in this case the term "bridge" means, essentially, to allow access to something that is otherwise inaccessible. You cannot normally call native C functions from Java directly - you need to use a bridge (which provides a Java API as a means to call C functions, or which allows Java methods to be implemented in C).

I don't think this is the same as the bridge design pattern, which, as it says on the wikipedia page, is to decouple an abstraction from its implementation so that the two can vary independently. In a Java-to-native bridge there is no particular abstraction or implementation - so this is not a design pattern.

davmac
  • 20,150
  • 1
  • 40
  • 68