PHP.vs.JAVA_php Digest

Source: Internet
Author: User
Tags php software java web

OA now on the market basically boils down to two camps, the PHP camp and the Java camp. But to contact the user of Oa soon, see often only their table phase, only obvious price difference, but it is difficult to see the actual difference between them. In fact, PHP + MySQL is not worth the money is not limited to OA software, but the overall PHP + MySQL development software is not as valuable as Java software development. Why PHP + MYSQL OA is not worth it? The first thing to understand is the difference between PHP and Java.

  1, the system's technical framework comparison

Layering is the way to organize the system effectively, and the thought of divide and conquer is very important in the computer field. Under the guidance of good layered thinking, we can realize "high cohesion, low coupling", and can separate the specific problems, easy to control, easy to extend, easy to allocate resources. PHP can only achieve a simple distributed two-tier or three-tier architecture, and Java is very powerful in this area, it is possible to achieve a multi-tiered network architecture. The design pattern of MVC can make OA system have more efficient and reasonable system structure. The backwardness of the technical framework, so that the use of PHP to write the OA software system is congenitally deficient, the latter can not make up for its congenital disadvantage. The gap between the OA software system written by Java and the development of the system in the scalability and demand is more and more big. The structure of the gap, doomed to PHP do OA is at best a xiaojiabiyu, always can not and Java this kind of ladylike with Taiwan athletics.

 2. Database Access Comparison

PHP can be compiled into functions that have connections to many databases. Write your own peripheral functions to indirectly access the database. This way you can easily modify the encoding to accommodate this change when you replace the database you are using. However, the database interfaces provided by PHP support each other, such as Oracle, Mysql,sybase interface, different from each other. Because PHP uses different database access interfaces for different databases, the universality of database access code is not strong.

and Java through JDBC to access the database, through the different database manufacturers provide a convenient database driver access to the database, access to the database interface is more uniform. If the same is the development of the Web application from the MySQL data to Oracle data, PHP needs to do a lot of modification work, and more cumbersome. Java development, however, requires little change to be achieved.

Database access to different ways, and laid the PHP developed by the OA and Java developed OA is the coach and train Gap, the former can only follow and limited, the latter is the crystallization of industrialization, not only can contain all things and speed of steady ascension.

  3. Security comparison

PHP has lost a lot of advantages in the face of open source and Cross-platform java. Especially in the security of your code. PHP's development program can be easily modified when someone else gets the code. and Java Development program because can not see the complete source code, only to see some compiled class files, so security is higher. In addition to the advantages of system architecture, PHP and Java are far from safe in security.

If you want to make PHP and Java in security comparison, the same thief to patronize PHP that is casually take to change, want to take what to take, take the happy also can a large amount of a FAI So-and-so to this trip. While patronizing the Java, they will find the police guard, equipped with automatic alarm device, even if the breakthrough after a lot of obstruction into the bedroom. The valuables are placed in the encrypted safe, only exclaiming, drubbing and return.

4. Forward-looking and development-oriented

Overall, PHP applies to small and medium systems, while Java applies to large systems. PHP can do a single event well, but it is not suitable for the completion of multiple concurrent events with high integration. Why is it that PHP is suitable for small and medium sized systems and not for bigger systems?

First, PHP lacks multi-tier structure support. But for the large-scale system load site, can only use the distribution calculation. The database, the application logic layer and the presentation logic layer are separated from each other, and the same layer is separated according to the traffic, and the two-dimensional array is composed. and PHP lacks that support.

Second, the database interface provided by PHP is not uniform, it takes a lot of effort to unify the data of different databases. Java, however, does not have this flaw, with the Java class and EJB in the Sun Java to obtain scale support, through Ejb/corba and numerous vendors of application server to obtain structural support. such as IBM's e-business, its core is to adopt Jsp/servlet Web Sphere, is through the CGI to provide support.

If you compare PHP to Generalship, you have the ability to stand alone. Then Java is Cai, with good foresight and expansion, overall layout and strong synergy. Can command the army, the last Zhuluzhongyuan.

5, the development cost comparison

Since PHP in many ways is not as good as Java, then PHP developed the OA products and Java products to compete with it? The PHP camp is generally a low-end route, while the Java camp is a high-end route. The area between the two crosses is small.

The price of software is largely tied to its cost and function. PHP's entry threshold is low, most of the programmers who have studied C are easily transformed into PHP programmers, which makes the PHP programmers overrun, and low-cost PHP software products are emerging. PHP's most classic combination of PHP + MySQL + Apache as an example, because all software is open source for free, so the investment is not high.

Java developers need a specific environment to grow into a qualified Java programmer for a certain amount of time, Java programmer Cost is also several times the cost of PHP. Java Web application Server for free tomcat, JBoss, etc., and to have a good commercial services will have to choose the web sphere and Web logic. The cost of this is virtually more than the PHP cost of the N-fold. Therefore, the cost of Java development OA is much higher than PHP developed similar software products. But also because of the high cost of Java development, it is difficult to achieve the possibility of plagiarism and short-term, but also make Java with the development of the product threshold higher.

Not afraid of not discerning, is afraid of goods than goods. PHP developed products can also be used, but with Java out of the same products are not comparable. Because the overall performance of PHP development and Java development is far from, so PHP use Low-cost low-cost Advantage and similar Java products to fight, the price gap to balance the mentality of the buyer. So, PHP + MYSQL OA is not worth the money is not surprising

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.