为什么大多数网站是用php开发而不是Java呢?
回复内容:
成本低 见效快 应该说是"近几年的"网站,有兴趣你可以调查一下,
最早的一批网站, 大多是ASP和.NET写的, 如携程/艺龙/京东(老版),
然后是JAVA(如淘宝),
再往后才是PHP.
PHP的优势在于(人才上)易于学习, 雇佣成本低,
(产品迭代上)开发速度快,
和敏捷&小步试错思想能完美搭配. 最早PHP的名字叫Personal Home Pages,当时互联网正在兴起,大多数空间和虚拟主机是PHP的,运行于Linux平台,因为是免费的,空间价格相比同时期的ASP更便宜。于是出现了很多基于PHP的CMS、论坛系统和WordPress这种牛X系统,搭建起来很方便。
PHP本身做小型Web开发速度很快,原因可能是它原本基于过程的编程范式,无需像面向对象语言一样定义复杂的类层次结构,上手简单,非专业人士也能玩转,对于熟悉C接口的人上手更快。一个PHP文件,嵌入点HTML,数据库读点数据,设一下CSS,一个简单的页面就搞定了。
现在PHP经过这么多年的发展也更成熟了,虽然有些被人诟病的特性,但就Web开发来说,确实是最好的选择,还有后来fb这种巨头做榜样。一旦外部环境良性发展,PHP在Web开发领域的霸主地位也就渐渐形成了。 PHP对web开发的抽象是处理字符串和array();
Java对web开发的抽象是Container,Service,Service Container, Service Container Dependency Injection ... WTF. 因为他是专为WEB设计的语言,术业有专攻,所以WEB开发比其他语言更快,大多数常见应用都能开发,WEB开发,PHP更专业。
因为速度快,便宜,PHP程序员人数多,规模大,所以大多数网站起步阶段都用它,后期更换语言成本大,所以就一直保持下来了。如果不是系统搞不定业务了,也没有必要更换语言,比如淘宝,建站初期就是买的PHP程序,后来不断更新,部分模块搞不定就换了Java,能支撑住业务的部分都是保留原来的PHP,原因还是成本。
也不是所有企业都爱PHP,比如网易,就偏爱Java,网易新闻,网易更贴,网易云音乐都是Java做的,看这个就知道http://music.163.com/index.html。 因为PHP是世界上最好的语言。 因为第一个技术会php不会java,其他说法都是扯淡 大部分的网站都是中小网站,而php做中小网站又是最快的,而且做起来成本低 PHP纯粹是为了WEB而生,很多地方比JAVA要方便的多 大哥,PHP是世界上最好的语言,WEB开发... 现在都是大数据,分布式,云计算了,WEB只是一层皮,你只需要做点漂亮的“皮肤”吗?互联网产品WEB端如果只是PHP搞定,我也是醉了。
而如果一家中小公司,动不动就PHP,摆明了就没技术含量,忽悠人的。
你还记得几年前那个PHP100吗?误人子弟。
放弃PHP吧,你要是想快速建站,学Python行吗?
PHP是世界上最好的语言,C#第二

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

This is the second and final part of the series on building a React application with a Laravel back-end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be dev

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

In this article, we're going to explore the notification system in the Laravel web framework. The notification system in Laravel allows you to send notifications to users over different channels. Today, we'll discuss how you can send notifications ov

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot
