Java Programmer Advanced Route-Senior Java programmer form

Source: Internet
Author: User

1. Introduction

The brothers in Java must all want to reach a higher level, solve more problems with less code, and prepare for possible inheritance and maintenance with a clearer structure. Think of the original stones, also saw a lot of people introduced learning route, more than 10 years to come how much or some harvest. Now through their own experience to summarize an article for the Brethren Reference.

2. Use a well-used framework

In teams that have joined, collaborate with others to use the framework that the team has chosen. Whether the frame merits or not, the characteristics of how to choose it must have certain truth. And the framework that can be popular in the industry must have its merit.

The first step in using the framework is to familiarize yourself with the use of the framework by copying and modifying previous code to implement new functionality or modify existing functionality.

The second step is to thoroughly understand, will use, after the use, according to the usage and the phenomenon grasps its law, thus forms to the frame internal structure and the operation mechanism speculation, most certainly is right.

The third step is to use good, after the framework of internal mechanisms have a certain feeling, and gradually summarize and adopt better practices, to achieve the same purpose to adopt a more concise and clear or more efficient method. You can refer to the framework's "best Practices" documentation (for example, the last chapter of the Hibernate reference manual), and you can summarize some of your own experiences without providing "best practices" documentation and keep improving.

There is no absolute best practice, only best practices for a given scenario, and a better implementation for most situations. The ability to select different patterns according to the scene is a sign of the level improvement.

3. Learn about Standard class libraries, enterprise-class technologies, and open source projects

The existing accumulation of Java is already rich, and when it comes to a problem that it is a common problem, there is a good chance that there is already a standard class library or open source project ready. Mastering standard class libraries and open source projects can reduce workload and make the code structure clear and easy to understand. Enterprise-class technology refers to the technology in the Java EE platform, which is mostly derived from the existing accumulation of standards, such as JPA to a large extent from hibernate. The application of enterprise-class technology is of great benefit to the standardization of programs.

The standard class library and open source project understanding is not in order, can be cross-cutting, which is used to see what to learn. You can also use your spare time to pick your favorite learning and do experiments.

3.1. Standard Class Library

The list of standard class libraries (and platform tools) and their interrelationships can be seen from the documentation that comes with Java. The following diagram is a hierarchical diagram:

Learn more about the points you are interested in.

At first glance there are a lot of content, but in fact there may already be many that have already been used. JDBC, for example, should have been used by every Java programmer in ears. Jndi should also be something that Web engineering must touch. Maybe just a few of these APIs, but what is understanding, proficiency, mastery of these three steps, understand, the back is not far.

The regular expressions, XML processing, applets, concurrency (multithreading), network, IO, graphics are more practical functions, you can start with them. Local interface (JNI), Management Extensions (JMX), reflection, etc. can be used in more advanced situations, and later can provide a solution for more scenarios.

3.2. Enterprise and Technology

Including JavaMail, JMS, EJB, JPA, JSF, Web service, etc., the specific list can be found on the Java EE Technology website. These technologies are not esoteric and even more superficial than standard libraries.

3.3. Open Source Project

The framework is generally open source projects, and currently has the most open source projects than the organization of Apache. You can learn the open source project through the need, such as the need to work with Excel documents, then to learn to use the POI, to use the Web service to see CXF, the need for string processing to see Commons Lang is not implemented, need IO operation to see Commons IO is not implemented.

In addition to Apache, there are many open source agencies such as Eclipse, SpringSource and JBoss that offer a lot of free goods, and have time to get to know the good way to go. "The gentleman sex is not dissimilar also, good false in the matter also"--the formidable fellow is not necessarily what will write himself, but often will combine the use of various artifacts.

By the way, many open source projects use relatively rare English words or self-made words as the name, it is best to go to the official website to determine its pronunciation. A lot of people. Struts (Intent: swagger) read into the structs, obviously confused with the struct (structure), sounds really amateur. And PostgreSQL should be read as POSTGRES-QL, not postgre-sql, please respect the author's original intent. Debian should be read as "Daiboyn", is the name of the author and wife of the combination, read as "stool" is too sorry to others. Ubuntu also does not read "excellent map".

