Random (tiny) thoughts

Jan 29, 2011 at 4:23 PM

Interesting. Let me see if I've got this right.

In a nutshell any relevant C# code is converted into JS as the page is loaded. Though clever I wonder if it is not much simpler to do the conversion as part of the build process? Also has the usual advantages of spotting errors ahead of the user.

For example this might help with the errant 'FirstTest.aspx' example which falls over whilst trying to pop an empty stack - See GetCode() and GetParametersFromStack()

Thanks for sharing. Some wonderful food for thought here.


Jan 29, 2011 at 4:29 PM

That's a good idea. I'm not working on this project any more because I haven't done any ASP.NET development in a while. The code in subversion works much better than the newest release, by the way.

Jan 29, 2011 at 4:34 PM

Yep - I'm working from the latest SVN code.

Wondering about how all the wiring might be connected up.




Jan 29, 2011 at 4:47 PM

In short, the various controls in Axial.Controls find the methods that are used and call DissembleMethod in JSWebTranslator.cs, which optimizes debug mode code so it's more like release mode code, figures out which IL instructions correspond to lines in JavaScript, and then does the translation.