Web开发的脚本语言与编译语言 [英] Scripting Languages vs. Compiled Languages for web development

查看:78
本文介绍了Web开发的脚本语言与编译语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管我来自编程的Web开发方面的纯PHP背景,但我也花了很多时间在台式机上使用C#和C ++.

Though I come from a purely PHP background on the web development side of programming, I have also spent much time with C# and C++ on the desktop.

我真的不想引发任何火焰大战,但是:

I don't really want to spark any flame wars, but:

什么时候应该使用脚本语言而不是编译语言来进行网站开发?
(反之亦然)

When should you use scripting languages over compiled languages for website development?
(and vice versa)

为澄清这个问题,我定义了一种脚本语言"来表示诸如PHP,Python或Ruby之类的解释性语言,并定义了一种编译语言"来代表诸如C#之类的强类型编译语言. ,C ++,Java或VB.

Just to clarify, for the sake of this question, I define a "scripting language" to mean an interpreted language like PHP, Python, or Ruby, and a "compiled language" to mean a strongly typed, compiled language like C#, C++, Java, or VB.

推荐答案

这取决于:-)

打开...

It depends :-)

On...

  • ...您希望在何处以及如何部署该应用程序
  • ...您组织中工程师的技能集
  • ...您希望与哪些第三方组件集成或合并

如果您需要能够在数十种不同的可能平台上部署该解决方案,那么您可能会发现,使用PHP比使用Java更好(例如).有成千上万的Java托管提供程序,但可能有数百万的PHP托管提供程序. (我说这是作为一名Java负责人,他充其量发现PHP如此如此".)

If you need to be able to deploy the solution on any of dozens of different possible platforms, you may find that you're better off with PHP than Java (for example). There are hundreds of thousands of Java hosting providers out there, but there are probably millions of PHP hosting providers. (And I say this as a Java-head who finds PHP "so so" at best.)

这也适用于OS.除了Mono,.Net的东西会限制您进行基于Windows的部署(或者落后于最前沿,并且必须非常非常严格地测试您引入的每个第3方组件,以确保它没有Mono. ...问题).

This goes to OS as well. Mono aside, .Net stuff is going to limit you to Windows-based deployment (or lagging behind the cutting edge and having to very, very rigorously test each and every 3rd party component you bring in, to ensure that it doesn't have Mono...issues).

在一种环境或语言中加快速度并非易事.对于我们大多数人来说,掌握基础知识是非常快的,但是您可能没有做出最佳的架构/设计决策,因为(相对而言)您在环境/语言方面比较虚弱.技能集很重要.

Coming up to speed in an environment or language is non-trivial. For most of us, picking up the basics is pretty quick, but you may not be making the best architectural/design decisions because you're (comparatively) weak on the environment/language. Skillsets count.

与此相关:技能组招聘人数.聘请具有3-4年经验的PHP开发人员,或拥有3-4年经验的Java开发人员,或C#开发人员,还是更容易(和/或更便宜)?

Related to this: Skillset hiring counts. Is it easier (and/or cheaper) to hire PHP devs with 3-4 years of experience, or Java devs with 3-4 years of experience, or C# devs, or...?

在您的目标开发领域中,您想与哪些服务器端组件或软件包集成? PHP,Java,C#或ASP.Net都具有大量的功能.但是,它们大体上是不同的,所以您需要查看实际要使用的内容.

In your target area of development, which server-side components or packages will you want to integrate with? PHP has a vast array of things available for it, as does Java, as does C# or ASP.Net. But they're different things (by and large), so you'll want to look at what you actually want to use.

所以,我认为这(在当今世界中)不是 compiled 还是 scripted 正在尝试做.

So I think it's less a matter of compiled vs. scripted (in today's world), and more a matter of what's the best fit by other criteria for what you're trying to do.

当然,总是有"both/and".例如,我现在确实在两个不相关的主要环境中工作,都使用脚本和编译资源的组合. (其中一个是通过Tomcat上的Rhino的Java + JavaScript,另一个是IIS上的已编译COM对象+ JScript [同样是服务器端].)

And of course, there's always "both/and". For instance, I do work in two main, unrelated environments right now, both using a combination of scripted and compiled resources. (One of them is Java + JavaScript via Rhino on Tomcat, the other is compiled COM objects + JScript [again, server-side] on IIS.)

这篇关于Web开发的脚本语言与编译语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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