User Tools

Site Tools


at:tutorial:symbiosis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
at:tutorial:symbiosis [2008/08/01 14:41] – * tvcutsemat:tutorial:symbiosis [2008/10/22 16:52] – updated tvcutsem
Line 2: Line 2:
 ====== Symbiosis with Java ====== ====== Symbiosis with Java ======
  
-AmbientTalk is fully implemented in Java and runs on top of the JVM.  Java provides an extensive class library that can be accessed from within AmbientTalk.  In other words, Java classes can be instantiated and messages can be sent to Java objects from within AmbientTalk.+AmbientTalk is entirely implemented in Java and runs on top of the JVM. Java provides an extensive class library that can be accessed from within AmbientTalk.  In other words, Java classes can be instantiated and messages can be sent to Java objects from within AmbientTalk.
  
-The reverse, namely that AmbientTalk objects can accessed from within Java is also possible.  AmbientTalk objects are reified at the Java level such that the Java language can be used to send messages and create new objects.+The reverse, accessing AmbientTalk objects from within Javais also possible.  AmbientTalk objects are represented in Java as objects implementing a certain Java interface.
  
-This chapter explains how both sides of this symbiotic relationship between Java and AmbientTalk can be leveragedThe goal of this symbiotic relationship is to complement the advantages of both languages and to alleviate their disadvantages.  For example, AmbientTalk can use the extensive class library from Java and Java can benefit from AmbientTalk's superior concurrency abstractions.+This chapter explains how to program using this "symbiotic relationshipbetween AmbientTalk and Java. By means of this "symbiosis" AmbientTalk can use the extensive class library from Java and Java can benefit from AmbientTalk's superior concurrency abstractions.
  
 ===== Symbiosis Architecture ===== ===== Symbiosis Architecture =====
 +
 AmbientTalk has been implemented in Java. Because of this, Java plays two roles: it is both a symbiont language and the implementation language of AmbientTalk (and hence of the linguistic symbiosis itself). The figure below illustrates the different objects that play a part in the AmbientTalk/Java symbiosis, according to the implementation model of Inter-language reflection. AmbientTalk objects are physically implemented as Java objects. This is illustrated by means of the "represents" relationship. To enable symbiosis, additional objects are required which denote the //appearance// of objects from one language in the other language. At the implementation level, such appearances are implemented as //wrapper// objects, which wrap an object from a different language and which perform the protocol mapping which translates between the semantics of the symbiont languages.  AmbientTalk has been implemented in Java. Because of this, Java plays two roles: it is both a symbiont language and the implementation language of AmbientTalk (and hence of the linguistic symbiosis itself). The figure below illustrates the different objects that play a part in the AmbientTalk/Java symbiosis, according to the implementation model of Inter-language reflection. AmbientTalk objects are physically implemented as Java objects. This is illustrated by means of the "represents" relationship. To enable symbiosis, additional objects are required which denote the //appearance// of objects from one language in the other language. At the implementation level, such appearances are implemented as //wrapper// objects, which wrap an object from a different language and which perform the protocol mapping which translates between the semantics of the symbiont languages. 
  
at/tutorial/symbiosis.txt · Last modified: 2013/05/17 20:25 by tvcutsem