asp.net - Can i use jscript in vs2010 -


i looking around @ how make javascript run more efficiently compiled code. came across jscript.net in question jscript

whilst not interested in using hide javascript logic interested in fact resulted in compiled code.

i tried googling around seem was old idea microsoft dating around framework 1.1.

also, got 2 camps of opinions saying hated because nightmare debug , other side saying improved performance.

i have not found more info that.

so, if not concerned debugging (for moment) should consider using jscript.net compiled faster execution of code? there more modern alternative framework using or should not consider @ all?

finally, {sorry} there code samples/instruction how implement it?

lately i'm using jscript.net lot (along 'old' jscript comes wsh).

but never use visual studio (you found this).but simple notepad++.

and here's makes jscript great me:

  1. it's available on every windows system (even ancient xp machines have .net framework them) , because every .net framework comes jscript compiler.
  2. because of jscript directives it's perfect 'built-in' batch file (example bellow)
  3. there's lot of javascript code can used directly in jscript.net. after javascript popular programming language in world.
  4. it has .net power behind it

and don't like:

  1. looks it's little bit abandoned microsoft.
  2. even on msdn there code snippets/examples few.despite in 90% of cases it's easy re-write c# code jscript.
  3. there cool features missing in jscript.net available in other 2 native .net langiages (vb , cs) - dll import , generics ..

and here's how use jscript.net in notepad :

@if (@x)==(@y) @end /****** silent jscript comment ******  @echo off :::::::::::::::::::::::::::::::::::: :::       compile script    :::: :::::::::::::::::::::::::::::::::::: setlocal  :: remove rem bellow when fell code ready use rem if exist "%~n0.exe" goto :skip_compilation  :: searching latest installed .net framework /f "tokens=* delims=" %%v in ('dir /b /s /a:d /o:-n "%systemroot%\microsoft.net\framework\v*"') (     if exist "%%v\jsc.exe" (         rem :: javascript.net compiler         set "jsc=%%~dpsnfxv\jsc.exe"         goto :break_loop     ) ) echo jsc.exe not found && exit /b 0 :break_loop    call %jsc% /nologo /out:"%~n0.exe" "%~f0"  :::::::::::::::::::::::::::::::::::: :::       end of compilation    :::: :::::::::::::::::::::::::::::::::::: :skip_compilation  :: :::::::::: "%~n0.exe" %* :::::::: :: endlocal exit /b 0  ****** end of jscript comment ******/  import system; console.writeline( "boo" ); console.writeline("press key continue..."); console.readkey(); 

you can save .bat file , run it.it compile , start.as whole don't worry code inside comments , can use pattern.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -