If time is back, I will learn Java so

Source: Internet
Author: User
Tags xml parser java se

Look back, I entered the Java field has been nearly 15 years, although learning is general, but share my experience, it is estimated that can help you less to go a little detour.

Entry

I was a C/C + + camp before the 2001, there is a C. and object-oriented foundation, and later went to Java, found that no pointers to Java is really good simple, and Java class Library useful to make people cry ah.

Later I looked at "thinking in Java", "Java Core technology", feel not laborious.

If I have not learned any other language before, or halfway decent to the computer industry, I will not look at the above two, instead I will choose "Head First Java", this book is very suitable for 0 basic small white, read easily funny, don't believe you look at the first page

But the light reading is also quite uninteresting, may as well as the video combination to see, I think that the basic Java Video Podcast podcasts is very good (alas, to preach wisdom to play an advertisement), on-line a search on there, really do not search on my QQ group (group number: 589809992)

Note: The advantage of video is that you can see the process of knocking the code, the code is alive, that's cool. If the video just press PPT programming, decisively throw away.

Books also have the advantages of books, can write a book, it must be the author after a systematic thinking, comb to form something, so systematic comparison strong.

The book also has other advantages, such as can be casually turned, to find the focus of repeated look.

So a mix of reading classic books + excellent videos should be the best way to get started.

Java Introduction, I will not go to the training class, wasted money, self-study is enough.

In the course of self-study if there is a practical experience of the expert guidance, to draw me a road map, pointing out the direction of the climb, where there are traps, which places should not waste time, my self-study can reduce groping, less detours,

Unfortunately, I did not meet, if the time back, I will find a way to guide me.

Practice

A major feature of the software industry is that light does not always learn to do, encoding less than 100,000 lines are embarrassed to go out to greet.

So practice, practice, practice!

During the school period, I will try to find the project as far as possible (see my other article, "Enrich your resume from now", Reply to "resume" to view), did not find, you can first lay the foundation

When I was in college, I used Min's "data structure", and I did all the exercises once, and when I was a senior programmer, I got very good grades.

Then I learned a better algorithm primer book algorithm, if the time can be repeated, I will still be mentioned in this book all the data structure and algorithms are implemented in Java, after-school work also strive to do all over again.

This is a very important training, because I know, really do, will find work as long as it is not the design algorithm, the basic data structure can not baffle me.

"Java SE"

For the Java Collection Framework, not only to learn to use, I will also try to implement again, List, ArrayList, Set, HashSet, Map, HashSet and so on, if you do not know how to write, see the source of the JDK can be, where the best teachers.

To achieve a better understanding of object-oriented design, interface, abstract class, the relationship between specific classes, how to separate responsibilities, will learn to design patterns in the template method, Iterator and so on.

It is worth mentioning is Iterator, is very interesting, I also clearly remember that year oneself realizes the collection frame in the time of Iterator of the excitement mood ah:-)

In the implementation of the Java Collection framework, you can by the way the generics also learned, do not learn, or else will not achieve AH.

In the Java world, everything is an object, and we all know that encapsulation, inheritance, polymorphism, but only to understand these are only into the door, it is impossible to make a real object-oriented program.

There is a classic book "Agile Software Development, principles, patterns, practices", which explains in detail a salary payment case, is by far the best object-oriented design example

I'll use Java to implement it again, to really experience the Ood, to understand how to assign the right responsibilities to the appropriate classes, what is called interface-oriented rather than implementation-oriented programming, what is priority use of the combination rather than inheritance.

For Java threads, the focus is on understanding concepts, because I know that in future work (unless you are doing system-level programming), the chances of writing threads/thread pools are very rare, and are encapsulated by class libraries and frameworks. So the point is to understand,

Read the words of course is "Java Concurrency Programming Combat", a large group of Daniel wrote Ah.

For Java IO, I think the architecture design is very elegant, typical college school, but it is not very practical, open to read a file to be packaged in the decorator mode packaging, too tired.

In the actual project, it is to read a property file, an XML file. I still focus on understanding concepts and design.

But it's nice to write a simple XML parser yourself.

