The book of inspiration

August 28, 2009

Windows Forms Everywhere

Filed under: jsc — Tags: , , , , , — zproxy @ 12:05 pm

Some time ago I had this idea to support Windows Forms in javascript. Recently I have started on implementing a new feature for the jsc solution in form of a metacompiler. What does this mean? You will be able to create a Windows Forms Application without referencing any of the ScriptCoreLib libraries which in turn also means you will not be required to explicitly mark your classes with the ScriptAttribute. With future releases the support for Windows forms could be extended to flash and java which in turn enables rapid application development :).

Contact me if you are interested in this technology and would like to buy it for your company.

TwentyTenSimpleWindowsFormsApplication

TwentyTen is the codename for Visual Studio 2010. This is a project template for the beta version of TwentyTen.

jsc.png (96×96)Open this example in your browser.

Browse the source code for this example.

TwentyTenDesignTwentyTenCodeTwentyTenPostBuild

TwentyTenChromeTwentyTenDocument

TwentyTenDebug

OrcasSimpleWindowsFormsApplication

Orcas is the codename for Visual Studio 2008.

jsc.png (96×96)Open this example in your browser.

Browse the source code for this example.

OrcasDesign1OrcasDesign2OrcasPostBuild

OrcasChromeOrcasDocument

OrcasDebug

Project templates

NewTemplates

The two examples shown above are actually project templates for visual studio. The zip files should be copied to your template folder.

Example:

C:\Users\arvo\Documents\Visual Studio 2008\Templates\ProjectTemplates

In the future releases this could be automated by an installer.

What does the jsc.meta – the meta compiler for jsc do?

It will create the final glue to bind two object spaces together by automatically referencing the Base Class Library implementations within the set of ScriptCoreLib assemblies. The meta compiler could be used in the future to provide proxy services and alike to talk seamlessly over the network to the server or to a client side persistence service like SQLLite.

There are a few caveats:

  1. Long filename paths which include a space must be put inside quotes.
  2. You need to turn off the ‘optimize‘ feature in the release build in the project properties.
  3. You cannot use types which have no implementation in the ScriptCoreLib assembly. You should notify us if you want us to add specific support for you.
  4. Satellite assemblies referenced by your Simple Windows Forms Application project must at this time mark themselves with [assembly: Obfuscate(Feature = “script”)].
  5. You must use a post build event to instruct javascript translation. The first release build will take longer than the later incremental builds.
  6. The post build event is configured to not to run in debug build which enables you to run and debug your application within Visual Studio instead.
  7. In .net 4 you cannot define events at this time, due to the changes introduced in the generated IL. This will be resolved after .net 4 is released.
  8. In .net 4 you cannot use the lock keyword at this time, due to the changes introduced in the generated IL. This will be resolved after .net 4 is released. Supported when targeting  java in current version of .net.

PS2. The jsc compiler should be installed at c:\util\jsc\bin. If any of the examples have a relative reference to one of its assemblies and cannot find them you might want to edit their respective project files to reference by the absolute path instead.

Download jsc here. (Others already have!)

January 6, 2008

Example Gallery

Filed under: jsc — Tags: , , , — zproxy @ 3:17 pm
This is a collection of projects developed with jsc. They were coded in c# and translated to javascript with jsc. Click on the pictures to load the applications or on the names to open them in a new window. You might need to press refresh to come back to this index. Enoy! 🙂

    Create a free website or blog at WordPress.com.