开发者

Can C++.NET and J# be used to make a website?

I didn't see an option to create a web site in the c++ area. Is there a way around this or 开发者_运维问答am I just stuck with C# and VB.NET


A bit of googling turned this up, not sure how applicable it still is: http://www.codeproject.com/KB/mcpp/helloworldmc.aspx

However, I'd question WHY you'd want to use C++.NET over C#, given that the languages are fairly similar at the basic level. Any perceived "speedups" would probably not be very noticable given that they both compile to the same IL, and as such are both subject to the JIT-compiler.


You can probably make your website work using C++/CLI. There is no tight coupling between a .NET page (aspx or ascx) and the language of implementation. You might even get the intellisense from within the aspx/ascx files but don't quote me on that.

So to set this up you would need to create a C++/CLI project and use managed C++ to extend Page, Control, etc classes, use HttpContext etc.

Another question is whether or not there is any point doing that. You would still be targeting .NET and calling to the same API. There won't be much performance benefit if at all and you will lose the IDE support for creating controls and you wouldn't be able to use WebForms from the designer.

Edit. If you haven't done ASP.NET before you will almost definitely be firing up a normal ASP.NET project and seeing how to implement something, which classes to extend etc. So it kind of defeats the idea of using another language.


You can, in theory, use any .NET language to build ASP.NET pages. F#, for example, is fully supported in VS 2010. Whether all languages are fully supported in the tools is another question -- particularly for a language like J# that has been deprecated beyond VS 2005 and doesn't support the full depth of features of the other languages (such as the ability to create new attributes).

At a minimum, you will need to do things like define an appropriate build provider to get things going.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