Why does our team use the PHP and Java mashup architecture

Source: Internet
Author: User
Tags sql injection

Just start to contact the architecture if there are incorrect welcome treatise ~

Implement PHP Java middleware resteasy concretely

Describe

This kind of architecture uses PHP to do the front-end and simple logic operation, and database operation directly to Java to do. And Resteasy as a middleware, combining PHP with Java.

Java and PHP features

PHP and Java, this and both of the open source community are very active, with a huge biosphere, in the face of the problem can come up with a quick solution, PHP is not the use of Java, and Java has a jar this magical things, the operation of other components is not more convenient.

PHP is flexible, quick to start, easy to modify, quick to publish, the disadvantage is easy to make mistakes (common such as spelling errors, SQL injection, upload execution, etc.), execution efficiency is not high, lack of global caching.

For Java, the advantage of Java is stable and reliable, high efficiency (especially after the emergence of the JIT gap is greater), not easy to make mistakes (strong type, precompiled, must intercept exceptions, etc.), the disadvantage is that the development and release of relatively low efficiency.

Why does the team use this blending method

Building a team requires a large set of management systems for storing data, requirements system high availability, the time is very short, and later will continue to the system to add and modify the function, which directly does not consider using Java to write, the initial stage to consider using PHP to do this system, the general well-known PHP development cycle is relatively short, But considering that there are too many components in the system, PHP can't find a good solution. Also considering that the development time is not too much, PHP and Java can not meet our needs at the same time (the team backend only PHP and Java), so we use the PHP and Java mashup Scheme.

There are so many benefits behind. Simple to say: PHP to do the front-end release quickly, do not need to modify the code like Java to restart the Tomcat, it is not too slow ~ the jar in Java offers a number of component solutions that are rarely available on the web, and some are unworkable. ~ ~ Java only do data and component operations, PHP did the vast majority of things, and the view layer and controller layer modified frequently, so that the development efficiency greatly improve Java to do the cache do not have to say it ~ ~

Summarize

PHP development Fast, and Java stability has more solutions, but for future maintenance, as far as possible not in Java to write extra code, so that only modify the PHP side of the code can solve the problem. ——

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.