Java programmer's Advanced Path-developed by senior java programmers and java programmers

Source: Internet
Author: User

Java programmer's Advanced Path-developed by senior java programmers and java programmers

1. Introduction

Java developers certainly want to reach a higher level, use less code to solve more problems, and use a clearer structure to prepare for possible inheritance and maintenance. Think about the learning routes that many people have introduced when they have crossed the river by feeling the stones. It is still a little rewarding over the past decade. I have summarized an article through my own experiences for your reference.

2. Make good use of the Framework in use

In the teams that you have joined, work with everyone to use the framework selected by the team. No matter whether the framework is good or bad or not, there must be some reason to choose it. In addition, the framework that is widely used in the industry must have its advantages.

The first step in using the framework is familiarity. You may copy and modify previous code to implement new functions or modify existing functions, and gradually become familiar with the use of the framework.

The second step is to gain an in-depth understanding. After using and using multiple features, you can grasp the rules based on usage and phenomena, so as to generate guesses about the internal structure and operation mechanism of the Framework. Most of them are correct.

The third step is to make good use of the framework. After having some feelings about the internal mechanism of the framework, we will gradually summarize and adopt better practices to adopt a more concise, clear, or efficient method for the same purpose. You can refer to the "best practices" Document of the framework (for example, the last chapter of the Hibernate reference manual). You can summarize some experiences and improve them if you do not provide the "best practices" document.

There are no absolute best practices, only the best practices suitable for a specific scenario, and good implementations suitable for most occasions. The ability to select different modes based on the scenario is a sign of horizontal improvement.

3. Understand standard libraries, enterprise-level technologies, and open-source projects

The existing Java industry has accumulated a wealth of resources. When a problem occurs and you feel that it is a common problem, it is very likely that there are already ready-made standard class libraries or open-source projects. Mastering the standard library and open-source projects can reduce the workload and make the code structure clear and easy to understand. Enterprise-level technology refers to the technology in the JavaEE platform. Most of them are standards extracted from existing accumulation. For example, JPA is largely from Hibernate. The use of enterprise-level technologies is very beneficial to program standardization.

The knowledge of standard libraries and open-source projects is different in sequence and can be performed in different ways. If you use them, you can see which one you want to learn. You can also use your spare time to pick your favorite learning and experiment.

3.1. Standard Library

You can see the list of standard class libraries (as well as platform tools) and their relationships from the documentation that comes with Java. The following figure shows the hierarchical relationship diagram:

To learn more about the points you are interested in.

At first glance, there are a lot of content, but many may already be used. For example, JDBC should have been used by every Java programmer when he was not familiar with the world. JNDI should also be a must for WEB engineering. It may be just a few of the APIS, but there are three steps: Understanding, mastering, and mastering.

Rule expressions, XML processing, applet, concurrency (multithreading), network, IO, and graphics are more practical functions. You can start with them first. Local interfaces (JNI), Management Extensions (JMX), reflection, and so on can be used in more advanced scenarios. After that, you can provide solutions for more scenarios.

3.2. Enterprises and technologies

Including JavaMail, JMS, EJB, JPA, JSF, and web service. You can find the list on the JavaEE official website. These technologies are not esoteric to use, and are even more simple than standard libraries.

3.3. Open-Source Projects

The frameworks are generally open-source projects. Currently, the most open-source projects are organized by Apache. You can learn about open-source projects as needed. For example, if you need to process Excel documents, you can learn to use POI. If you want to use web services, you can see CXF. If you need to process strings, you can see if there is any implementation in Commons Lang; i/O operations are required to check whether Commons IO is implemented.

In addition to Apache, there are many open-source organizations such as eclipse, springsource, and Jboss that offer a lot of free and good goods. It is an advanced way to learn about it if you have time. "A gentleman is not a different person, and good or false is also a thing."-a powerful guy may not write anything on his own, but may often use various artifacts in combination.

By the way, many open-source projects use rare English words or self-built words as their names. It is best to go to the official website to determine their pronunciation. Many people read Struts (original intention: Shake the big swing) into Structs, obviously confused with struct (structure), it sounds really amateur. PostgreSQL should also be read as PostgreSQL-QL rather than postgre-SQL. Please respect the author's original intention. Debian should read it as "Dai Boian", which is a combination of the names of the authors and couples. It is too sorry to read it as "stool. Also, do not read the "optimize pattern" In Ubuntu.