As for AWT, Swing, simple look on the line, I will not go into the study, Java is a typical server-side language, the development of the client program very little, you think, you use SWING/AWT to get a desktop program out, you have to let customers install a JRE to run, is it a bit too much? As far as I know, some of the bank's applications are using swing, AWT. Some people may say that the Applet, which was once popular, has not been used for a long time.

So I'm not wasting my time on swing and AWT.

Java Reflection does not look like a collection frame, thread, oo and so dazzling, but it is a lot of framework (SSH) of the Foundation AH (Reply to "reflection" to see the relevant article), first the basic learning, the following Java EE to use it.

Want to really learn Java, do not know how the Java virtual machine is possible? "In-depth understanding of Java Virtual Machine" must see, read the goal is to write a simple Java anti-compiler.

"Be a literate Java code farmer."

I remember when I was 08, my IBM manager said that design patterns were a must, and that we couldn't do it without understanding design patterns.

So the design pattern is must learn, in fact Java inside uses very much, is simply the design pattern handled, the factory method, the singleton, the template method, the decorator, the responsibility chain all has manifests.

Of course I'll take a look at the easy Head first design, and Eric Gamma, one of the authors of design mode, is highly recommended and must not be missed.

After a few years, my IBM manager said, now that we have the default design pattern, we all have, agile practice is the necessary skills!

So, JUnit I have to be, refactor I have to be, TDD, continuous integration These are the most basic agile practices to know, or they will be despised.

As a pursuit of Java code, I write code to follow the Java coding specifications, such as the first letter of the class name uppercase, registration to lowercase, method name to the first letter lowercase ... Wait a minute.

As a code freak, I can't stand dirty code, I'll constantly polish my code until it's like a handicraft.

Java best practices "effective Java" How can you miss? It's full of the best use of Java programming that the JDK's authors have summed up.

But the translation is really not a drop, many sentences have to be carefully pondered to know what the meaning, so I intend to record a series of videos to explain, please look forward to.

"Java EE"

Go so far, finally came to Java EE, Java is not to write server-side Web application?

I will write my own web application, consider the above mentioned classic salary payment case to the Web version, with the most basic technology servlet/jsp/jdbc.

Then study struts and write a simple MVC framework that is used in your own Web application, which is called eating your own dog food.

Then study Hibenete, write a simple or mapping frame, and eat your own dog food.

Then read the classic book "The Development without EJB", right, is the spring author Rod Johnson wrote, it overturned everyone's understanding of the heavyweight EJB, opened a new era.

With this book, I write a simplified dependency injection is not difficult, after writing or in their own web application, the last time to eat their own dog food.

When you do, you'll know that all of this depends on Java Reflection.

Go back, it should be to find the real project to do, or to find an internship, that is another topic, and then chat.

"Read Code"

300 of the Tang poems, not poetry will be yin

Imitation is the best learning! Take a look at how Daniel's code is written, imperceptibly, and his martial arts can be improved.

If I have a good teacher around me, follow him, watch him programming, improve how fast ah.

While learning Java SE and Java EE, I will read the source code:

Java Collection Source code in JDK: The ancestor's thing absolutely classic

JUnit Source code: See how Eric Gamma and Kent Beck create systems through patterns (reply to "JUnit" view)

Springside: The spring framework-centric, pragmatic-style Java EE Application Reference example is the mainstream technology selection in Java EE World, a summary and demonstration of best practices.

Developed by the Chinese, strongly recommended.

In addition, I will study the famous Jive Forum at the beginning of this century, although very old, although the source school is full, but it is a design model of the base, are living examples of application

Inside there is a proxy mode to achieve permissions control, let me remember.

In addition, if there is a force, interested, of course, can read struts, Spring, hibernate source code, and even participate in the development.

How to learn Java, this is how I feel for so many years, but also just my family talk. Welcome to communicate with me.

Learning programming is never an easy thing to do, it is impossible to look at a video, to read a book, to learn a lot of programming and practice. Programming is a very hard mental and manual work, but the joy of creation is unparalleled. I hope everyone can enjoy the process and have fun.

My Java Learning Communication QQ Group: 589809992 prohibit small talk, non-happy do not enter!

If time is back, I will learn Java so

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.