在功能,性能等方面为Azure Web App选择dnx451和dnxcore 50 [英] Choosing between dnx451 and dnxcore 50 for Azure Web App in terms of functionality, performance, etc

查看:90
本文介绍了在功能,性能等方面为Azure Web App选择dnx451和dnxcore 50的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个新项目,该项目将在新的ASP.NET 5上的Azure Web App中运行.我们不打算至少在现在的Linux或类似操作系统上运行它.所以问题是,如果可能的话,我应该尽量保留这两个框架,还是我最好选择其中一个.有例如我可以用dnxcore50使用的依赖性要少得多,这不是很好.因此,主要问题是:如果在Azure Web App中运行,使用dnxcore50有什么好处,例如:性能,稳定性等优于dnx451.

I am creating a new project that will run in Azure Web App on the new ASP.NET 5. We are not planning to run it on linux or anything like that, at least now. So the question is, should I try to keep both frameworks if possible just in case or I should prefer one of them. There are e.g. much less dependencies that I can use with dnxcore50 which is not so nice. So the main question is: are there any benefits of using dnxcore50 if running in Azure Web App, like: performance, stability, etc. over dnx451.

推荐答案

我必须首先证明我仍然是ASP.NET 5的初学者(就像其他大多数人一样),所以我之前和之后都没有发布答案.您应该忽略我的声誉,因为它来自另一个学科,我知道的更好.

I have to start that I'm still the beginner in ASP.NET 5 (like the most other), so I didn't posted my answer before and you should ignore my reputation, because it's come from another subjects, which I know better.

我认为切换到ASP.NET 5的每个人都会问同样的问题,将两个框架都保留在他的项目中是否有意义.我尝试在下面发布关于该主题的我的个人思想.

I think that everybody, who switch to ASP.NET 5, ask the same question whether it does make sense to keep both framework in his projects. I try to post below my personal thoughts about the subject.

我个人推荐给我的简短建议是:保持两个框架,直到找到一些真正重要的理由从那里删除一个框架.

My personal choice is my short recommendation to you: keep both framework till you find some really important reason to drop one from there.

ASP.NET 5仍不是最终版本.该策略不是完全固定的,可以在短时间内更改.只是一些例子.先前的Beta版本已支持将"Helios"作为在IIS上托管ASP.NET 5应用程序的选项.该选项稍后被删除(请参见该语句).甚至在所有内部Microsoft组件中,甚至名称dnxcore50现在都重命名为dotnet5.4(请参阅公告).可以假设其他一些事情将来可能会改变.因此,我认为现在把所有鸡蛋都放在一个篮子里太危险了:同时保留两个框架可以降低风险.

ASP.NET 5 is still not final. The strategy is not full fixed and it can be changed in a short time later. Just some examples. Previous beta versions have supported "Helios" as an option for hosting ASP.NET 5 applications on IIS. The option was dropped later (see the statement). Even the name dnxcore50 is renamed now to dotnet5.4 at least in all internal Microsoft components (see the announcement). One can suppose that some other things could be changed in the future. Thus I think that putting all your eggs in one basket would be too dangerous now: keeping of both frameworks could reduce the risk.

我发现的第二件事是以下内容. dnxcore50(dotnet5.4或CoreFX或.NET Core基础库)不支持.Net Framework支持的许多功能.对我来说,一个重要的示例是缺少XSD架构验证(请参见此处

The next thing, which I found, was the following. dnxcore50 (dotnet5.4 or CoreFX or .NET Core foundational libraries) don't support many features supported by .Net Framework. One important example for me was missing XSD Schema validation (see here and here). I use XML only in combination with XSD Schema validation. I prefer JSON in the most other cases. Kipping of both frameworks in your project could helps you to locate the parts of your code, which could be not yet implemented in CoreFX. It could helps you to move the code in separate component or to change the implementation.

关于演出.应该从当前的实施中区分这两个框架的潜力.总的来说,CoreFX是经过重新设计和分解的.一个mscorlib的许多部分已被分离或删除(远程处理,AppDomain等).这意味着CoreFX的性能应该更好.理论上,分解后的API可以提供更好的性能.而且,可以更轻松地改进CoreFX的一部分并发布具有改进性能的新版本.更多模块而不是一个完整的模块为我们提供了改进性能和修复错误的新方法.另一方面,将依赖关系替换为新版本可能是新兼容性问题的源头,因此增加了风险,并可能降低稳定性.通过保持两个框架,我们可以测试新问题是否存在于替代框架中.它允许我们假设依赖关系的最后更改而不是主代码的最后更改是新问题的根源.

About the performance. One should distinguish potentiality of both frameworks from the current implementation. In general CoreFX was redesigned and decomposed. Many parts of one mscorlib was separated or removed (remoting, AppDomains and so on). It means that the performance of CoreFX should be better. Theoretically the factored API can provide better performance. Moreover one can more easy improve one parts of CoreFX and publish new version with improved performance. More modules instead of having one monolith gives us the new way for improvement of the performance and for fixing the bugs. On the other side replacing of dependencies to new version could be origin of new compatibility problems and thus it increases the risk and could decrease the stability. By keeping of both frameworks we can test whether the new problem exist in alternative framework. It allows us to suppose that the last changes of dependencies and not the last changes of our main code is the origin of new problems.

我可以继续使用每个框架的利弊,但是nodoby喜欢阅读冗长的文字,我的所有论点也使我做出了一个实际的决定:在我的项目中,默认情况下,两个框架都默认保留因为我发现从框架中删除一个真正的要求.

I can continue with pros and cons of the usage of every framework, but nodoby like to read long text and all my arguments forward me to the same practical decision: keeping by default of both frameworks in my projects as soon as I would find out a real requirement to drop one from the frameworks.

这篇关于在功能,性能等方面为Azure Web App选择dnx451和dnxcore 50的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