Home  >  Article  >  Backend Development  >  Should I study PHP or Java for junior college?

Should I study PHP or Java for junior college?

王林
王林Original
2019-09-06 16:36:302429browse

Should I study PHP or Java for junior college?

For beginners, it is recommended that you learn PHP first. This does not mean that PHP is better than Java, or that Java is not as good as PHP. Objectively speaking, the existence of every programming language has its meaning, and at the same time, every programming language has its advantages and disadvantages, and is suitable for its own field. So why is it recommended for beginners to learn php instead of java?

PHP is very specific, a server-side scripting language for creating dynamic web pages.

As a language specifically designed for the Web, PHP brings many features that business organizations crave.

·Short learning cycle, relatively simple

·Fast development time

·Very high performance

This is of great significance for companies that lack skilled programmers and are very pressed for time.

Cross-platform is very good

PHP can run on all major operating platforms (UNIX, Windows, and even mainframes), and is born to support a variety of Popular database. This determines that it is an ideal choice for web development: some online stores that used PHP technology said that they only need to hire amateur programmers and can develop reusable code within a few days. Programmers who are familiar with languages ​​such as C, C, or Java often find that they can program PHP within a few hours. , as you can imagine, it is very easy to switch careers to PHP.

"PHP is built on the real needs of web developers....Unlike other clunky, high-load methods, PHP is very lightweight and tailor-made for web development. It can be compared to Other similar technologies solve complex problems faster and easier."

Java, as a new programming language, was originally used to run client applications embedded in browsers. In the past few years, the problems exposed by "applets" have forced Sun and other Java developers to find new ways for the language. The most prominent of these is server-side programming, which allows Web sites to connect to databases and generate other server-side applications, known as "servlets."

SUN finally launched Java Server Pages (JSP) as a means of writing servlets. Like PHP, JSP is highly portable across different platforms (although PHP supports any 32-bit and above platforms, JSP can only run on platforms with a Java Virtual Machine installed). However, a newbie with no programming background will find that programming with servlets is extremely difficult due to the complexity of the language and the complex way in which JSP systems are designed.

The performance of JSP also leaves much to be desired: A recent survey by ZDnet's online publication eWeek found that PHP runs 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 handle very few transactions per second and the response speed is quite slow.

PHP and Java work together

It is important to realize that JSP is just a language that can access Java objects. PHP can also integrate Java, which means that, like JSP, PHP can become a scripting language that can call Java logic. But 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's expansion capabilities are endless. JSP, on the other hand, is completely dependent on Java.

IBM programmer Sam Ruby uses PHP and Java together. Through PHP's good support for Java, Java objects can be created and used transparently like regular PHP objects.

AutionWatch allows business groups of all sizes to benefit from its dynamic bidding environment. It has more than 2.6 million visitors per month; has more than 300,000 registered users; and conducts 1.2 million auctions every month. They tried using Java, but chose PHP because it was easier to use and faster to develop.

PHP: Always moving forward

JSP has Sun as its backing, so it continues to gain media attention. But what's interesting is that despite no publicity campaign, PHP's popularity is still growing at a rate of 8-11%, which is much greater than the 4% monthly growth rate of server-side applications. Six and a half million sites use PHP. PHP is configured on 39% of Apache servers; while Perl accounts for 11% of the market share, ranking fourth. Apache maintains 59% of the Web server market share; Microsoft is second with only 28%.

Famous companies using PHP include: Unilever, Philips, NTT, Cisco, Japan Airlines, Air Canada, Lufthansa, GE Marketplace, Wallstreet:Online Germany, AuctionWatch, VillageVoic, Dialpad and BMC, etc., the world More than 20 of the top 40 websites are developed using PHP language.

Finally, any language has its own field. For beginners, you should keep in mind that all programming languages ​​are easy to get started and difficult to master. Therefore, don’t look at the language itself. But it depends on which field you want to show your talents in, and then make a judgment later.

Recommended video tutorial: PHP video tutorial

The above is the detailed content of Should I study PHP or Java for junior college?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn