CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jay Kimble -- The Dev Theologian

Philosophizing about the .Net religion

Script#!!!!! (new release)

I hope I don’t upset Nikhil Kothari off (unless I missed his announcement), but I was on his projects site today and noticed that he’s updated Script# (the Ajax toolkit I have been having the most fun with lately).

The new release appears to include support for WPF/E, .aspx code-behind, the “Atlas” type-system, and an installer…

If you haven’t played with it before let me explain what it is.  Script# is a toolkit that let’s you write C# code and have it “compiled” into javascript.  Now, if you are like me that sounds like a horrible idea (isolating the programmer from the underlying language… especially when it seems that you are moving to a higher level language).  The truth is that Nikhil has provided a number of cool things that you will want.  For instance there are 2 types of projects (at least in the last release).  The first type was good for building re-usable javascript libraries.  The second type of project was great for building the application glue that we all end up building to hook our apps with our re-usable scripts; this second type of project was kind of a combination or javascript and c# code, and when the javascript code is ultimately deployed it is deployed via a DLL which contains the javascript code as a resource that gets dropped to the end-user’s browser via webresources (automatically).  To make this last point work Nikhil includes an ASP.NET server tag that jumps starts the application.

He provided a custom library for manipulating the GUI from a Script# project, so it was pretty easy to write new UI libraries (more on that in a sec); if you know javascript already it actually is easy to transition to this and produce some very poweful results.  The resulting script file(s) ladies and gentlemen are READABLE!  In other words one of the goals of Script# is to have it produce clean looking Javascript that a human javascript programmer can read or modify.

I found that I could build a fairly complex solution without writing nearly as much code (comparing JS code to c# code).  Eventually I’ll post my project here.  I built a “fairly simple” html tree control… I say “fairly simple” because 1) the 2 C# classes I wrote to accomplish the control are not rocket science by any means (1 of them is a generic node, and the other is the tree container), 2) the html tree control doesn’t have a lot of features but it could easily to grow larger without a lot of effort (I’ll post the project sometime soon).

[tags: ASP.NET, Ajax, Script#, C#]


Published Dec 07 2006, 07:51 AM by Jay Kimble
Filed under: , ,

Check out Devlicio.us!

This Blog

Syndication

News

CodeBetter.Com Home
Current Threat level
Terror Alert Level