你为什么不使用C为您的Web应用程序? [英] Why do you not use C for your web apps?

查看:157
本文介绍了你为什么不使用C为您的Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天上午我在看看几个不同的Web服务器,当我遇到 G-WAN 来了。据我了解,它的Web服务器用C写的,你必须通过编写网站/ webapps中的C.一个明显的好处是速度的G-WAN现场提出要利用它。

I was having a look at a few different web servers this morning when I came across G-WAN. As I understand, its a web server written in C and you have to make use of it by writing your websites/webapps in C. One clear benefit is speed as the G-WAN site suggests.

不过,在论坛上,G-WAN的创造者问及为何不使用C基于Web的应用程序,我不能被难(对我反正除了想到一个单一的原因,我是新手,当涉及到C)。必须有,为什么大家都用PHP,Python和Ruby等除了它是很容易在这些语言来开发更多的理由。我不认为这是一个很好的理由。

However, on the forums, the creator of G-WAN asked why not use C for web based apps and I can not think of a single reason apart from it being difficult (for me anyway, I am newbie when it comes to C). There must be more reasons why we all use PHP, Python, Ruby etc apart from it being easy to develop in these languages. I don't see that as a good reason.

所以我把它送给你?你为什么不使用C为您的Web应用

So I put it to you: Why do you not use C for your web apps?

推荐答案

它负责大量得到一个C程序正确,可靠。这意味着照顾,你需要有很好的人编写程序。这意味着你付出更多。

It takes a great deal of care to get a C program correct and secure. That care means that you need to have really good people writing your programs. That means you pay more.

此外,C不具有的功能一个巨大的单一标准库作为.NET(和其他主要网络中心平台)的绘制的好处。所以,你可能不得不要么购买元器件,或互操作执行,或推出自己的功能随附免费用多了,我们应该说网络中心的语言如PHP或C#或Ruby或什么的。这意味着你付出更多。

Also, C doesn't have the benefit of drawing from an enormous single standard library of functionality as .NET (and the other major web-centric platforms) has. So you may have to either buy components, or perform interop, or roll your own functionality which comes "for free" with a more, shall we say "web-centric" language like PHP or C# or Ruby or whatever. That means you pay more.

所有这些添加到一个事实,即单线程计算速度只是没有在网络上是重要的。如果您需要更多的可扩展性,大多数组织可以经济只是在问题扔更多的核心和被罚款。这是不是真的适合每一个人,当然。我想像,谷歌的引擎的核心是用C或不仅速度类似的语言,但为了节省真金白银的电力成本。

Add all of that to the fact that single-threaded computational speed just isn't that important on the web. If you need more scalability, most organizations can economically just throw more cores at the problem and be fine. This is not true for everyone, of course. I'd imagine that the core of Google's engine is written in C or a similar language not only for speed, but to save real money in power costs.

这篇关于你为什么不使用C为您的Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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