用于 Web 开发的 Python/Django 还是 C#/ASP.NET?

发布于 2024-07-25 04:04:24 字数 113 浏览 3 评论 0原文

我是一名 .NET 开发人员。 我没有 Python 经验。 哪个平台更具可扩展性? 哪个平台更适合大型高流量网站? 如果您对这些平台的可扩展性有任何经验,请告诉我们。

谢谢。

I am a .NET developer. I have no experience on Python. Which platform is more scalable? Which platform is more suitable for large-size high-traffic web sites? If you have any experience about scalability on these platforms, please inform us.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

安静 2024-08-01 04:04:25

尽管我非常喜欢 Python(而且,这是很多!-),但如果您非常擅长 C#,并且正如您所说,“没有 Python 经验”,的代码将更具可扩展性如果你坚持你最了解的事情,那么它是合适的(至少在接下来的几个月里)。 对于假设的在这两个平台都非常熟练的开发人员来说,可扩展性本质上是一种负担,而 Python 将提高该开发人员的生产力; 但要真正擅长任何技术都需要几个月的练习,它不会“神奇地发生”。

所以,除非你想扩大你的技能范围和工作机会,或者提高你的生产力,而是特别严格地关注你现在正在编码的网络应用程序的可扩展性,我凭良心说,建议您坚持使用 C#。 您还应该尝试使用 IronPython(并从 Mannings 获取伟大的“IronPython in Action”一书 - 偏见警报,我是作者的朋友,并且是该书的技术审阅者;-)用于各种非生产支持代码,体验它以及它可以为您带来的令人难以置信的生产力提升...但是,为了向您的客户或雇主提供最大价值,请坚持使用您真正掌握的 C#,以实现任何可扩展性-您交付给他们的关键工作!

Much as I love Python (and, that's a LOT!-), if you're highly skilled at C# and, as you say, "have no experience on Python", your code will be more scalable and suitable (for the next several months, at least) if you stick with what you know best. For a hypothetical developer extremely skilled at both platforms, scalability would essentially be a wash, and Python would enhance that developer's productivity; but getting really good at any technology takes some months of practice, it doesn't "just happen" magically.

So, unless you're trying to broaden your range of skills and job opportunities, or enhance your productivity, but rather are specifically, strictly focused on the scalability of the web apps you're coding right now, I have, in good conscience, to recommend you stick with C#. You should also try IronPython (and get the great "IronPython in Action" book from Mannings -- bias alert, I'm friends with the author and was a tech reviewer of that book;-) for all sorts of non-production supporting code, to get a taste of it and the incredible productivity boost it can give you... but, to deliver best value to your clients or employers, stick with what you REALLY master, C#, for any scalability-critical work you deliver to them!

墨离汐 2024-08-01 04:04:25

几乎所有众所周知的框架和语言都可以扩展。

使用哪一个并不重要。 最重要的是你如何很好地构建代码。

就个人而言,了解一种以上语言总是好的。

但是,您可以创建完美可扩展的 Python、PHP、.NET 应用程序。 可扩展性下降的首要因素是代码的质量,而不是语言。

Almost all the well known frameworks and languages can scale.

It doesn't really matter which one you use. Its about how well you structure the code that matters most.

On a personal level it is always good to know more than one language.

But, you can create perfectly scalable Python, PHP, .NET applications. The quality of the code is the first place scalability will fall down not the language.

如果没有你 2024-08-01 04:04:25

德里克(Derek)有一个很好的答案,所以我不再重复。

不过,我想提出一个看法。 虽然在大多数情况下,如今语言选择并不是什么大问题,但如果您确实需要高性能和可扩展性,Python 的动态特性可能会再次困扰您。 尽管动态语言可以提供所有好处,但这些好处确实是以额外开销为代价的。 .NET平台提供了完全编译的语言,并提供了多种方式来调优编译代码的性能(包括ngen支持,这样你就可以创建不需要JITted的原生编译模块。)

不知道性能是否.NET 编译语言相对于 Python 的优势对于您的特定应用程序来说确实足够了,但考虑到您已经是 .NET 开发人员,使用 ASP.NET 可能是最佳选择。

Derek had a great answer, so I won't repeat it.

I would like to make one observation, however. While for the most part, the language choice isn't really a big deal these days, if you really need high performance and scalability, the dynamic nature of python might come back to haunt you. For all the benefits that a dynamic language can provide, those benefits do come at the cost of additional overhead. The .NET platform offers fully compiled languages, and offers a variety of ways to tune the performance of compiled code (including ngen support, so you can create natively compiled modules that do not need to be JITted.)

I do not know if the performance edge .NET compiled languages have over Python is really enough for your particular application, but given that you are already a .NET developer, going with ASP.NET might be the best option.

往昔成烟 2024-08-01 04:04:25

使用 .NET over Python 会带来额外的可扩展性成本,即 Windows Server 许可证的成本(至少,您通常还会添加 SQL Server)。

There is a added scalability cost with going with .NET over Python, the cost of Windows Server licenses (at the minimum, you usually add SQL Server to that as well).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文