Top Banner
© 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript and Eclipse 3.3 using XULRunner and JavaXPCOM
11

© 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Dec 17, 2015

Download

Documents

Magdalen Hood
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

© 2008 by Bryan Campbell; made available under the EPL v1.0

Bryan CampbellSoftware Engineer, Lombardi Software

March 14, 2008

Deep integration of GWT/JavaScript and Eclipse 3.3 using XULRunner and JavaXPCOM

Page 2: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0

Page 3: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0

Demo ….

Page 4: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0

Page 5: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0

MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}

XULRunner

XPCOM

JavaXPCOM

IMessagingComponent { addToList(String msg);}

IMessagingComponent { addToList(String msg);}

Page 6: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0

MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}

IMessagingComponent { addToList(String msg);}

IMessagingComponent { addToList(String msg);}

XULRunner

XPCOM

• By wrapping the eclipse browser widget with XULRunner, we gain access to its component object model – XPCOM.

Page 7: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0

MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}

IMessagingComponent { addToList(String msg);}

IMessagingComponent { addToList(String msg);}

XULRunner

XPCOM

• JavaScript can make calls to XPCOM through the XPConnect layer.

Page 8: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0

MessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}

XULRunner

XPCOM

IMessagingComponent { addToList(String msg);}

IMessagingComponent { addToList(String msg);}

• Once the component is in place, the interface will be reflected to JavaScript through XPConnect

• A call to this component might look similar to:

IMessagingComponent messenger = xpcom.create(IMessagingComponent);messenger.addToList(“EclipseCon 08”);

Page 9: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0

XULRunner• The Java Implementation will be the actual code that is run when a call to addToList(String) is made from the web app

IMessagingComponent { addToList(String msg);}

IMessagingComponent { addToList(String msg);}

XPCOMMessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}

Page 10: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0

XULRunner

IMessagingComponent { addToList(String msg);}

IMessagingComponent { addToList(String msg);}

• Similar to XPConnect, JavaXPCOM is the layer between Java and XPCOM allowing calls to be made, and XPCOM components to be used and manipulated.

XPCOMMessagingComponent() { void addToList(String msg) { messageList.add(msg); updateView(); }}

JavaXPCOM

Page 11: © 2008 by Bryan Campbell; made available under the EPL v1.0 Bryan Campbell Software Engineer, Lombardi Software March 14, 2008 Deep integration of GWT/JavaScript.

Deep Integration of GWT and Eclipse 3.3 with JavaXPCom | © 2008 by Bryan Campbell; made available under the EPL v1.0

More Info

• Check out http://development.lombardi.com for more coding examples and resources.

• Source also available at http://code.google.com/p/javaxpcom/