I've recently partnered up with a front-end developer with no C# experience, who is going to be coding the views for an ASP.NET MVC3 application I am building.
Since most web developers know Javascript, I thought it would be awesome to have him do the server-side code snips in Javascript rather than C# within Razor views. I know there isn't much code in views beyond outputting variables, etc., but there is some basic looping, etc.
I also really like the idea of having both client-side and server-side code in the views be the same language.
Is what I want to do possible? Is this a Node.js thing? (I haven't looked at that at all.)
ASP.NET MVC requires you to use .NET 4.0. So you can use any CLS compliant language that compiles to MSIL to build the server side. As far as javascript is concerned, well, JScript.NET is now obsolete and currently I am not aware of an alternative.
As far as Razor is concerned, the only languages that the parser supports are C# and VB.NET. If you want to use some other language you will have to either build a parser for it or use an alternative view engine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With