Is PHP used for quick and easy website where other languages are used in more complex websites? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
开发者_JS百科 Improve this questionI just put this question in serverfault.com and I know that this question may be rejected in Stackoverflow.
But I thought programmers know better.
This stat shows that PHP is used by 75.2% of all the websites whose server-side programming language.
http://w3techs.com/technologies/overview/programming_language/all
And this page shows that PHP is the least used server-side language in ranked by usage on top websites
http://w3techs.com/technologies/topsite/programming_language
Q1. Does this mean PHP is used for quick and easy website where other languages are used in more complex websites?
Q2. Why PHP is ranked at the bottom? Or why big company tend to use other language than PHP?
Update: I know that facebook and other biggies uses PHP. But it does not tell why there are more other languages are used in top websites.
Not neccessarily there are lots of very complicated websites made with PHP a good example of this is Facebook
Facebook, Wikipedia (MediaWiki), Flickr, Digg are all running on PHP. And they are definitely not quick and easy websites ;) Each one of them has an huge user base and hosts and deals with huge amounts of data.
PHP
- has a very low entry level
- is very fast to learn for no experience programmers
- it is very forgiving with newbie errors
- it has excellent support (including here)
- you don't have to do builds, compiling and other complicated stuff
- it can accomplish almost everything until you hit a wall and you'll need to retool (facebook style)
Q1
First of all this means, that "top sites" dont use, what everybody else use. Small sites tends to use a ready-to-use software, like wordpress, drupal, ..., which runs on nearly every hoster. "top sites" on the other hand can manage theire own server, write theire own software and therefore doesnt depend on existing software.
I would not assume, that these sites are all really more complex.
Q2 Dont know, what you want to know. Its located at the bottom of the list, because 3.2 is smaller than 3.5 ^^
It's not so much a matter of the language itself, otherwise python would score much higher for low-profile web sites, since it's easier to learn and has fewer pitfalls than PHP.
However, PHP is the only language you can really expect on a cheap shared host, and this makes it the only viable choice when you don't get to pick your platform specifics. Consequently, shrink-wrap software targeted at such environments uses PHP. High-profile sites run on their own servers, and the choice of language is determined by other factors: ease of use (a.k.a. developer performance), suitability for the problem domain, suitability for the preferred programming paradigm (procedural, object-oriented, data-centric, functional, etc.), the team's personal preferences and experience, available libraries, runtime performance, existing codebase, existing system components.
No, it can mean that PHP servers are easier to get (from any ISP) as compared to other technologies. For java, you will need to setup Apache Server, Your own Java server (e.g. GlassFish, JBoss, or Tomcat (it's a servlet container)) and that can be costly whereas PHP is readily setup when registering for a DNS.
I wrote a PHP system for a friend of mine (after he bought his Domain Name and a server box) because I felt lazy to setup java.
I don't know if this enlightens your questions.
Much of the answer has to do with several things:
- The evolution of software development inside corporations.
- The evolution of software engineers compared with web developers.
- Perception in general.
Firstly, the evolution of software development inside of corporations. Many years ago there was a strong migration from Cobol and C into (what was then) the latest enterprise stack of Java/J2EE. For many mid to large companies this evolution was a natural transition into the web application architecture. Any "serious" application had to be done in Java/J2EE. Of course many Microsoft based shops went to .NET (either VB or later C# form). These mid to large businesses didn't get much into "light" front end web development especially using PHP since PHP was looked about as a quick way to throw together some logic on a simple website. Since then, of course, PHP has transformed itself into a viable object oriented enterprise language but still to many in the mid to large corporations it is not as viable compared to the enterprise proven architectures of J2EE and .NET.
In the 80's and early 90's much of the people programming were software engineers (graduated with CS degrees) and they mostly migrated to the more "hard-core" languages of C/C++, Java, and eventually C#. These languages were looked upon as serious languages. In the late 90's an influx of web developers came into the picture many of which came from the HTML/design background and they were able to understand programming concepts and pushed more on the scripting languages like PHP. Again originally PHP was used by many of these web developers and was looked upon as an immature language (i.e., not serious).
As for perception, many mid to large businesses won't touch php because of bad security perceptions or not a "serious" language and would only use it for slightly greater than static web sites.
The reality of programming languages today is that it matters much less about the language and more about the developer/engineer and their ability to use the right programming principles and architecture for creating a scalable and well-maintained system. For example I believe rails (ruby on rails) provides a great model for building software which can be followed now in php and several other languages. Many are following suit.
An old photography teacher once told me that he could take any cheap camera and still take a better picture than any of his students regardless of whether or not they had the best camera on the market. I feel the same way about software development. There are many programmers out there (many of which use this site) who can probably create outstanding software (front-end, back-end, whatever) using any number of programming languages including PHP because of their ability to follow the best principles for building software. Programmers tend to use the tool they work best (and most efficiently) with.
PHP is the easiest to deploy because it's almost always already setup on a web server. Other languages never seem to be setup to actually deploy websites on shared hosting or anywhere else... you have to do it yourself or pay someone to specifically allow the language to serve web content. As far as I have experienced this is the sole reason other languages aren't being adopted at a quick rate. Python has a great syntax and it's much more intuitive in a lot of ways compared to PHP but you don't see it ready to deploy a site on hosting plans very often.
if I want my application to install in a lot of server, I use PHP. today, which web host company don't include PHP as they hosting feature?
if I want to quick development application, I use ColdFusion, since this language (to me) is more easy to use and provide most commonly used feature for web application
once again, there are no best language, it's depend on your need
Q1. Does this mean PHP is used for quick and easy website where other languages are used in more complex websites?
A1: Yes it means that PHP is used in quick and easy websites and other languages are used in more complex websites.
Q2. Why PHP is ranked at the bottom? Or why big company tend to use other language than PHP?
A2: Because the guys which prefer other languages to PHP do not think the other way. They do not estimate that
- PHP Hosting and servers are much cheaper to use than other server so that they can use more servers.
- PHP Development is fast so that they can finish faster.
- Good PHP Developer are easy to find so that they have plenty of choice.
- PHP have many open sources projects so that they don't have to reinvent the wheel.
I've done lots of Web sites/apps, both simple & complex & don't know the first thing about PHP (other than how to spell it). Can't say I've missed it, but that's just me.
PHP is excellent for front-end layer, while other languages like Java could be used for the back-end layer of a complex and multi-level application. To do so you can use either SOAP or even better RESTful web services.
精彩评论