Bck2Brwsr

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(TODO)
(TODO)
Line 19: Line 19:
Although the system is capable to run and execute trivial applications, there remains tons of things to improve and fix. Any help is welcomed. Just let me know if something interests you:
Although the system is capable to run and execute trivial applications, there remains tons of things to improve and fix. Any help is welcomed. Just let me know if something interests you:
-
* Throwing and catching exceptions - ''Tomáš Z.'' volunteered
+
* Throwing and catching exceptions
-
** different variables for different types
+
** '''Done''': Throw/catch by ''Tomáš Z.''
-
* Speed - benchmark and infrastructure to measure it in various environments - ''Martin Š.'' investigating
+
** Support for finally block
-
** Run with ''-Dbck2brwsr.runBenchmarks.browsers=firefox,chromium-browser'' (or any other browsers you want to test)
+
* Speed - use [http://openjdk.java.net/projects/graal/ Graal's] flow analyzer
* Speed - use [http://openjdk.java.net/projects/graal/ Graal's] flow analyzer
** look into the '''GraphBuilderPhase''' class and see how it creates SSA form (using '''FrameStateBuilder''')
** look into the '''GraphBuilderPhase''' class and see how it creates SSA form (using '''FrameStateBuilder''')
** '''BciBlockMapping''' class that is used for creating structured control flow from byte codes.)
** '''BciBlockMapping''' class that is used for creating structured control flow from byte codes.)
-
* More precise number support (int32, int64, float, etc.)
+
* More precise number support (int32, int64, float, etc.) - ''Martin Š.'' working on
* [[API]] for drawing on the canvas
* [[API]] for drawing on the canvas
-
* Convertor from [[GWT]]'s native code to [[Bck2Brwsr]]'s ''@JavaScriptBody''
+
* Convertor from [[GWT]]'s native code to [[Bck2Brwsr]]'s ''@JavaScriptBody'' - ''Lahváč'' may be investigating
* Method overriding with various modifiers
* Method overriding with various modifiers
* Compatibility tests
* Compatibility tests
Line 35: Line 34:
** '''Done''': Class.getMethods() works and parameterless methods can be invoked.
** '''Done''': Class.getMethods() works and parameterless methods can be invoked.
** '''Done''': Annotations of classes and methods
** '''Done''': Annotations of classes and methods
 +
** Access only to public methods
* Debugger of [[Java]] (and not [[JavaScript]] would be good)
* Debugger of [[Java]] (and not [[JavaScript]] would be good)
* [[Maven]] archetype for creating the calculator like demos
* [[Maven]] archetype for creating the calculator like demos
Line 43: Line 43:
* Support for converting [[ByteCode]] in the browser
* Support for converting [[ByteCode]] in the browser
* [[Bck2BrwsrViaRegisters|Speed via register based system]] - ''Ľubomír'' finished first version of his [http://hudson.apidesign.org/hudson/job/bck2brwsr.registers/ register based rewrite] on Dec 14, 2012.
* [[Bck2BrwsrViaRegisters|Speed via register based system]] - ''Ľubomír'' finished first version of his [http://hudson.apidesign.org/hudson/job/bck2brwsr.registers/ register based rewrite] on Dec 14, 2012.
 +
* Speed benchmark and infrastructure to measure it in various environments - ''Martin Š.''
 +
** Run with ''-Dvmtest.brwsrs=firefox,chromium-browser'' (or any other browsers you want to test)

Revision as of 06:47, 28 December 2012

During my duties at JavaOne2012 my feeling (primed by observing various RSS feeds full of posts about something which ends .js) that Java is no longer as cool as it used to be straightened. It always starts by loosing interest of newcomers, targeting just a piece of the technology segment and soon once Good Technology becomes new COBOL. Can that happen to Java? Just read Is JavaScript the Future of Programming? and (if you like Java), you'll get scared. I decided to do something about that. I'd like to return my favorite programming language Bck2Brwsr.

Goals

Create small Java capable to boot fast and run in 100% of modern browsers including those that have no special support for Java.

Demonstrate that Java has benefits over JavaScript when creating larger HTML5 applications.

Unlike other similar efforts, the goal of this project is not to execute any existing Java library. It is expected that libraries for the new, limited environment need to be specially designed.

Demo

Right now there are two compilator demos. One is generating the JavaScript during compile phase (try here). That is no longer the most interesting one.

There is also a demo that is using classes packaged in JAR files. That is in my opinion more interesting as it shows how easy it is to reuse (simple) libraries in your browser as well as on your server. Try it here!

TODO

Although the system is capable to run and execute trivial applications, there remains tons of things to improve and fix. Any help is welcomed. Just let me know if something interests you:

  • Throwing and catching exceptions
    • Done: Throw/catch by Tomáš Z.
    • Support for finally block
  • Speed - use Graal's flow analyzer
    • look into the GraphBuilderPhase class and see how it creates SSA form (using FrameStateBuilder)
    • BciBlockMapping class that is used for creating structured control flow from byte codes.)
  • More precise number support (int32, int64, float, etc.) - Martin Š. working on
  • API for drawing on the canvas
  • Convertor from GWT's native code to Bck2Brwsr's @JavaScriptBody - Lahváč may be investigating
  • Method overriding with various modifiers
  • Compatibility tests
  • Basic reflection support (e.g. Bck2Brwsr throws SecurityException when allowed),
    • Done: Class.newInstance() works.
    • Done: Class.getMethods() works and parameterless methods can be invoked.
    • Done: Annotations of classes and methods
    • Access only to public methods
  • Debugger of Java (and not JavaScript would be good)
  • Maven archetype for creating the calculator like demos
    • with translation in the browser

Done:

  • Support for converting ByteCode in the browser
  • Speed via register based system - Ľubomír finished first version of his register based rewrite on Dec 14, 2012.
  • Speed benchmark and infrastructure to measure it in various environments - Martin Š.
    • Run with -Dvmtest.brwsrs=firefox,chromium-browser (or any other browsers you want to test)
Personal tools
buy