9 to beginners: ending

Source: Internet
Author: User
Tags jboss
9 to beginners: ending

The last article introduces several common concepts.

Design Mode
This is not only unique to Java
The books I read are c ++ and smalltalk examples.
First, let's talk about the design model.
What is the mode? Pattern is a summary of experience and abstraction of potential rules
What does it mean? For example, we need to take several steps before boarding the plane.
What kind of procedures can this process be changed for security checks to receive boarding passes?
Yes, but why is this process used by airlines around the world before boarding?
Because airlines have come to a bunch of conclusions and Experiences after long-term practice.
And think that this is the safest, or the most efficient
This is the mode, which serves as a bridge between programmers
The two programmers understand each other's ideas through a Uniform Naming Model
Of course, Can I skip the mode? Of course you can. It's just that the model is everywhere and you don't know.
For example, for each meal, we want to eat a top bowl, take chopsticks, open a mouth, and feed the entrance, chew and swallow.
This is a set of models. We name this set of models as "eat ".
So what do we mean when dad calls dinner?
I don't need my dad to come in. Oh, it's better than painting for half a day. It's not that dumb.
This is the mode. More than 400 models are known. // it seems that there are more models.
For example, databases have database design patterns, programming has programming patterns, etc.
There are 21 common object-oriented models that need to be mastered. They are mainly divided into three types: creation, behavior, and structure.
J2EE has a J2EE model. Sun has a book called "J2EE Core Model ".
It must be specified that the mode is not a standard, such as the meal mode.
No one requires that you have to eat that way. You can serve a bowl, throw it, and swallow it together when you fall behind.
This is also acceptable, as long as you are willing, similarly, as long as you are willing, you can not follow the pattern
In addition to the mode, there are also anti-modes. The learning mode cannot be set. do not learn to die, learn to use it live, and do not win or win is the highest level.

Javadoc
Documentation tools, extremely easy to use
You can automatically generate HTML documents based on comments.

Ant
In 98 years, a programmer thought of such a thing on a plane that flew back from Europe to the United States.
This changed the world. His name is James Duncan David son.
Organization management tool, which can be described in this way
For example, you want to automatically generate javadoc again after compilation.
Then you only need to edit the ant script // pair, just like the Windows Script
Batch Processing is enough, but now ant has been widely integrated into the IDE
You do not need to write it manually. However, if you want to be dazzling, it is said that this is an unpleasant move.

JUnit
Test tool. The unit family does not only support JUnit.
There are other versions. I will not elaborate on this. I will understand the specific practices.

Pojo
// Plain old Java object
Is a traditional Java object, that is, a JavaBean
Virtual machines are used to control their life and death
Two common management frameworks/specifications are spring and EJB containers.
The name came from someone. // I forgot the name.
I think we have used too many rules, so we all forget the pure Java object.
So we all ignore its existence, so we call this name
In this sense, EJB is not actually a pojo.
After all, a bunch of interfaces are followed, but no matter what the interface is, the interface still does not inherit the class
What is not imposed // follow can write empty method false follow
So pojo is also
However, due to the lack of management, servlet does not have specialized container management and inherits certain classes.
The unmanaged objects are very dangerous in virtual machines, because the garbage collection mechanism varies with virtual machines.
In addition, it is very likely that it will not be recycled for a long time.
This may cause a large amount of memory to be occupied and thus crash. There is no doubt that this mechanism needs to be optimized.
This optimization is implemented through the EJB container or spring architecture.
Another advantage of doing so is to force programmers to encapsulate each class.
Force him to manage the memory to prevent memory leakage. The most common error in Memory leakage is
The reference is not released. The most typical reference is on the keyword "new". The more new the reference, the more
As time goes on, it may lead to a loop that keeps New .....
The memory cannot be recycled by the virtual machine even if one of the new ones is improperly handled.
It is very likely to be finished, and the more difficult it is to find such a small bug in a large project
One person may affect the entire project team, so remember my experience.
A good system framework should not contain the new keyword in the business logic flow.
It doesn't matter if you don't understand it now. You will understand it one day in the future.

SOA
Service-Oriented Architecture
Not to mention too much. This belongs to the upper-layer architecture.
But remember my sentence to help you understand this concept.
What is oriented is what is encapsulated
Object-oriented is encapsulation of objects.
Similar to service-oriented, the rest depends on understanding

Reflection
1.4 new features, very powerful
Through reflection, the program can parse the attributes of the class itself, that is, variables.
// Note that the attribute mentioned here is not an attribute in. net. I don't like the new term created by Microsoft.
The behavior is also the method, and then the method is called through the invoke () method.
You can even add new objects. Java is the first, not available in other languages.
Later, it was copied by Microsoft. With this feature, the open-source framework was widely used and benefited from it, and it was used almost frantically.
I will not talk about the specifics. Finally, I should point out that reflection can reduce the efficiency.
In the early days, it was indeed, but now it's not enough.

Container
For Versions later than 5.0, containers are displayed in j2se.
You can even try to use the container with the standard library.

Recommended websites
Www.javaeye.com // Java sight forum, the domestic authority of Hibernate
Dev2dev.bea.com // dev2dev community of BEA, which is the preferred place for WebLogic
Www-128.ibm.com/developerworks // IBM developer works community, home of IBM products
Www.jdon.com // J. JBoss has its own framework, which is a bit more widely discussed in China.
Www.matrix.org.cn // matrix, with its own framework, a fresh Forum
Jcp.org // JCP, as mentioned earlier
Sourceforge.net // open-source things can be found almost here. Besides Java, game sharing is also available.
Saloon.javaranch.com // I often go, popular
Www.apache.org // home of Apache
Www.jboss.com // home site of JBoss and Hibernate
Www.springframework.org // spring hometown
Www.wiki.org // very good encyclopedia site. Unfortunately, it was banned in China and the founder joined the eclipse zone.
Www.google.com // What do you want here? Enter a keyword and click the left-side white button.

Books
Thinking in Java // to be honest, the original version is okay in general, especially in the translated version.
Java tutorial // The book published by the Electronic Industry Publishing House. It is very thick, but the translation is good.
21-day learning of Java // excellent entry level, but 21-day learning of J2EE is terrible. Do not buy
Mastering EJB // I don't know the quality of the translated books. I guess it's not very good. Please read the original books.
Proficient in hibernate // read the author, Sun weiqin. Do not buy other people.

The rest can be used, and the network is much better than the books.

Final suggestions
I. Do not be an impetuous person
2. It is important to learn English well.
3. Read the source code and documentation
4. Share source code. Do not be a utilitarian person.
5. Love Java

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.