blog: jsc (c# to javascript)
Recompile your .net assembly to javascript, actionscript, php or java
What if I could code in one great language and have it self-translate to other similar languages? - It was just a dream, until now - today it is a reality
» Buzzwords

Web 2.0 hype? Want build better web sites, but javascript is too hard? No real IDE? Maybe you should try jsc. The web app can be built within Visual Studio 2008 or any other c# compliant IDE, and then the application magically appears. You should think of it as a smart client. Precompile your c# to javascript with jsc! As an option instead of using IIS and asp.net, you could get away by using apache, with mysql and php.

» What is jsc?

jsc is a decompiler or a cross compiler if you will. It is not a source-code parser nor an IDE. It is a command line utility like any other compiler. jsc was originally an anagram for csharp to javascript.

» How does it work?

The compiler extracts CIL from a .net assembly (latest javascript screencast, old screencast). It filters out the classes which are marked with the ScriptAttribute. It selects the target language and emits the source.

Each assembly defines which namespaces will be filtered in. Each class in these namespaces must define ScriptAttribute, to be opt-in for jsc compilation. Therefore, previously built assamblies will not be processed.

» What is the current status?
Currently, the jsc project is non-commercial, unsupported and experimental , but free to use :) If any of you manage to create something others would like to see with this, be it java games or ajax apps, post a comment on the blog.

» Who would like to use it?

» Known lmitations

» What browsers are tested when developing jsc:scriptcorelib?

» Will jsc run on mono?
It sure should.


jsc:javascript Examples:

Note: The initial download may take a while and not all examples have a startup screen that is not white. Also ctrl+f5 might help if the load fails due timeout.



jsc:actionscript Examples:




jsc:php Examples:




jsc:java Examples:



Tutorials:

Tutorials to read when just starting with jsc:
Some screencast from the past:

Getting started:

» What to do?
  1. Install Visual Studio Orcas or later
  2. Download jsc and extract the files to a new folder (c:\util\)
  3. Create a new project and build
  4. Develop your application

Released Project Templates:

» Which project templatess can be chosen by default?


Links on this topic:


SourceForge.net Logo