4. Write the program better

4.1. Neat and elegant code format

Follow the code format suggestions on the official website to make full use of the automatic Formatting Function of the development tool (Eclipse.

Complex Conditions and nested loops are extracted as methods to make the method name meaningful. Try to make future generations look at the program as if they were looking at straightforward English sentences. Pursue code self-annotation. Note that do not use Pinyin as much as possible, especially the interface for interaction between modules (it is better to use a small scope within the Module). The mixed use of English words and Pinyin will make future generations faint. Nowadays, electronic dictionaries are widely used and easy to use. They allow you to recognize several words while the code is elegant.

4.2. Code content Efficiency

After using a lot of frameworks and open-source projects and writing a lot of programs, you can start to consider and practice the content in objective Java and how to use appropriate technologies and mechanisms.

5. Understand the model through standard libraries, enterprise-level technologies, and open-source projects

When talking about the mode, you may first think of the "design mode". Many beginners read the "design mode" book for improvement. However, according to my experience, I didn't understand it at the time, I don't know why those models exist or when they can be used. In fact, the so-called "pattern" is just a habit of our predecessors and is widely used and widely used by future generations. All the code copied by the predecessors will be used after modification. Such code can be said to be implemented in a certain "mode.

With the use of standard libraries, enterprise-level technologies, and some open-source projects, the model will be built in mind. These class libraries, technologies, and projects are implemented in many modes, and their usage is also a pattern. However, the latter is often referred to as practice, but is not used as a "pattern" in publications.

In addition to design patterns, enterprise application architecture patterns and J2EE Core patterns, there may be more patterns. Standard libraries and open-source projects (including many popular frameworks) have made outstanding use of them for design flexibility, convenience, and elegance.

Spring is the implementation of the factory model. JDBC and JMS are the implementation of the abstract factory method mode.

In addition to the well-known MVC, Struts also implements several core J2EE models.

Hibernate uses the Proxy mode internally, and its overall existence is the implementation of "table data entry" in "enterprise application architecture mode. The CMB in the old EJB2.0 is more like the implementation of "row data entry.

These models can be learned directly as concepts. Without practical experience, they will be used just as I did not know why they existed or how to use them.

When there are more ready-made products, you will feel it. Feel the convenience they bring, and compare their functions with each other to see the existence of various models and their advantages.

6. understand the true meaning of object-oriented

Once we understand the patterns, we will find that the foundation for implementing these patterns is the encapsulation and polymorphism features provided by object-oriented, which is also the significance of the emergence of object-oriented.

Eight object-oriented principles are introduced in Agile Software Development-principles, models, and practices. Among them, I value the single responsibility principle most. This principle is very helpful in module division, its idea can even be extended to the Construction of organizational structures.

7. Outlook-Architect

With the above steps, you can be a qualified designer. To be an architect, a trainer once told us: "Learn Linux kernel ."

The major step is to view the structure of version 0.01, view the progress of version 0.10, see version 0.12 to understand its perfection, and view the latest version to understand its status quo.

The learning method is to use the UML tool to reverse engineer the downloaded Linux kernel source file. From the obtained class diagram, we can see the module dependency. The module with the highest degree of output is the core of the system, from this module, we can see how it Schedules other modules and how each module implements its own functions.

8. Conclusion

These steps do not have strict boundaries and can be carried out in an interspersed and iterative manner.

Learning is a process of first-mover convergence. In the beginning, it seems to face a sector. The more you go out, the more you will not find. The more you need to learn. But later, we will find that there are many things that we have learned. New things can be quickly understood, and even some things are just new bottles and old wines.

"The wise man observes the same thing, while the wise man sees different things and finds the world hard to grasp. The wise man is good at seeing things in common (laws) to get twice the result with half the effort. Since programmers have done it, don't be foolish.

A programmer learning platform is shared with you, allowing you to learn how it works in practice. The main direction is JAVA engineers. If you want to earn a high salary, break through the bottleneck, or compete with others to gain an advantage, but want to enter BAT, but you are worried that the interview will fail,I can add my Java learning exchange group: 669823128.

Related Article

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.