c# to javascript, actionscript

June 9, 2009

BCL implemented by Java API vs Java API implemented by BCL

Filed under: jsc — zproxy @ 10:59 am

While developing for java with jsc you could run your application on .net for debugging if one of the following condition has been met:

  • BCL implemented by Java API
  • Java API implemented by BCL

Even if I am talking about Java, this idea applies on other platforms jsc has support for including ActionScript, JavaScript and PHP.

BCL implemented by Java API

You application will not talk directly to the underling platform. Every feature must be implemented via a BCL class. This ensures your application will run on .net and after crosscompilation via jsc also on the target platform java. The downside is, your application will include the sourcecode BCL classes, which for embedded systems could be a problem. For Java Card 2.0 you must use only one namespace or package. To overcome that limitation the next option should be considered. On the other hand, your application could also be recompiled for another platform with no effort on your part, assuming the target has BCL classes ready for use. This is why currently you are able to write a .net application for Windows Presentation Foundation and have it compilable to javascript and actionscript.…

AvalonExampleGallery

BCL implemented by Java API

Java API implemented by BCL

Your application will directly talk to the underling platform. You need to manually reimplement the external API via available BCL classes. You might not be able to implement all features the platform has to offer, which in turn limits your debugging experience. This is considered a better option for embedded systems
Java API implemented by BCL

ScriptCoreLib and Java

At this time my compiler does not support generics nor delegates for java, which it could in the future. Even though I was more biased toward actionscript and javascript lately java has gained some significant importance. Here is a list to name a few reasons I am investing into jsc java support:

  • Java applet applications inside a browser
  • Java console applications
  • Java plugins for external applications
  • Java for JavaCard
  • Java servlets at Google App Engine
  • Java for mobile devices, including j2me
  • Java for android

If you are interested to learn more, let me know.

3 Comments »

  1. This tuff is very interesting! You could maybe plug in http://www.ikvm.net/ to get a .NET implementation of the Java API…

    Comment by Harry M — June 9, 2009 @ 12:56 pm

  2. I am aware of the IKVM product, but it is not just java API and JVM. It also applies for example to actionscript, where you are programming the flash API and running on flash virtual machine.
    That’s why I haven’t considered IKVM yet.

    Comment by zproxy — June 10, 2009 @ 6:27 am

  3. [...] in the future releases by adding support for generics and build dynamic invokation on reflection. Google App Engine and Android markets are probably going to trigger that [...]

    Pingback by new example: ThreadingExample « c# to javascript, actionscript — June 22, 2009 @ 9:08 am


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.