Merge pull request #2950 from wi-cuckoo/master

translated talk/20150615 PHP at 20--From pet project to powerhouse.md
This commit is contained in:
ictlyh 2015-06-19 17:03:58 +08:00
commit 3a65212a1b
2 changed files with 81 additions and 83 deletions

View File

@ -1,83 +0,0 @@
translating wi-cuckoo
PHP at 20: From pet project to powerhouse
================================================================================
![](http://images.techhive.com/images/article/2015/06/13049862325_8c97a11878_z-100590275-primary.idge.jpg)
Credit: [Steve Jurvetson via Flickr][1]
> The one-time silly little project has transformed into a Web powerhouse, thanks to flexibility, pragmatism, and a vibrant community of Web devs
When Rasmus Lerdorf released “[a set of small tight CGI binaries written in C][2],” he had no idea how much his creation would impact Web development. Delivering the opening keynote at this years SunshinePHP conference in Miami, Lerdorf quipped, “In 1995, I thought I had unleashed a C API upon the Web. Obviously, thats not what happened, or wed all be C programmers.”
In fact, when Lerdorf released version 1.0 of Personal Home Page Tools -- as PHP was then known -- the Web was very young. HTML 2.0 would not be published until November of that year, and HTTP/1.0 not until May the following year. NCSA HTTPd was the most widely deployed Web server, and Netscape Navigator was the most popular Web browser, with Internet Explorer 1.0 to arrive in August. In other words, PHPs beginnings coincided with the eve of the browser wars.
Those early days speak volumes about PHPs impact on Web development. Back then, our options were limited when it came to server-side processing for Web apps. PHP stepped in to fill our need for a tool that would enable us to do dynamic things on the Web. That practical flexibility captured our imaginations, and PHP has since grown up with the Web. Now powering [more than 80 percent of the Web][3], PHP has matured into a scripting language that is especially suited to solve the Web problem. Its unique pedigree tells a story of pragmatism over theory and problem solving over purity.
### The Web glue we got hooked on ###
PHP didnt start out as a language, and this is clear from its design -- or lack thereof, as detractors point out. It began as an API to help Web developers access lower-level C libraries. The first version was a small CGI binary that provided form-processing functionality with access to request parameters and the mSQL database. And its facility with a Web apps database would prove key in sparking our interest in PHP and PHPs subsequent ascendancy.
By version 2 -- aka PHP/FI -- database support had expanded to include PostgreSQL, MySQL, Oracle, Sybase, and more. It supported these databases by wrapping their C libraries, making them a part of the PHP binary. PHP/FI could also wrap the GD library to create and manipulate GIF images. It could be run as an Apache module or compiled with FastCGI support, and it introduced the PHP script language with support for variables, arrays, language constructs, and functions. For many of us working on the Web at that time, PHP was the kind of glue we'd been looking for.
As PHP folded in more and more programming language features, morphing into version 3 and onward, it never lost this gluelike aspect. Through repositories like PECL (PHP Extension Community Library), PHP could tie together libraries and expose their functionality to the PHP layer. This capacity to bring together components became a significant facet of the beauty of PHP, though it was not limited to its source code.
### The Web as a community of coders ###
PHPs lasting impact on Web development isnt limited to what can be done with the language itself. How PHP work is done and who participates -- these too are important parts of PHPs legacy.
As early as 1997, PHP user groups began forming. One of the earliest was the Midwest PHP Users Group (later known as Chicago PHP), which held its [first meeting in February 1997][4]. This was the beginning of what would become a vibrant, energetic community of developers assembled over an affinity for a little tool that helped them solve problems on the Web. The ubiquity of PHP made it a natural choice for Web development. It became especially popular in the shared hosting world, and its low barrier to entry was attractive to many early Web developers.
With a growing community came an assortment of tools and resources for PHP developers. The year 2000 -- a watershed moment for PHP -- witnessed the first PHP Developers Meeting, a gathering of the core developers of the programming language, who met in Tel Aviv to discuss the forthcoming 4.0 release. PHP Extension and Application Repository (PEAR) also launched in 2000 to provide high-quality userland code packages following standards and best practices. The first PHP conference, PHP Kongress, was held in Germany soon after. [PHPDeveloper.org][5] came online, and to this day, it is the most authoritative news source in the PHP community.
This communal momentum proved vital to PHPs growth in subsequent years, and as the Web development industry erupted, so did PHP. PHP began powering more and larger websites. More user groups formed around the world. Mailing lists; online forums; IRC; conferences; trade journals such as php[architect], the German PHP Magazin, and International PHP Magazine -- the vibrancy of the PHP community had a significant impact on the way Web work would be done: collectively and openly, with an emphasis on code sharing.
Then, 10 years ago, shortly after the release of PHP 5, an interesting thing happened in Web development that created a general shift in how the PHP community built libraries and applications: Ruby on Rails was released.
### The rise of frameworks ###
The Ruby on Rails framework for the Ruby programming language created an increased focus and attention on the MVC (model-view-controller) architectural pattern. The Mojavi PHP framework a few years prior had used this pattern, but the hype around Ruby on Rails is what firmly cemented MVC in the PHP frameworks that followed. Frameworks exploded in the PHP community, and frameworks have changed the way developers build PHP applications.
Many important projects and developments have arisen, thanks to the proliferation of frameworks in the PHP community. The PHP [Framework Interoperability Group][6] formed in 2009 to aid in establishing coding standards, naming conventions, and best practices among frameworks. Codifying these standards and practices helped provide more interoperable software for developers using member projects code. This interoperability meant that each framework could be split into components and stand-alone libraries could be used together with monolithic frameworks. With interoperability came another important milestone: The Composer project was born in 2011.
Inspired by Node.jss NPM and Rubys Bundler, Composer has ushered in a new era of PHP application development, creating a PHP renaissance of sorts. It has encouraged interoperability between packages, standard naming conventions, adoption of coding standards, and increased test coverage. It is an essential tool in any modern PHP application.
### The need for speed and innovation ###
Today, the PHP community has a thriving ecosystem of applications and libraries. Some of the most widely installed PHP applications include WordPress, Drupal, Joomla, and MediaWiki. These applications power the Web presence of businesses of all sizes, from small mom-and-pop shops to sites like whitehouse.gov and Wikipedia. Six of the Alexa top 10 sites use PHP to serve billions of pages a day. As a result, PHP applications have been optimized for speed -- and much innovation has gone into PHP core to improve performance.
In 2010, Facebook unveiled its HipHop for PHP source-to-source compiler, which translates PHP code into C++ code and compiles it into a single executable binary application. Facebooks size and growth necessitated the move away from standard interpreted PHP code to a faster, optimized executable. However, Facebook wanted to continue using PHP for its ease of use and rapid development cycles. HipHop for PHP evolved into HHVM, a JIT (just-in-time) compilation-based execution engine for PHP, which included a new language based on PHP: [Hack][7].
Facebooks innovations, as well as other VM projects, created competition at the engine level, leading to discussions about the future of the Zend Engine that still powers PHPs core, as well as the question of a language specification. In 2014, a language specification project was created “to provide a complete and concise definition of the syntax and semantics of the PHP language,” making it possible for compiler projects to create interoperable PHP implementations.
The next major version of PHP became a topic of intense debate, and a project known as phpng (next generation) was offered as an option to clean up, refactor, optimize, and improve the PHP code base, which also showed substantial improvements to the performance of real-world applications. After deciding to name the next major version “PHP 7,” due to a previous, unreleased PHP 6.0 version, the phpng branch was merged in, and plans were made to proceed with PHP 7, working in many of the language features offered by Hack, such as scalar and return type hinting.
With the [first PHP 7 alpha release due out today][8] and benchmarks showing [performance as good as or better than that of HHVM][9] in many cases, PHP is keeping up with the pace of modern Web development needs. Likewise, the PHP-FIG continues to innovate and push frameworks and libraries to collaborate and cooperate -- most recently with the adoption of [PSR-7][10], which will change the way PHP projects handle HTTP. User groups, conferences, publications, and initiatives like [PHPMentoring.org][11] continue to advocate best practices, coding standards, and testing to the PHP developer community.
PHP has seen the Web mature through various stages, and PHP has matured. Once a simple API wrapper around lower-level C libraries, PHP has become a full-fledged programming language in its own right. Its developer community is vibrant and helpful, priding themselves in pragmatism and welcoming newcomers. PHP has stood the test of time for 20 years, and current activity in the language and community is ensuring it will be a relevant and useful language for years to come.
During his SunshinePHP keynote, Rasmus Lerdorf reflected, “Did I think Id be here 20 years later talking about this silly little project I did? No, I didnt.”
Heres to Lerdorf and the rest of the PHP community for transforming this “silly little project” into a lasting, powerful component of the Web today.
--------------------------------------------------------------------------------
via: http://www.infoworld.com/article/2933858/php/php-at-20-from-pet-project-to-powerhouse.html
作者:[Ben Ramsey][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.infoworld.com/author/Ben-Ramsey/
[1]:https://www.flickr.com/photos/jurvetson/13049862325
[2]:https://groups.google.com/d/msg/comp.infosystems.www.authoring.cgi/PyJ25gZ6z7A/M9FkTUVDfcwJ
[3]:http://w3techs.com/technologies/overview/programming_language/all
[4]:http://web.archive.org/web/20061215165756/http://chiphpug.php.net/mpug.htm
[5]:http://www.phpdeveloper.org/
[6]:http://www.php-fig.org/
[7]:http://www.infoworld.com/article/2610885/facebook-q-a--hack-brings-static-typing-to-php-world.html
[8]:https://wiki.php.net/todo/php70#timetable
[9]:http://talks.php.net/velocity15
[10]:http://www.php-fig.org/psr/psr-7/
[11]:http://phpmentoring.org/

View File

@ -0,0 +1,81 @@
PHP 20岁了从兴趣工程到强大的组织
=============================================================================
![](http://images.techhive.com/images/article/2015/06/13049862325_8c97a11878_z-100590275-primary.idge.jpg)
信任: [Steve Jurvetson via Flickr][1]
> 曾经的‘丑小鸭工程’已经转变为一个网络世界的强大组织,感谢网络世界的灵活,实用与充满生气的社区
当Rasmus Lerdorf发布“[一个用C写的紧凑的CGI可执行程序集合][2],” 他没有想到他的创造会对网络发展产生多大的影响。今年在Miami举行的SunshinePHP大会上Lerdorf做了开场演讲他自嘲到“在1995年的时候我以为我已经解除了C API的束缚在网络之上。显然事情并非那样或者我们都已经是C程序员了。”
实际上当Lerdorf发布个人主页工具 -- 后来以PHP闻名的1.0版本时 -- 那时的网络还是如此的年轻。HTML 2.0还没有公布直到那年的十一月份而且HTTP/1.0也是次年的五月份才出现。NCSA HTTPd是使用最广泛的网络浏览器而网景的Navigator则是最流行的网络浏览器八月份的时候IE1.0才到来。换句话说PHP的开端刚好撞上了浏览器战争的前夜。
早些时候说了大堆关于PHP对网络发展的影响。回到那时候我们的选择是有限的当说到服务器方面对于网络软件的进展。PHP满足了我们对于一个工具的需求就是可以使得我们在网络上做一些动态的事情。实用的灵活性束缚了我们的想像PHP从那时起便与网络共同成长。现在PHP占据了网络语言超过80%的份额,已经是成熟的脚本语言,特别适合解决网络问题。她独一无二的血统讲述一个故事,实用高于理论,解决问题高于纯粹。
### 把我们钩住的网络魔力 ###
PHP一开始并不是一门编程语言从她的设计就很明星 -- 或者她本来就缺正如那些贬低者指出的那样。最初她是作为一种API帮助网络开发者能够接入底层的C语言封装库。第一个版本是一组小的CGI可执行程序提供表单处理功能通过接入需要的参数和mSQL数据库。而且她如此容易地处理一个网络应用的数据库证明了其在激发我们对于PHP的兴趣和PHP后来的支配地位的关键作用。
到了第二版 -- aka PHP/FI -- 数据库的支持已经扩展到包括PostgreSQL、MySQL、Oracle、Sybase等等。她通过包括他们的C语言库来支持其数据库将他们作为PHP库的一部分。PHP/FI也可以包括GD库创建并管理GIF镜像。她可以作为一个Apache模块运行或者有FastCGI支持的时候被编译并且她展示了支持变量数组语言结构和函数的PHP脚本语言。对于那个时候大多数在网络这块工作的人来说PHP是我们一直在寻求的那款“胶水”。
当PHP吸纳越来越多的编程语言分支演变为第三版和之后的版本她从来没有失去连接的特性。通过仓库如PECLPHP Extension Community LibraryPHP可以把库都连在一起暴露他们的函数给PHP层。这种将组件结合在一起的能力成为PHP之美的一个重要方面尽管她没有被限制在其资源代码上。
### 网络,一个码农们的社区 ###
PHP在网络发展上的持续影响并不局限于能用这种语言干什么。PHP如何完成工作谁参与近进来 -- 这些都是PHP传奇很重要的部分。
早在1997年PHP的用户群体开始形成。其中最早的是中东的PHP用户群后来以Chiago PHP闻名并[1997年二月份的时候举行了第一次聚会][4]。这是一个充满生气,饱含激情的开发者社区形成的开端,聚合成一种吸引力 -- 在网络上很少的工具就可以帮助他们解决问题。PHP这种普遍存在的特性使得她成为网络开发一个很自然的选择。在分享主导的世界里她开始盛行而且低入的门槛对于许多早期的网络开发者来说是十分有吸引力的。
伴随着社区的成长为开发者带来了一堆工具和资源。这一年2000年 -- PHP的一个转折点 -- 见证了第一次PHP开发者大会编程语言的核心开发者的一次聚集在Tel Aviv见面讨论即将到来的4.0版本的发布。PHP扩展和应用仓库PEAR也于2000发起提供高质量的用户代码包根据标准且最好的操作。第一届PHP大会PHP Kongress不久之后在德国举行。[PHPDeveloper.org][5]随后上线直到今天。这是在PHP社区里最权威的新闻资源。
这种公社的势头有待校正证明了接下来几年里PHP成长的关键所在且随着网络开发产业的爆发PHP也获得发展。PHP开始占领更多更大的网站。越来越多的用户群在世界范围内形成。邮件列表在线论坛IRC大会交易日记如php[架构]德国PHP杂志国际PHP杂志 -- PHP社区的活力在完成网络工作的方式上有极其重要的影响共同地开放地倡导代码共享。
然后10年前PHP 5发布后不久在网络发展史上一个有趣地事情发生了导致了PHP社区如何构建库和应用的转变Ruby on Rails发布了。
### 框架的异军突起 ###
针对Ruby编程语言的Ruby on Rails在MVC模型-视图-控制架构模型上获得了不断增长的焦点与关注。Mojavi PHP框架几年前已经使用该模型了但是Ruby on Rails的高明之处在于巩固了MVC。框架在PHP社区炸开了并且框架已经改变了开发者构建PHP应用程序的方式。
许多重要的项目和发展已经起势这归功于PHP社区框架的生长。PHP[框架互用性组织][6]成立于2009年致力于在框架间建立编码标准命名约定与最佳操作。编纂这些标准和操作帮助为开发者提供了越来越多的互动性软件使用成员项目的代码。互用性意味着每个框架可以拆分为组块和独立的库可以被一起使用作为整体的框架。互用性带来了另一个重要的里程碑Composer项目于2011年诞生了。
从Node.js的NPM和Ruby的Bundler获得灵感Composer开辟了PHP应用开发的新纪元创造了一次PHP“文艺复兴”。它激起了包标准命名约定编码标准的采用与成长中的覆盖测试间的互用性。它是任何现代PHP应用中的一个基本工具。
### 加速和创新的需要 ###
如今PHP社区有一个生机勃勃应用和库的生态系统一些被广泛安装的PHP应用包括WordPressDrupalJoomla和MediaWiki。这些应用占据了所有规模的商业的网络形式从小型的夫妻店到站点如whitehouse.gov和Wikipeida。Alexa前十的站点中6个使用PHP在一天内服务数十亿的页面。结果PHP应用已成加速需要的首选 -- 并且许多创新也加入到PHP的核心来提升表现。
在2010年Facebook公开了其用作PHP源对源的编译器的HipHop翻译PHP代码为C++代码并且编译为一个单独的可执行二进制应用。Facebook的规模和成长需要从标准互用的PHP代码迁移到更快最佳的可执行的代码。尽管如此Facebook想继续使用PHP由于PHP的易用和快速开发周期。HipHop进化为HHVM一个针对PHP的JITjust-in-time编译基础的执行引擎其包含一个基于PHP的新的语言[Hack][7]。
Facebook的创新和其他的VM项目创建了在引擎水平上的比较引起了关于Zend引擎未来的讨论。Zend引擎依然占据PHP和一种语言表述的问题的核心。在2004年一个语言表述项目被创建“为提供一个完整的简明的语句定义和PHP语言的语义学”使得对编译器项目来说创建共用的PHP实现成为可能。
下一个PHP的主要版本成为了激烈争论的话题一个著名的pgpng项目下一代作为一个能清理重构优化和提升PHP代码基础的选项被提出来这也展示了对真实世界应用的性能的实质上的提升。由于之前未发布的PHP 6.0版本在决定命名下一个主要版本为“PHP 7”后phpng分支被合并了并制定了计划开发PHP 7Hack提供了很多语言中拥有的功能如scalar和返回键入提示。
随着[今天第一版PHP 7 alpha发布][8],标准检测程序显示在许多方面[与HHVM的一样或者更好的性能][9]PHP正与现代网络开发需求保持一致的步伐。同样地PHP-FIG继续创新和推送框架与库用于协作 -- 最近由于[PSR-7][10]的采纳这将会改变PHP项目处理HTTP的方式。用户组会议公众和积极性如[PHPMentoring.org][11]继续在PHP开发者社区提倡最好的操作编码标准和测试
PHP从各个方面见证了网络的成熟而且PHP自己也成熟了。曾经一个单一的低层次的C语言库的API包装PHP以她自己的方式已经成为一个羽翼丰满的编程语言。她的开发者社区是一个充满生气乐于帮助在实用方面以自己为傲并且欢迎新入者的地方。PHP已经经受了20年的考验而且目前在语言与社区里活跃性会保证她将会是一个中肯的有用的的语言在接下来的几年里。
他的SunshinePHP的关键发言中Rasmus Lerdorf回忆到“我曾想过我会在20年之后与我当初做的这个愚蠢的小项目交流吗没有。”
--------------------------------------------------------------------------------
via: http://www.infoworld.com/article/2933858/php/php-at-20-from-pet-project-to-powerhouse.html
作者:[Ben Ramsey][a]
译者:[wi-cuckoo](https://github.com/wi-cuckoo)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.infoworld.com/author/Ben-Ramsey/
[1]:https://www.flickr.com/photos/jurvetson/13049862325
[2]:https://groups.google.com/d/msg/comp.infosystems.www.authoring.cgi/PyJ25gZ6z7A/M9FkTUVDfcwJ
[3]:http://w3techs.com/technologies/overview/programming_language/all
[4]:http://web.archive.org/web/20061215165756/http://chiphpug.php.net/mpug.htm
[5]:http://www.phpdeveloper.org/
[6]:http://www.php-fig.org/
[7]:http://www.infoworld.com/article/2610885/facebook-q-a--hack-brings-static-typing-to-php-world.html
[8]:https://wiki.php.net/todo/php70#timetable
[9]:http://talks.php.net/velocity15
[10]:http://www.php-fig.org/psr/psr-7/
[11]:http://phpmentoring.org/
这里向Lerdorf和PHP社区的其他人致敬感谢他们把这个“愚蠢的小项目”变成了一个如今网络上持久的强大的组块。