4. Write the program better

4.1. Code format neat and elegant

Use the automatic formatting capabilities of the development tools (Eclipse) as much as possible, following the code format recommendations on the official web.

Complex conditions, loops nested refinement as a method, the method name plays a meaningful role, as far as possible to let posterity see the program is like a straightforward English sentence. Pursue code self-comments. Should be careful to use the words do not use pinyin, especially the interface between the module interaction (the module inside a small range of use is also better), the mixed use of English words and pinyin will make posterity unconscious. Today's electronic dictionaries are so versatile and easy to use that they can be used to make the code elegant and to recognize several more words at the same time.

4.2. Efficient Code Content

After using many frameworks and open source projects and writing a lot of your own programs, you can start thinking about what to do in effective Java, and when and how to use the right technologies and mechanisms.

5. Understanding patterns through standard class libraries, enterprise-level technologies, and open source projects

When it comes to the pattern, the first thought may be "design pattern", there are a lot of beginners to progress also saw "design mode" this book, but according to my experience, at that time do not understand, do not know why those patterns exist, do not know when to use them. In fact, the so-called "pattern" is the customary usage of predecessors, which are thought to be useful and widely circulated. All of the previous code copied to change the use of, such code can actually be said to be some kind of "mode" implementation.

With the use of standard libraries, enterprise-class technology and some open source projects, the sense of the pattern will be built in the mind. These class libraries, technologies, projects themselves implement many patterns, and their use is also a pattern. But the latter is often referred to as the actual combat, and not as a "pattern" appears in the publication.

"Mode" In addition to the "Design Model" includes "Enterprise Application Architecture Model", "Java EE core model", there may be more. Standard class libraries and open source projects (including many popular frameworks) have been used for their design flexibility, convenience and elegance.

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

Struts, in addition to the well-known MVC, actually implements several of the core patterns of the Java EE.

Hibernate uses proxy mode internally, and its overall existence is the implementation of "Table data entry" In the Enterprise Application architecture model. The CMB in the old EJB2.0 is more like a "Row data entry" implementation.

These patterns are taught directly as concepts, without practical experience, as I did not know why they exist or how to use them.

Ready-made products have a lot to feel. Feel the convenience they bring, and compare them to each other in a similar way, and you can see the existence of various patterns and their excellence.

6. Understanding the true meaning of object-oriented

Understanding the pattern, we will find that the basis of implementing these patterns is the object-oriented encapsulation, polymorphism of these characteristics, which is the meaning of object-oriented appearance.

Object-oriented eight principles in the "Agile software Development-principles, patterns and practices", which I most value the "single responsibility" principle, this principle in the module division is very helpful, and its ideas can even extend to the construction of the organizational structure.

7. Outlook-Architect

With these steps, it should be possible to be a qualified designer. To be an architect, a trainer once told us: "Learn the Linux kernel. ”

The big step is: Look at version 0.01 to understand its structure, see version 0.10 to understand its progress, see the 0.12 version to understand its perfection, see the latest version to understand its current situation.

The learning method is to use UML tools, the download of the Linux kernel source files reverse engineering, from the resulting class diagram can be seen in the module dependencies, the largest module is the core of the system, from this module to see how it dispatches other modules, and then to see how each module to achieve their own functions.

8. Conclusion

These steps do not have strict boundaries, can be interspersed, iterative.

Learning is a process of first divergence and then convergence. It starts to look like a fan, and the more you walk out, the more you need to learn more. But then you will find that there are many things in common, the new look can be quickly understood, and even can find that some things are just new bottles of old wine, look at the two eyes will be.

"The Fool is different, the wise see the same", The Fool sees the thing each has the difference to feel the world is difficult to grasp, but the wise man is good at seeing the thing Common Ground (law) to make the multiplier. Since the programmer can do it, don't be a fool.

A programmer learning platform to share with you, so that you accumulate experience in the practice of mastering the principle. The main direction is the Java engineer. If you want to get a high salary, want to break through the bottleneck, want to compete with others can gain advantage, want to get into bat but have worried about interview, can add my Java Learning Exchange Group: 669823128 .

Java Programmer Advanced Route-Senior Java programmer form

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.