“P”的意义是什么?在灯?为什么是 PHP、Perl 或 Python?
我是一名了解一点 Python 的 Java Web 开发人员(但没有做过任何 Python Web 开发),我很好奇 LAMP 堆栈到底意味着什么。
我理解这是 Linux-Apache-MySQL-(PHP、Perl 或 Python),但我不明白除了字母 P 之外是什么将这三种语言统一起来。
如果使用 Ruby,LAMP 堆栈是否有根本不同?使用 Ruby 通常意味着使用 Rails,但 Python Web 应用程序通常使用 Django 或 Pylons。还是LAMP表示不使用框架?由于 Tomcat 取代了 Apache,Java Web 开发是否有本质上的不同?
I'm a Java web developer that knows a bit of Python (but haven't done any Python web development), and I am curious what exactly is meant by a LAMP stack.
I understand this to be Linux-Apache-MySQL-(PHP, Perl, or Python), but I don't understand what unites these three languages other than the letter P.
Is a LAMP stack fundamentally different if Ruby was used? Using Ruby would typically mean using Rails, but Python web apps usually use Django or Pylons. Or does LAMP signify that no framework is used? Is Java web development essentially different because of Tomcat in place of Apache?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
碰巧的是,这部分堆栈中最常用的组件都恰好以 P 开头。这只不过是巧合。 LAMP 缩写词是在 Ruby 获得当前流行程度之前创造的,因此您没有理由不能将 Ruby 放在 P 位置。
It's just so happens that the most commonly used components in that part of the stack all happened to begin with a P. It's nothing more than a coincidence. The LAMP acronym was coined before Ruby gained its current popularity levels and there's no reason why you couldn't stick Ruby in the P slot.
我相信 P 最初主要代表 PHP,因为这种特定的组合被极其广泛地使用。随着非 PHP 语言在 Web 开发中变得越来越流行,它被扩展到包括 Python 和 Perl,并且从未进一步扩展,因为它会破坏首字母缩略词。
LAMP 是事实上的标准做事方式,但不是正式标准。将 P 更改为 Ruby+Rails,或将 Apache/PHP 更改为 Tomcat/Java 会改变您的开发过程的一些内容,但不会改变其他内容。
LAMP 的一个重要方面是所有组件都是开源的。
I believe the P originally stood mainly for PHP, as that particular combination was extremely widely used. It got expanded to include Python and Perl as non-PHP languages became more popular for web development, and never expanded further because it would have broken the acronym.
LAMP is a de facto standard way of doing things, but not a formal standard. Changing out the P for Ruby+Rails, or Apache/PHP for Tomcat/Java changes some things about your development process, but not other things.
One aspect of LAMP that's significant is that all the components are open-source.
我认为你试图过多地解读它的含义。该缩写词之所以流行,是因为它们经常一起使用并且很容易发音。除了字面意义之外,它没有任何意义或暗示。还有 WAMP (Windows)、LAPP (PostgreSql) 以及您想要组成的任何其他内容。
I think you're trying to read too much into what it means. The acronym became popular because they were often used together and it was easy to pronounce. It doesn't have any meaning or implication beyond the literal one. There's also WAMP (Windows), LAPP (PostgreSql) and whatever else you want to make up.
除了都是流行的 Web 开发语言之外,Perl、PHP 和 Python 还有一些共同点:它们都是动态类型语言,并且开发速度非常快。我相信这是 LAMP“精神”的一部分。
因此,虽然您确实可以用任何其他语言代替“P”,但某些语言比其他语言更适合动态、敏捷的精神。例如,红宝石就非常适合。如果您擅长的话,您也可以使用Scheme。 Java 不太适合 LAMP,因为它是一种静态类型语言,并且许多人主观上感觉比所谓的脚本语言“更重”。
Besides being popular Web development languages, Perl, PHP, and Python share something else: They are all dynamically typed languages, and notoriously fast to develop in. I believe this is part of the "spirit" of LAMP.
So, while it's true you could substitute any other language in for the 'P', some languages fit the dynamic, agile spirit better than others. Ruby, for example, would fit very nicely. You could also use Scheme, if that's what you're good at. Java doesn't fit as nicely into LAMP because it is a statically typed language, and to many feels subjectively "heavier" than the so-called scripting languages.