What are the advantages of php and java?

Source: Internet
Author: User
PHP is a dedicated script language used to create dynamic web pages. As a language specifically designed for the Web, PHP brings many features that business organizations desire.

PHP is a dedicated script language used to create dynamic web pages. As a language specifically designed for the Web, PHP brings many features that business organizations desire.

· Short learning cycle, relatively simple
· Rapid development time
· Very high performance

This is of great significance for companies that lack skilled programmers and are time-and urgent. Good cross-platform performance. PHP can run on all major operating platforms (UNIX, Windows, and even mainframe) and is born to support a variety of popular databases. This makes it an ideal choice for Web Development: online stores that once used PHP technology say they only need to hire amateur programmers, reusable code can be developed within a few days. Programmers familiar with languages such as C, C ++, and Java always find that they can program PHP in just a few hours. It's easy to switch to php.
 
"PHP is built on the actual needs of Web developers... unlike other heavy and high-load methods, PHP is very lightweight and customized for Web development. It can solve complex problems faster than other similar technologies ."

Java, as a new programming language, was initially used to run client applications embedded in a browser. In the past few years, the problems exposed by "applet" have forced SUN and other Java developers to find a new way out for the language. The most prominent one is server-side programming, which allows the Web site to connect to the database and generate other server-side applications, that is, "servlets ". SUN finally launched the Java Server Pages (JSP) as a means to write servlets. Like PHP, JSP is highly portable across different platforms (although PHP supports any 32-bit and 32-bit platforms, JSP can only run on platforms where Java virtual machines are installed ). Then, a newbie without a programming background will find that using servlets programming is extremely difficult because of the complexity of the language and the complicated design method of the JSP system.

The performance of JSP also has many areas to be improved: A recent survey by the online publication eWeek of ZDnet found that PHP is running almost 3.7 times faster than JSP. It can be said that JSP is a very poor solution in the Web environment, because it can only process a small number of transactions per second, and the response speed is quite slow.

ZDnet's eWeek Magazine also mentions:
"JSP is a relatively new technology. from the perspective of development tools, resources, and talents, it has not yet achieved a complete market maturity ."...... Since JSP is based on Java, and Java is a strongly typed language, we have to declare the type of the variable and manually convert the type as needed. This makes JSP the most difficult scripting language for amateur programmers.

Collaboration between PHP and Java

JSP is just a language that can access Java objects. it is important to recognize this. PHP can also integrate Java, which means that PHP can become a scripting language that can call Java logic like JSP. However, unlike JSP, PHP can also call other component models, such as Microsoft's COM, and it is extremely easy to add support for new object models. It can be seen that PHP has infinite scalability. On the other hand, JSP relies entirely on Java.

IBM programmer Sam Ruby uses PHP and Java together. With PHP's good support for Java, Java objects are transparently created and used just like common PHP Objects.

The AutionWatch website allows business groups of all sizes to benefit from their dynamic bidding environment. It has more than 2.6 million visitors each month, more than 0.3 million registered users, and 1.2 million auctions each month. They tried to use Java but chose PHP because it is easier to use and faster to develop.

Programming consultant Reuven Lerner has made comparisons between various languages. His comment on PHP:
"This is a language that is easy to learn. Artists and Web designers may say they are not programmers, but in fact they are increasingly using JavaScript, VBScript, and some other simple programming languages in large projects. Compared with Perl, PHP is more formal and clear; for a novice, PHP is easier to master than Java. Indeed, PHP is a bit like JavaScript (if there is a server version ). Anyone, regardless of programming experience, can learn and use PHP in a short time. This may be done in VBScript, But Perl and Java certainly won't work... PHP is definitely an extraordinary and powerful system. It's almost impossible to become a popular language for creating Web sites ..... I think PHP will be a strong competitor of Java and JSP, and I will strongly recommend PHP in some clients and internal projects."

PHP: keep moving forward

JSP is backed by Sun, so it keeps gaining media attention. But interestingly, despite no publicity campaign, PHP's popularity continues to grow at an 8-11% rate, far exceeding the monthly growth rate of 4% for server applications. There are 6.5 million sites using PHP. PHP is configured on 39% of Apache servers, and Perl accounts for 11% of the market share, ranking fourth. Apache maintains a market share of 59% of Web servers, followed by Microsoft, with only 28%.

Famous companies using PHP include Unilever, Philips, NTT, Cisco, Japan Airlines, Air Canada, Lufthansa, GE Marketplace, Wallstreet: Online Germany, AuctionWatch, languagevoic, Dialpad, and BMC, and so on. more than 20 of the world's top 40 websites are developed in php.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.