Difference between revisions of "Projects/Summer of Code/2007/Projects/KrossJava"

Jump to: navigation, search
(Abstract)
(Goals)
 
(18 intermediate revisions by 2 users not shown)
Line 19: Line 19:
  
 
Developing happens in the [http://websvn.kde.org/trunk/playground/bindings/krossjava/ KDE SVN]. Basic things are starting to work while there stays still a lot of work.
 
Developing happens in the [http://websvn.kde.org/trunk/playground/bindings/krossjava/ KDE SVN]. Basic things are starting to work while there stays still a lot of work.
 +
 +
===Goals===
 +
 +
Developing happens according to [http://www.extremeprogramming.org/ eXtreme Programming] and the following list provides a basic list of some selected goals.
 +
 +
Done so far:
 +
* [DONE] Get some basic code done, that links against the jvm.
 +
* [DONE] Be able to run "kross Test.class" that does actualy execute some java code.
 +
* [DONE] Integrate a custom classloader and put it into a kross.jar
 +
* [DONE] Get a simple sample done to connect native methods from a QObject to a Java method.
 +
* [DONE] Introduce Extension to wrap QObject's and add InvocationHandler to generalize calls.
 +
* [DONE] Java<=>Qt variables.
 +
* [DONE] Get that code generic to handle any kind of QObject.
 +
* [DONE] Cache objects.
 +
* [DONE] Be able to connect() signals, slots and jmethods.
 +
* [DONE] Be sure we are able to pass QObject instances and all supported types around + handle ref-counting correct.
 +
* [DONE] Be sure we are able to run multiple jvm's the same time.
 +
 +
Future steps done and to be done before the plugin can be named final:
 +
* [DONE] Compile to bytecode on demand.
 +
* [TODO] Be able to fetch all QObject::staticMetaObject's and use the classwriter to write matching class-files for them on one go on demand.
 +
* [TODO] probably allow to choose the used jvm at runtime.
 +
* [ON PROGRESS] Unittests++
 +
 +
Probably Later:
 +
* [TODO] QtJambi integration. That means to be able to optional load+use [http://trolltech.com/products/qt/jambi Qt Jambi Rich Client Java Development Framework] to e.g. create QWidget's in Java and pass them into the C++ world.
 +
* [TODO] To sandbox code shouldn't be that difficult.
 +
* [TODO] Provide a Kexi<=>HSQLDB implementation using the krossjava to have with it the first real world user: Kexi which is able to import/export to OO.org Base. This is a long time goal and absolute out-of-scope for this gsoc but remains defined as goal to provide an idea what the solution should be able to do and in what direction it may move.
 +
* [TODO] Do we need to support threading?
 +
 +
===Known problems===
 +
* SUN Java 1.6 Bug [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6493522 #6493522] known for more then a year now :-/
 +
* [http://forum.java.sun.com/thread.jspa?threadID=595559&messageID=3146104 libjvm.so: cannot open shared object file: No such file or directory] - we will dyn load it later anyway, so let's ignore it for now.
 +
* since Java is more static than Python or Ruby, it's a tricky task to handle it in a dynamic way.
 +
* rm -f CMakeCache.txt may help :)
 +
* [http://java.sun.com/j2se/1.3/docs/guide/reflection/proxy.html Dynamic Proxies] are not flexible enough. See [http://websvn.kde.org/?view=rev&revision=685415 r685415].

Latest revision as of 22:09, 21 December 2007

Java backend for Kross

Contents

[edit] Intro

[edit] Abstract

Kross is a scripting framework that allows a program to easily integrate support for multiple scripting languages. Currently Python, Ruby and KJS are supported.

This project aims to integrate Java as another supported scripting language. Java is among the most used programming languages according to various sources, so supporting Java in Kross opens a lot of potential for programs using Kross as a scripting backend. This affects among others popular applications as KOffice, KWord, KSpread, Krita, Kexi and SuperKaramba.

[edit] Project

Create a Java backend for Kross. This will involve creating new code to the model of the existing modules for KJS, Python and Ruby. The code will have as much as possible (ideally full) documentation and unit test coverage.

[edit] Benefits

Every application using Kross will transparently receive dynamic Java scripting support. Since Java is one of the major programming languages these days, it would allow lots of developers to start scripting with a familiar language.

Java comes with an extensive library of classes, which will then also be available to the program. Database access (JDBC), web server (Tomcat), RMI and networking, ... all become easily accessible for a wide variety of programs.

[edit] Status

Developing happens in the KDE SVN. Basic things are starting to work while there stays still a lot of work.

[edit] Goals

Developing happens according to eXtreme Programming and the following list provides a basic list of some selected goals.

Done so far:

  • [DONE] Get some basic code done, that links against the jvm.
  • [DONE] Be able to run "kross Test.class" that does actualy execute some java code.
  • [DONE] Integrate a custom classloader and put it into a kross.jar
  • [DONE] Get a simple sample done to connect native methods from a QObject to a Java method.
  • [DONE] Introduce Extension to wrap QObject's and add InvocationHandler to generalize calls.
  • [DONE] Java<=>Qt variables.
  • [DONE] Get that code generic to handle any kind of QObject.
  • [DONE] Cache objects.
  • [DONE] Be able to connect() signals, slots and jmethods.
  • [DONE] Be sure we are able to pass QObject instances and all supported types around + handle ref-counting correct.
  • [DONE] Be sure we are able to run multiple jvm's the same time.

Future steps done and to be done before the plugin can be named final:

  • [DONE] Compile to bytecode on demand.
  • [TODO] Be able to fetch all QObject::staticMetaObject's and use the classwriter to write matching class-files for them on one go on demand.
  • [TODO] probably allow to choose the used jvm at runtime.
  • [ON PROGRESS] Unittests++

Probably Later:

  • [TODO] QtJambi integration. That means to be able to optional load+use Qt Jambi Rich Client Java Development Framework to e.g. create QWidget's in Java and pass them into the C++ world.
  • [TODO] To sandbox code shouldn't be that difficult.
  • [TODO] Provide a Kexi<=>HSQLDB implementation using the krossjava to have with it the first real world user: Kexi which is able to import/export to OO.org Base. This is a long time goal and absolute out-of-scope for this gsoc but remains defined as goal to provide an idea what the solution should be able to do and in what direction it may move.
  • [TODO] Do we need to support threading?

[edit] Known problems


This page was last modified on 21 December 2007, at 22:09. This page has been accessed 6,286 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal