Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Several transition points from PHP to Java

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "several transition points from PHP to Java". In daily operation, I believe many people have doubts about several transition points from PHP to Java. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "several transformation points from PHP to Java". Next, please follow the editor to study!

Several transition points from PHP to Java:

Strongly typed: from weakly typed to strongly typed language, the transition is accidentally very natural, probably because I wrote some Go and C before, it is not unsuitable to use strongly typed language, but because of the powerful code hint function of IDE, the code is less prone to errors and the coding is smoother.

Annotations (reflection): annotations in Java are very complicated, including classes, methods, and variables. Not only are there many annotations in the basic class library and Spring framework, but you can also define new annotations yourself. At first, when I saw a full screen of @ symbols, many functions were inexplicably realized, some of them were big, and then I slowly found that there were only a few commonly used ones. After learning the usage and understanding of the lower reflection, it became clear.

Class library: the class library of Java is very complete, and basically all the functions we need are provided by someone. For example, only related to Json, more than 2000 results can be found in the maven warehouse.

There are more class libraries, it is easier to look confused at the beginning, there are many kinds of ways to connect to the database for a query, there are many ways to create a thread, and each Java version will add some syntax sugar. Any method can be used, and without an authoritative instruction, it is very difficult for people to decide.

Deployment: the deployment of the project is the most difficult for me to adapt to. Small changes need to pack all the code into jar/war packages and easily upload tens of megabytes to the remote server for testing. If there is a mistake, I need to do it again, which is very painful. And the deployment framework has maven/gradle, what packages to use, what each package needs to pay attention to, but also learn to adapt.

Ecology: I think one of the great advantages of Java is ecology, of course, the cost of adaptation is also high. There are various frameworks and components to learn, such as web framework spring series, database framework mybatis, log framework log4j2, test framework spock,JVM language groovy and so on. Each kind of learning takes a lot of time.

At this point, the study of "several transition points from PHP to Java" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report