Quantcast
Viewing all articles
Browse latest Browse all 10

Windows Forms Everywhere

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 Image may be NSFW.
Clik here to view.
:)
.

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.

Image may be NSFW.
Clik here to view.
jsc.png (96×96)
Open this example in
your browser.

Browse the source code for this example.

Image may be NSFW.
Clik here to view.
TwentyTenDesign
Image may be NSFW.
Clik here to view.
TwentyTenCode
Image may be NSFW.
Clik here to view.
TwentyTenPostBuild

Image may be NSFW.
Clik here to view.
TwentyTenChrome
Image may be NSFW.
Clik here to view.
TwentyTenDocument

Image may be NSFW.
Clik here to view.
TwentyTenDebug

OrcasSimpleWindowsFormsApplication

Orcas is the codename for Visual Studio 2008.

Image may be NSFW.
Clik here to view.
jsc.png (96×96)
Open this example in
your browser.

Browse the source code for this example.

Image may be NSFW.
Clik here to view.
OrcasDesign1
Image may be NSFW.
Clik here to view.
OrcasDesign2
Image may be NSFW.
Clik here to view.
OrcasPostBuild

Image may be NSFW.
Clik here to view.
OrcasChrome
Image may be NSFW.
Clik here to view.
OrcasDocument

Image may be NSFW.
Clik here to view.
OrcasDebug

Project templates

Image may be NSFW.
Clik here to view.
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.

Image may be NSFW.
Clik here to view.

Download jsc here. (Others already have!)


Tagged: examples, javascript, orcas, twentyten, visual studio, winforms Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 10

Trending Articles