A great advice for java beginners


From I don’t know what Java is to a small J2EE project manager now, although he can’t be a master of it, maybe he’s a little bit of an expert. Every time I surf the Internet, surf BBS and visit forums, I don’t want to go to Java related forum, I feel that there are more beginners, fewer experts and less proficient in it. Because of the old teaching materials of China’s higher education system, plus Java’s own development in about ten years, there is still a heavy time The reason is that Java is more suitable for business applications. Therefore, most of the doctoral teachers in Colleges and universities have no more understanding of the language than the undergraduates. In this environment, many people feel at a loss about Java and don’t know what Java can do. Even if they know that Java is very useful, they don’t know where to start. Therefore, it’s hard to get started with Java. OK, let’s go From what Java can do

A great advice for java beginners

What is java first

Java is an object-oriented language, real object-oriented, any function and variable are encapsulated with class
As for what is the object and what is the class, I won’t talk nonsense
The explanation of these two concepts can be found in any object-oriented language textbook
If you know what Java is, you will naturally be interested in what Java can do

Before we talk about what Java can do, let’s talk about the advantages of Java as a real object-oriented language

First, first, since it’s really object-oriented, it needs to be completely encapsulated

This is the biggest difference between Java and C + +. All Java source code and compiled files are in the form of classes
Java has no so-called class external definition. All functions (Methods) and variables (properties) must be defined inside the class
In this way, a class will not be cut into one block here and one block there. C + + is OK, isn’t it?
This makes the structure of the whole program very clear

Second, second, the most exciting thing is that the pointer is completely shielded and the garbage collection mechanism is introduced

Anyone who has written C / C + + code will hate memory management
Because it doesn’t allow us to focus on what we care about
And we need to think about something inside the computer, as a software engineer
I don’t think anyone is willing to spend a lot of time on memory management. After all, we are not electronic engineers
At this time, the advantages of Java are shown, which completely shields memory management
That is to say, if you write a program in Java, the memory overhead of any program written out will not be controlled by you
At first glance, it looks like you’re in a bind, but it’s not
Because although your program can’t manage the memory, it reduces the speed
But your program will be very safe because you can’t call a null pointer
Unlike when I used to write C, I was afraid of null pointer all day long
Of course, if you have a deep understanding of this line, you will find that Java cannot guarantee that the program will not call null pointers
But it will avoid the call of null pointer to the greatest extent
That’s good. Security. That’s the best thing about Java

Third, virtual machine cross platform, which is the biggest feature of Java, cross platform

Maybe everyone knows windows, but not everyone knows UNIX
Like Java, many people don’t know what UNIX is for
I don’t want to say more about UNIX applications, which is not the main thing, but I want to say that most minicomputers
Workstations, all running on UNIX operating systems, such as Linux / Solaris
Compared with windows, UNIX has one of the most remarkable features: stability. It’s just like Cisco and Huawei
Cisco’s machine is slow but stable. Huawei’s machine is fast but unstable. As a server, it’s not stable
I want to monitor the server, but I don’t think Nix is very marketable on the server side
And it’s very important that windows is not safe. In the promotion of MS, I think everyone seldom sees the word “safe”
Because the windows operating system is aimed at PC users, if the PC crashes, it will crash. It will not restart
The blue screen is the most common one of Wen 95. On the server side, MS has no chip of its own
So it’s not enough to do the system. Far away, then Java can be compiled on Windows
Then run it on UNIX, which C / C + + can’t do

So what Java can do is becoming clear
As mentioned just now, one of the characteristics of Java programs is security
This security is for your system. The system will be particularly stable after running Java programs
And it can also cross platform. Obviously, Java is mainly applied to all platforms except windows operating system
For example, mobile phones and servers
Think about it. If you write a program that runs on your mobile phone, how many of them use windows?
Even if so, if you use C / C + +, do you want to write a program for each mobile phone?
Exhausted, cross platform Java is not needed. Compile once and run at any time
Also, on the server side, if I want to give a web portal site, such as Sina
To write an application, the performance of PC can’t meet the requirement of the number of concurrent sites such as Sina
Then it needs to buy servers, so server MS has no market, and windows is very insecure
Nine times out of ten, you will buy a sun / IBM machine, or HP, but no matter whose machine it is
Its operating system will not be windows, because Windows is too insecure and multi-core support is too poor
If you want to write a program to run on such a machine
Do we just develop on this machine? Of course, it’s impossible. Most programmers use PC and windows for development
So what to do? Write a program, and then take it to the server to compile and debug?
It’s impossible, so we hope to find a language after compiling the generated program
Debug on the PC, and then migrate directly to the server. Then, we will choose Java without hesitation
Because Java is always the first choice in terms of cross platform and security

OK, let’s talk about the disadvantages of Java

Slow down, it’s actually a mistake, it’s like a goto statement

Java also abandoned the pointer. Although it seems to be slowing down, in this two or three years, hardware performance can double
Speed is no longer our concern, and for enterprise applications
Nothing is more important than security and stability. In other words, we can tolerate slow, but we can’t tolerate crash and blue screen
And the larger the application is, the more obscure the disadvantage is
Because the larger the system project is, the worse any link can affect the overall situation
Security is especially important, and it’s like a goto statement
This excessive pursuit of speed will bring irreparable and even inevitable losses to system development, error correction and maintenance
Let the computer manage the memory. It’s worth the cost
We don’t play PC games. We don’t need to spend a little memory as a father

It’s another mistake. Many people even take out the interface drawn by Java swing control

Ha ha, in fact, Java can’t draw well. Idea is the IDE written by Java. It’s very beautiful
But why is it ugly? Because swing control itself is the product of UNIX era. Swing control is close to UNIX interface
In fact, it’s nice for foreigners to watch UNIX interface. They grew up eating UNIX
UNIX, on the other hand, is not as mercenary as MS, so it is not very friendly to Chinese people
In addition, there are no companies in China that are doing operating systems, so it doesn’t look very pleasant
In fact, people who have played UNIX know that UNIX’s support for Chinese is not very good

Three, I haven’t thought of it yet, others added

Two for beginners: from JDK

After learning what Java has and can do
It’s time to talk about how to learn java

Before talking about how to learn Java, it is necessary to make a simple explanation of several major directions of Java
As early as five years ago, well, six years ago, that’s 99
Sun made a decision to divide the Java application platform
After all, in different fields, language application characteristics are different
For applications in different fields, Sun company can issue relevant high-end standards to standardize the code
These three parts are J2SE, J2EE and J2ME
This move seems to be remarkable today
It’s because of this revolutionary development that Java has been transformed from a playful and playful language
Development becomes the foundation of today’s enterprise application

Here I want to explain the meaning of 2 in J2SE J2EE J2ME

In fact, 2 is the homophony of the English word to, which means to
It’s not second edition. Of course, Java 2’s version number is 1.2, which also has the flavor of 2nd Edition

Besides the point, the Java version released by Sun company is very interesting
Although it’s always written as 1. X, in fact, it’s also known as x.0
For example, Java 2 is actually Java 1.2
1.3 is actually 3.0, 1.4 is 4.0, and now 5.0 is actually 1.5
It’s just that we used to call it 1. X
Maybe after 5.0, it will be called x.0 instead of 1. X
So don’t be surprised to hear that Java 5.0 is actually 1.5

Among the three J2 * e, J2SE is the foundation, which is the Java 2 standard edition
That is, the most basic Java language part. No matter what Java technology you learn, J2SE must be mastered
To use J2SE, you must install JDK (java development kit)
JDK can be downloaded free of charge on Sun company’s homepage. It needs to be installed after downloading. See the textbook for the specific installation process
JDK includes five parts: core API, integration API, user interface API, publishing technology and Java virtual machine (JVM)

Let’s start with the running environment. The most important thing to say about the running environment is the Java virtual machine (JVM)

As we said before, Java is a cross platform language, so how to achieve cross platform? After all, every operating system is different

The designers of Java put forward the concept of virtual machine

To build a unified platform on the operating system, this platform must implement some functions to support the operation of the program

The following picture:

| program |
| JVM |
| UNIX | Windows | Linux | Solaris |..

Every program written by a programmer runs on a virtual machine first
All operations must go through a virtual machine to interact with the operating system
This not only unifies all operating systems, but also ensures the security of the operating system
To crash, the virtual machine (JVM) is dead and the operating system is not affected by it
And the Java running environment we mentioned mainly refers to the JVM, and others are omitted

Let’s talk about the API of JDK (java development kit). In fact, JDK is used to include the running environment and development tools

Personal feeling is not appropriate, because these three words can only describe development tools, i.e. several standard APIs
But it doesn’t make people feel that there is a running environment in it, which is out of the question
So what is API?
In short, application programming interface
In Java, it’s just a package of written classes
This also explains what a class is and what a package is. In short, a package is a collection of classes
A bag contains zero or more classes. Well, you can read books specifically
These classes are the basic classes and common classes of Java, which can be simply understood as Java tool set

Finally, I’ll talk about the release technology of JDK. In fact, according to my understanding, it’s the compiler

A technology of converting. Java file to. Class file
These three parts make up JDK. With JDK, you can develop J2SE application software
The most primitive is just a few lines of code in a notepad
But generally speaking, we will use better development tools, that is, IDE
In J2SE, Jcreator IDE is recommended
Sun’s products, which are almost seamless with JDK, are very suitable for beginners

Recommended Chinese teaching materials: a java course published by Electronic Industry Press
There’s also “21 days learn java”. Although some people say that 21 days series is a rotten book, I feel that
For J2SE, this book has been translated very well. There are basically no grammatical errors and the sentences are very smooth
Finally, thinking in Java
It’s a classic book. It’s very detailed, but I don’t think it’s suitable for beginners, but it’s not difficult
It’s not a problem for beginners to see it directly, but I think it’s better to look for this textbook, which is the two recommended ones
After all, some versions of thinking in Java are poorly translated
Moreover, it’s better to read the original version. Of course, these books are the best, but if there’s no time
Read at least one of them carefully, and then read the other two. In fact, the contents of the three books are similar
But the way to look at the problem and the readers are also different. Well, how to say, find the right one for yourself
The last thing to say is
Due to the existence of virtual machine, most of J2SE software will be used slower than general desktop software
The effect is not satisfactory. At present, only the swing control is still in use. I haven’t heard about it


This is the top priority of Java applications. If you want to get a high salary, you’d better learn J2EE well
I remember reading a survey on CSDN before. What kind of work do programmers with tens of thousands of monthly salary mainly do
Eight of the ten are J2EE, the other two are J2ME, and the other one is embedded
It may be exaggerated, but it also shows the scarcity and wide application of J2EE talents from one aspect
So if you want to learn Java, it’s never enough to master J2SE. At least you need time to understand the other two J2 * e’s

Third for beginners: hardware of Java enterprise application

Finally, when it comes to enterprise applications, the content becomes more and more interesting

Java enterprise applications are divided into hardware and software

The emphasis is on software. Hardware is extension. Strictly speaking, it is not necessarily related to Java
However, because Java is a network language, I don’t know some basic knowledge of hardware
It’s no use knowing more software. Don’t go to war without knowing why
Hardware is the foundation of software. Under this premise, it is necessary to spend a little time talking about hardware

Hardware, in short, is what we can see and touch in real life
That is, those cold machines, such as servers, personal computers, network switches, routers, etc

Let’s forget about the network equipment. Let’s talk about the history of computer

The first computer was created a long time ago. At that time, the computer was just a computing machine
It’s huge, weightless and stupid. It can’t do anything but calculate. There’s no so-called artificial intelligence and computer network
But at last, it was born, although looking at the machines at that time from today’s perspective, they were very stupid
It’s only equipped with a calculator instead of a computer. It has no logical thinking ability and can only calculate dead
But a journey of a thousand miles begins with a single step, but it’s made

Then as time goes on, the manufacturing industry develops
The performance of the computer is gradually improved, the speed is faster, and the cost is lower
So people made the second, the third, the fourth, the fifth Nth computer
People have built countless computers and made them a product
It is gradually applied to many complex computing fields, not only scientific research, but also many production fields

And then over time, people find it impossible to make all computers look the same
Because all walks of life have different requirements for computer performance
So I began to grade computers, and the simplest way is to divide computers according to their size
It’s the mainframe, the midrange, the Minicomputer in the textbook
//I think it’s pure bullshit. I think it’s children who play ball. It’s big ball, medium ball and small ball
But anyway, computers are no longer the same
According to different performance, in different fields, there are computers that meet different requirements

Almost at the same time, people began to think about the communication between computers
People began to think about connecting different computers, so the network cable appeared, the network appeared
With the development of the network, there are some special machines for addressing
This is the router and switch, and then there are some public organizations or groups
They set a set of standards to regulate and manage our network
So 3W appeared, and the era of computer network came

Well, that’s about the end of the history of computer development
Let’s talk about the relationship between computers and hardware suppliers in the network era in detail

As mentioned earlier, computers are divided into mainframe, midrange and minicomputer
But now no one in the market divides it like this. If you go out to buy a machine, tell the hardware supplier
I want to buy a medium-sized machine, or I want to buy a small-sized machine. The hardware supplier will definitely ask questions
They’ll ask you what you’re doing with the machine? Scientific computing or home use, server or graphic design
But in any case, it doesn’t make sense to simply say that large, medium and small computers
We divide it according to the category of use
Simply divided into
Servers, workstations and Microcomputers

Server (server)
The server covers almost all mainframes, most midrange computers and even some minicomputers
In common parlance, the service server will make the company run the service machine continuously for 4 hours
For example, selling plane tickets (AVIC), such as hotel reservation (Ctrip)
For example, provide portal related services (Sina), such as e-commerce (eBay, Amazon, Alibaba)
These services have specific requirements for the machine, with particular emphasis on safety and stability

Workstation is actually the abbreviation of graphic workstation. To put it bluntly, it is a kind of computer with extremely powerful functions
For specific fields, such as engineering design, animation production, scientific research, etc

Personal computer / microcomputer (PC)
At the end of computer network, I don’t need to say too much about it
PC has been popularized to thousands of households in the network era

Having finished classifying, let’s talk about each hardware supplier
First, the server and the workstation
These two types of hardware suppliers are mainly the following three
Sun, IBM and HP

Then there’s PC.
IBM used to have a PC business unit, but now Lenovo has swallowed it
Now there are Lenovo and Dell (DELL) in the international market. At present, Dell is still the international leader
And HP Compaq

Then there’s the network, the router and the switch
In this market, Cisco brocade and McDATA are the three pillars

Kernel (CPU)
PC kernel
It’s mainly AMD and Intel. The former has recently cooperated with Sun company. Some of sun’s single and dual core servers use AMD’s
Server and workstation kernel
This one is bound to hardware manufacturers
Sun, IBM and HP make it by themselves

Outside the topic

In some mainframe application markets, such as selling plane tickets
Lufthansa in Germany, AVIC in China and Cathay in Hong Kong all use Yuli
Other machines are IBM machines. It seems that only IBM can do mainframe now
Yuri is about to collapse, and the technology is too backward. Now their system is written by FORTRAN, and even C doesn’t support it

In particular, the architecture of a super mainframe and then multiple small terminals / PCS is becoming less and less popular
The future trend is to replace these mainframes with a distributed operating system with multiple servers
Because it is very difficult to update the mainframe, once the data volume exceeds the processing capacity of the mainframe
So we need to change the host. The cost is huge, but if we use the distributed operating system
Then you just need to add small servers

That’s about the hardware. It’s nothing to do with most people
Because most people can’t get into these hardware areas at all, unless they do sales
Said so much, just to lay the foundation for the software part
//Except for embedded

Four for beginners: Java enterprise application software

Well, I said that hardware should be software
This is the top priority of the series

First of all, let’s talk about software and unify the concept

Software is a set of computer programs
A computer program with some functions
A long time ago, the software of a computer was not hierarchical
A computer has only one system. This system is not only an operating system but also an application software. It is closely bound with hardware
After many years of development and development
People make a set of programs that are closely connected with hardware and often use necessary functions
This program is called the operating system
Other optional functions that adapt to different environments are encapsulated in another set of programs
And this series of programs is called application software

The following picture:

|Application software: alshgat / IE / RealPlayer / Winamp|

|Operating system: Unix / Windows / Linux / Solaris|

As we know in the previous article, hardware is divided into server workstation and PC
In fact, no matter what kind of hardware software, there are operating systems and application software

OK, let’s talk about the application software
In today’s enterprise applications, our application software is generally divided into three layers
The three layers are presentation layer, business logic layer and data persistence layer

|Presentation layer business logic layer data persistence layer|

Let’s talk about the representative software in three layers
Presentation layer
This layer is generally on the client PC, the most common is IE browser, which is the software of the presentation layer
The presentation layer is software that directly interacts with users
Business logic layer
This layer is generally on the server side. As the name implies, all business logic processing is completed on this layer
The most typical is app server, such as IBM’s WebSphere, BEA’s Weblogic and Tomcat / JBoss
This layer is also the focus of the three layers. Most of what we have to say is about this layer. We will talk about it later
This layer is called the middle layer
Data persistence layer
This layer is typically database, which is also on the server side
But the server is generally separated from the server with business logic layer software
Of course, you can also use IO input and output to stream things to the hard disk
But no one would suggest that you do it because your data is not managed, anyway
What this layer needs to do is to save the data. Generally, the business logic layer software is not responsible for keeping the data
In other words, the business logic layer is only responsible for temporary storage of data. Once shutdown, all data in the business logic layer is over
So data persistence (that is, data storage) must be completed in this layer

Let’s not talk about these concepts. Let’s talk about the future trend

Trend 1:

Thin client, a long time ago, the C / S mode was client / server
In the era when client software became popular, a PC user connected to the server with a silly terminal
Then carry out the corresponding operation, the most typical is the C-term we often use on BBS
This is the product of that era, as well as the current e-term for air ticket reservation in China
Later, the browser became very popular. People found that the browser can also transfer some data
Although these data are not as accurate as those terminals, it is enough to meet most daily needs
So people put forward a concept of thin client, that is to say, in the future, all other software in the presentation layer will crash?
The only thing we need is a web browser, and then connect to the server by entering the IP address of the browser
Then carry out the relevant operations, because web browsers usually have one for each operating system
In this way, we can achieve the goal of slimming our clients (no need to install additional software)
This mode is called B / S mode, which is browser / server mode
However, it should be noted that although thin client is the trend, it does not mean that there is no market for fat client
In particular, some complex business operations are not competent by simple software such as browser

Trend two:

Silly database, OK. First of all, I admit that I invented the term, but I really can’t find a better expression
What is a stupid database? If anyone knows something about the database, they will know the previous database
It has its own management system and even its own clients, such as Oracle, MySQL and sqlserver
What SQL statement should be written on a management tool to query the database is something we used to do
So what we advocate in the future is to encapsulate all business logic into the business logic layer
Management is done by software, and business logic software
The so-called silly database means that there is no need to do anything about the future database
Just save the data for me. What are the foreign keys and associations of the complex business logic
There’s nothing to do with the database. It’s all up to the business logic layer software
The advantage of this is that we don’t need these damn complicated database series management tools
And these tools have their own tools for each database. They are totally different and messy. No one likes to face them
In addition to database maintenance personnel, that is, DBAs, we are software engineers, and they are required to do maintenance work
And it is strictly forbidden for database maintenance personnel to change the data in the database. They only make backup and restore it if necessary

After understanding these two trends, is there a sense of beheading to protect the middle?
Yes, the future trend is the era of middleware. Middleware engineers will be the mainstream of computer applications in the future
Let’s unify the concept again. What is middleware?
I remember when I was in school, I read IBM’s textbooks, read middleware definitions for a long time, and then I understood and remembered a sentence
Middleware is to do things that other people don’t want to do. Now think about it, definition of bullshit, ha ha
What is middleware? Middleware is the application software of business logic layer
It is an application software that deals with business logic between business data and client
A kind of server application software providing network service
For a very simple example, online banking, someone wants to use IE to enter the account of ICBC, and then transfer the account
In this example, the client presentation layer is obviously ie, and the data persistence layer is obviously the core database of the bank
So what is middleware? Middleware is the system that provides this kind of service

The three layers are divided as follows

|Presentation layer business logic layer data persistence layer|

|Ie | online banking | database|

Five for beginners: middleware for enterprise applications

The previous article briefly introduces the layering of application software
The following focuses on middleware, which is the software structure of business logic layer

As we know from the second part of this series, Java programs run on virtual machines
The general structure is as follows:

| grogram |

|Virtual machine|

|Operating system|

In other words, the operating system runs a Java virtual machine first, and then runs Java programs on the virtual machine
The advantage of doing so has been mentioned before, that is, security, once there is a virus or something
The virtual machine is hung up, and the operating system will not be affected much

At this time, someone may ask, why do we need virtual machines? Why not treat the operating system as a virtual machine?
Yes, of course, but in doing so, a bug in an application may cause the death of the entire operating system
For example, we installed an email software and a Java virtual machine on a server
Once hackers invade the system through email software, the operating system will be finished
If the hacker attacks through Java program, it will be the virtual machine rather than the operating system
The virtual machine crashes, and the normal operation of the operating system is not affected

For example, the most common is to put database (DB) and middleware on the same server

| program | |
———–| DB |
|Virtual machine|

|Operating system|

At this time, if there is no virtual machine and hacker virus attacks the middleware system, it may cause the death of the operating system
At this time, the database may be played together, and the loss will be great
If there is a virtual machine at this time, once it is attacked, it is the virtual machine that dies, and the operating system and database are not affected

Well, after reviewing virtual machines, let’s talk about middleware
A long time ago, if any enterprise wanted to build a LAN system, it needed many engineers
For example, we want to build an online bank, the client uses a browser, and the background database uses oracle

So how many engineers may be needed to build such an online bank? Let’s figure it out
First of all, since the client uses a browser, we need some network engineers who understand the network communication protocol and some browser standards
Secondly, since the background database uses Oracle, we need to hire Oracle engineers, because the interface of every database company in the database layer is different
Then, we need some operating system engineers, because our system needs to interact with the operating system directly
Finally, we need some engineers to design the online banking system and its related businesses

Too many, too many. Such a middleware team is too large, and the cost of production and maintenance is too high
Moreover, even if such a middleware is made, the code they write can only be used by this company
Other companies can’t reuse all of them, and the code reuse rate is very low, almost impossible to reuse
After all, changes in any part of the system may involve changes in the whole system

So how to reduce costs?

I listed four groups of Engineers:
Network engineer, database engineer, operating system engineer and business engineer who designs online banking system
In addition to the last group of business engineers to design online banking, are the first three groups of engineers required for each project?
Even if not every project, at least most projects need it, right?
Which project can be separated from the network, database and operating system? No way. It’s rare in this era
Well, since every project needs one, can we replace these three groups of engineers with one product?
Our business engineers only need to follow the interface provided by this product and develop accordingly
People have come up with something called app server
What is the application server for? Officially, an application server is a software server with multiple containers
What is the container? I don’t think most people know what a container is

Before we talk about this, let’s talk about the components
What are components and what are components? Component is actually an application block
But they are not complete applications and cannot be run separately
Just like a car, the door is a component and the lamp is a component
But it’s useless to have lights and doors. They can’t run on the road
In Java, these components are called JavaBeans, which are similar to the COM components before Microsoft
In particular, since any Java file exists in the form of a class after compilation
So JavaBeans must also be a class. There is no doubt about that

OK, so what’s in the container? These are the components
Programs outside the container need to interact with these components through the container
For example, ie sends a request to the container, and the container calls one of its components for related processing
The result is fed back to ie, and the component that interacts with the client software is called servlet

But there are many kinds of components, so how to distinguish them?
There are many kinds of management methods, like servlet, some of which are generated through JSP
Some of them are written by developers themselves, so the servlet generated through JSP is put in one place
The developers themselves need to configure some basic parameters in XML
At the same time, different components may also need to inherit some specific parent classes or interfaces, which is also the need of container management
There are other components, which are not illustrated here

There are many types of containers, according to the type of components they load
For example, there are EJB containers for EJB, web containers for servlet, JSP and static pages, etc
//This kind of application server with only web container is also called web server

When the application software of the presentation layer sends a request to the app server through the network
The app server automatically finds the components in the corresponding container, executes the program blocks in the components, and returns the results to the customer
And all we have to do is write components, that is, JavaBeans, and put them in app server
As for how to communicate with ie, how to intercept requests on the network, how to control the number of objects, etc
We don’t care about the tedious and tasteless work. Let app server do it, and focus on the business logic

The relationship between app server and other related software is as follows:

|Presentation layer business logic layer data persistence layer|
| | —————– | |
| IE | | javabean | | |
| -> —————– -> DB |
| client <- appserver <- |
| |————————-| |
|| virtual machine|
| Windows | Linux/Saloris |LinuxSaloris|
As can be seen from the figure, virtual machine is responsible for the interaction between middleware and operating system
App server is responsible for component management and business interaction with other two layers

It should be noted that the above figure also contains the application client container
Manage the operation of the application client component, and the application client and its container run on the client
This situation is more complicated. Generally speaking, it is the communication between two servers
For example, JSP / servlet container is on one server, and EJB container is on another server, etc
This is the basis of large-scale application of distributed operating system, which will be discussed later

Well, let’s go back to middleware. What is middleware?
App server is called middleware, but middleware not only has app server, but also other things
In other words, app server is just a kind of Middleware
There are many specifications and models for Middleware
There are two most popular specifications: J2EE and. Net
But. Net is almost only used by Microsoft, so many people regard. Net as Microsoft’s middleware product
I can’t help it. After all, few companies like to run after Microsoft

Six for beginners: a comprehensive chapter of Java enterprise application

We know that middleware has many specifications and related models
The most popular one is J2EE and the other is. Net
So what are the products and surroundings of these two specifications of each major company?


Gold combination
Operating system: Solaris
Application server: Weblogic
Database: Oracle
Development tool: jbuilider / IntelliJ idea
Advantages: the first-class performance is excellent, which is the first choice for large enterprises and companies to make systems. Almost all of the top 500 companies in the world are this combination
Disadvantages: extremely expensive

Super combination is also the safest and coolest gold combination. The hardware adopts sun’s machine
But sun’s servers are very expensive. It’s better to buy IBM’s machines at the same price
Sun’s server supports the effect of Solaris. Needless to say, Solaris is the safest operating system in the world
Oracle is also the safest and best performing database in the world. Weblogic is the best app server today
JBuilder and idea have their own advantages. JBuilder is one of the brands of Borland company
It is the most popular Java ide in the world, written in Delphi, but the evaluation on the network seems not very good
Idea has plug-in function, and the interface is the most beautiful among all Java ides. It is developed by Eastern European people
The rigorous style of the Eastern European people is particularly prominent in this product, which is written in Java
Idea even claims that it is recognized as the best ide in the industry / / personal reservation, no best but better
But I found a lot of bugs when I used JBuilder, but I haven’t found any bugs on idea yet
Personal recommendation idea
In terms of price, Solaris is open-source, but sun’s servers are more expensive. Weblogic is up to 340000
The standard version of Oracle is 186000, the enterprise version is 490000, and the JBuilder version is about 27000
The retail price of idea is about $500, which is more than 5000 yuan
In addition, although in theory the comprehensive performance of these products is higher than other options, we must see that
Due to the conflict of interest between manufacturers, for example, Oracle has its own app server, but its performance is not good
Make the collaboration performance of these products a little worse than expected

Open source series
Operating system:-
Application server: JBoss
Database: MySQL
Development tool: NetBeans
Advantages: cheap, performance may not be the best, but it is enough to deal with small and medium-sized enterprises
Disadvantages: if something goes wrong, resist it

Well, this is the biggest feature of the Java camp. It’s free, and eclipse is also free in the development tools column
But later, let’s say, let’s switch to a representative open source product
Tomcat has only web container but no EJB container, and JBoss has integrated Tomcat
That is to say, after downloading JBoss, start Tomcat at the same time
JBoss adds an EJB container based on tomcat, which makes JBoss + Tomcat and Weblogic
Another widely used app server besides WebSphere
Now it’s probably the case that small and medium-sized enterprises use JBoss more often, and if the application is smaller, Tomcat is used
Only projects for large enterprises will pay for the last Weblogic or WebSphere
MySQL is also an open-source database, which has done a very good job. If the system does not have high requirements for the database
Or the security requirements are not very strict. MySQL is a very good choice
In terms of development tools, NetBeans is an IDE promoted by Sun company
I heard that eclipse has been used more in the North American market
The operating system and software don’t need money any more. The server also needs money. It depends on what operating system runs on this machine

IBM package
Operating system: Linux
Application server: WebSphere
Database: DB2
Development tool: Eclipse / WebSphere studio
Advantages: good service, IBM can provide a full range of services, but also can take risks for customers
Disadvantages: give all the machine data to IBM. You can’t afford to be safe or anything else

Hehe, IBM’s full range of products, even including hardware IBM’s servers
Because it’s a company’s product, the cooperation among products is naturally good
In terms of price, Linux, DB2 and eclipse are all open-source products. Currently, the retail price of WebSphere is 338000 RMB
IBM server is good, you can consider


Microsoft camp
Operating system: Windows
Application server:. Net application server (like IIS)
Database: sqlserver
Development tool: Ms Visual Studio
Advantages: good user experience on the client side, strong compatibility with many Microsoft products on the client side
Disadvantages: it’s hard to move without Microsoft. It’s not compatible with any other company’s products

Microsoft’s things, how to say, are too arbitrary
Microsoft does everything around windows
. net can realize cross platform, but Microsoft is considering its own business
There are many obstacles in the cross platform implementation of its application server
And for windows, Microsoft has made a lot of optimizations, which can be seen in this way
. net is a set of products bundled with windows
So some people say that if Microsoft’s products leave windows, they are just scum
In addition, there are few. Net open source options. Considering the security, windows itself has a bunch of patches to play
SQL server is not safe either. As for. Net, I don’t know whether it’s safe or not. After all, I haven’t used it very much
But on the whole, I don’t think. Net is the first choice for large enterprises, given its strong business background
It is not the first choice for small and medium-sized enterprises, but we must see that
The market of client computer PC has been completely monopolized by windows
So in some areas of rapid development and high compatibility with Microsoft products,. Net still has a market
The last visual studio is compatible with its previous version, and supports C, C + +, C, VB and other languages
In its traditional field, such as writing some desktop software and other client applications,. Net is still the first choice

The last thing to say is
These combinations are not fixed
Because J2EE is supported by most IT enterprises and Java cross platform features
We are free to customize our personalized portfolio
For example, I can choose windows + JBoss + eclipse + Oracle
You can also choose Solaris + WebSphere + idea + MySQL
Wait a minute, these free combinations are all OK, but one thing must be explained
Microsoft’s things, generally speaking, can’t be used without windows
For example, if you choose. Net application server, the operating system must be windows
If you choose SQL server, you must use it on windows
In addition, all components that follow the J2EE specification can be ported to each other on different application servers
For example, you can use JBoss when testing
When WebSphere is put into production, you only need to make corresponding changes in the configuration file

Seven for beginners: Terminology of Java enterprise applications

After understanding the relevant peripheral products of J2EE, we need to go deep into the J2EE specification to understand these specifications
Here are some of the most commonly used specifications
It’s necessary to say some common sense before going on

The birth of Java
James Gosling, the father of Java, graduated from CMU in his early years
After a period of development work, I came across a project unexpectedly
This project requires him to develop in C + +, but the lovely JG is a genius. When a genius is outstanding in some aspects, he should
There must be some inborn defects, or commonalities, such as laziness, impatience and arrogance
Since JG is a genius, it must have these commonalities. JG is so lazy that he can’t learn C well++
Not only did he not learn well, but also the team that developed Java in those days could not learn C well++
They were so noisy that some of them even threatened to quit the project that needed to be developed with CPP
They were arrogant, so they decided to develop a new language to replace the damn CPP
What’s more lovely is that they actually named the language c + + + — / / Yes, I did
What is C plus plus plus plus minus, which means adding some good things and subtracting some bad things
Sometimes you will find that there is only a line between genius and fool
Fortunately, this lovely name has not been inherited. These geniuses named their products oak / / oak tree
But later when they went to register the name, they found that it had already been registered
So a female employee in Sun company / / mm is considerate, which is what our company mm told me
Under the proposal of Java, the lovely language was named Java, which was the name of the coffee they were drinking at that time
So the sign we see in Java is a cup of hot coffee

After JavaBean understands Java, let’s talk about JavaBean / / Huawei interview question
What is a JavaBean? Coffee bean
JA, the more scientific explanation is
Reusable software component written in Java language / / the definition of component has been mentioned before and will not be repeated
It’s very impressive, isn’t it? Put the JavaBean in the cup / / container. Remember the concept of the container? Web container, EJB container
It can be brewed / / compiled into coffee for customers to taste / / run
Perfect service

Let’s talk about containers
The container was introduced earlier, I think it’s necessary to add a little more
In a sense, a container is actually an application written in Java that can run
Just like the. EXE file generated after C + + / C compilation
The difference is that Java compiled files need to be executed by command line or script
Because containers are written by Java, they can be cross platform
However, it seems that most containers have different versions for different operating systems
But it is certain that the porting components between the same containers do not need to be recompiled

Servlet web container component
Servlet is exactly the Java component that the web container runs
Unlike regular JavaBeans, servlets define a series of methods / / such as init() and destroy()
Called by the container, the main purpose of which is to manage
When a request is intercepted by the web container, the container analyzes the request address
Then through a mapping table in the configuration file / / web.xml
Call the corresponding servlet component to process and return the result to the client

JSP//Java Server Page
Web container component
After the appearance of servlet, people found that there was almost no way to write pages in a very intuitive way
After all, the page is written in HTML
It’s very difficult for us to teach the computer how to write HTML code line by line in a flow way
In this case, JSP comes into being, which embeds java code into HTML code
Then save it as a. JSP file, and the computer compiles it to generate a servlet to save it / / note this process
So JSP and servlet are actually a kind of thing for web container, although they are written according to different standards
Greatly simplifies the code, increases the readability of the code, and reduces the cost of production and maintenance
It is worth mentioning that in the process of formulating JSP specification, many specifications of ASP are used for reference
People who have written ASP and are familiar with Java language should be able to master JSP quickly

EJB//Enterprise JavaBean
EJB container components
Over time, people have found that ordinary JavaBeans do not seem to meet the needs of enterprise applications
The most typical is the garbage collection mechanism provided by virtual machine, that is, GC is not perfect
There is a lot of room for optimization. In this case, EJB came into being
EJB is the same as other components, but it follows some specifications
But these specifications are more for the main purpose of making full use of the machine and improving the performance
A simple example
For example, a web server has 100 users connected at the same time
Because the network connection is instantaneous, the concurrent number is not as large as 100 in many cases
30 requests may have been sent and processed in the previous second
In the next second, only 10 requests can be sent and processed
Only in very extreme cases can 100 requests be sent and processed at the same time
Do we need to keep 100 or so objects in the memory of the server to process these requests?
Obviously, no, most of the time / / or even all of the time, I don’t believe in that extreme situation
We only need to save 10-30% of it, so when do we need 20% and when do we need 50%
Even 100%, the process is left to the container to manage, which is what the EJB container is doing every day
Manage active objects in memory

Well, it must be emphasized that due to the immature use
We often mix standard and specific application terms
For a simple example, let’s talk about servlet, most likely the servlet specification
It is also possible to say a specific servlet, which depends on the situation
EJB, JSP, too

Connection to database
Strictly speaking, this is something database manufacturers need to care about
How to connect appserver to database
But it also needs developers to do something, because appserver does not know when components need to use the database
At the same time, developers need to tell appserver what database they are using, IP address, etc
JDBC is about this set of specifications
What kind of interface should be provided by the manufacturer including database
How to connect appserver application server
How should developers configure these connections, etc
There are also some data sources, connection pools and other concepts. Please refer to the relevant data here
Other specifications, such as JMX, are not really relevant to developers
This kind of advanced application is only important to appserver application server manufacturers
I don’t want to talk anymore

I remember hearing that
I didn’t know when I was a freshman. I didn’t know when I was a sophomore. I didn’t know when I was a junior. I knew why I knew when I was a senior. Because when I was a freshman, I didn’t know anything. It was normal. Everyone was the same
When I was a sophomore or a junior, I began to learn and accumulate knowledge, though I still didn’t understand it
After a while, I know that I know it / / that is, the senior of the former statement and the junior of the latter
I started to fart, and I began to drag myself. I felt that I had no talent and could not find bole
Some people start to drag when they graduate from the senior year. Those with a higher level of savvy start to drag when they are in the junior year, which varies from person to person
This is the inevitable stage for almost every beginner after a period of study
Anyway, it’s starting to get started. It’s not a bad thing
But in the end, everyone will know what they don’t know, which is the fourth stage of the latter theory
//The guys in the former one probably won’t understand it until after work
Because every subject is broad and profound, if you can understand it in two or three years
That’s either bragging or sitting on the sidelines, Java, C, C + +

So by the seventh episode of this series, what stage should lovely readers be in?
Congratulations, after reading this article, you are basically in the stage of knowing you don’t know
There’s still a long way to go, because you haven’t learned and accumulated some basic knowledge
But it’s not a big problem to cheat the laymen in the state-owned enterprises of Mongolia and Mongolia

Eight for beginners: framework of Java advanced application

Yes, I did
The reason why it is no longer claimed to be an enterprise application but an advanced application is that the following is purely folk
It’s the superstructure of Java specific application. It’s available but not needed. No one forces you to use it

First, define the framework / / framework
I think you’ve probably heard about the concept of. Net framework
Yes, the framework we are going to talk about is similar to this framework
The difference is that the competition object of. Net framework is the series of J2EE standards
The frameworks we will talk about are applied to different levels of J2EE
As far as a single framework is concerned, there is not as much. Net framework to manage
But it is much more refined and more comprehensive than Microsoft’s framework
Back to the point, what is the framework?
Software engineering is called software engineering because there are so many people who think it can be used in engineering
Those methods of project management manage the whole process of software development and maintenance
So what is the frame in the construction project?
Nowadays, reinforced concrete structure is widely used in buildings. Pay attention to one of the most important words: reinforcement
There was a topic in TOEFL Reading that listening was about the birth of steel structure in the United States
Well, most modern buildings use steel bars to build a frame before they are built
Then concrete is placed in the middle of the reinforcement to form a finished building
Today’s framework is the realization of such a thing in the middle of every software
Framework is such a thing that can help us build a software structure by writing code in advance

Here’s the framework and specification / / mainly referring to the difference between J2EE specification and official standard
In a sense, J2EE specification itself is a framework
Whether it’s a web container or an EJB container, they all develop some common code
And help us build a software structure. What we have to do is fill in the components
For example, EJB / servlet / JSP and so on
Yes, that’s right to understand, but in order to avoid confusion, we have to distinguish strictly
The framework mentioned in this article refers to the framework of unofficial standards unless otherwise specified
Norms are norms, and framework is something based on norms
It can be said that it is a continuation of the standard, or an attempt by the people. In a word, it is such an unofficial thing
By the way, JCP organization is the Java community process / Java community
At the beginning of Java release, Sun company advocated open source and co project
At the same time, for the purpose of putting forward a reasonable standard, let the majority of developers participate in the formulation of the standard
And a community has been set up, and it’s still alive. The website is jcp.org
Every new specification will be widely discussed in this community before it is released, which will eventually have a huge impact on the formulation of the specification
Among them, there are enterprise level participants. The well-known JBoss and China’s golden disc company are all members

Here are a few well-known frameworks. It must be pointed out that although most of them are open-source, it does not mean that all frameworks are open-source, such as. Net framework, but most of Java frameworks are open-source
Get down to business
The name comes from the metal frame of the aircraft
Maybe some readers will ask questions
Isn’t the presentation layer a client?
That’s right, but language is a thing. People talk about it. You don’t want to talk about it
The first presentation layer refers to the client, and then it develops with time
People also directly connect the server side with the client side / / for example, ie
That part of the interaction is also called the presentation layer / / JSP + Servlet
So what is the presentation layer framework for?
In the early days of large-scale application of JSP, people found that JSP was full of logic code and data
The readability is very poor, so people borrowed the idea of MVC mode from a long time ago
Divide the presentation layer components into v-viewer, or JSP
M-model model model, generally a JavaBean
C-controller controller, generally a servlet
Everyone deals with the server through JSP, sends the request, and the viewer forwards the request to the controller
The controller processes the request by calling a model and then returns the data to the viewer
Such a process can achieve data and logic separation, enhance code readability and reduce maintenance cost
And what helps people realize this series of things is the struts framework, which is such a thing
The competitors of struts are mainly the JSF (Java Server faces) strongly advocated by manufacturers
But because struts is early, it is widely used
JSF is strongly supported by manufacturers and has a bright future
For this layer, the fewer Java statements in the HTML code of JSP, the better
Because the less java code, the less business logic the page processes, and the more reasonable it is
That’s what struts was originally for. Remember that

Spring’s famous spring framework
Some people have said that the sound of spring in 2005 refers to the framework
Spring originated from rod Johnson’s “expert one on one J2EE design and development”
According to rod Johnson, the set in J2EE / / especially EJB
It’s too heavy. For a stand-alone system, there’s no need to use such complicated things
So I started to design and guide the spring team to develop such an architecture
I can’t help saying that he’s a genius, because it’s true that not all systems are multi server
There’s no need to design a simple system so complicated / / the commonalities of genius are shown again
Spring has been aiming at EJB since its birth, striving to replace EJB in many applications
And it did
Now, mainstream application servers such as Weblogic and mainstream ides are beginning to accept the framework
And provide corresponding support
When it comes to spring, I can’t help but say IOC / / inversion of control
Di / / dependency injection
What is inversion of control?
To paraphrase Hollywood’s famous saying is: you stay still, then I will find you.
What do you mean? It’s like an emperor and a eunuch
One day the emperor wanted to be lucky to some beautiful woman, so he said to the eunuch, “I’ll spoil the beautiful woman tonight.”
The emperor often doesn’t tell the eunuch what time he will return to the palace and which dragon bed he will return to. He will only tell the eunuch which beauty he wants
Everything else is arranged by the eunuch. In the evening when the emperor returns to the palace, there will naturally be beautiful women on the emperor’s Dragon bed
This is the reversal of control, and sending a beautiful woman to the emperor’s bedroom is injection
Eunuch is the beanfactory of injection controller in the frame, which is responsible for finding beautiful women and sending them to the Dragon bed
The whole harem can be seen as a spring framework, and beauty is a JavaBean under the control of spring
And the traditional model is that a hungry man goes to a beautiful woman
Find a foreman and help introduce a cloud cloud to him, so the foreman begins to make a fuss for him
Introduce a suitable one to him. When you’re done, return the young lady to the foreman. Come again next time
In this process, the foreman is to query the context. One of the foreman’s functions is to find the Miss they want for the customer
This is the lookup () method. The leader’s directory is JNDI / / Java Naming and directory interface
Miss is EJB, hungry man is client, brothel is EJB container
See the difference? It’s very troublesome for hungry and thirsty men to find beautiful women. They not only have to find them, but also have to return the young lady after using them
But the emperor was so upset that he didn’t have to worry about anything. He left it to the eunuch to deal with it. The control was transferred to the eunuch
Instead of the emperor, if necessary, the eunuch can inject it
See the beauty of spring. Spring also provides support with multiple mainstream frameworks
Can be integrated with other open source frameworks
The name comes from ORM’s first joke / / ORM is or mapping
After using ORM, programmers can go to hibernation without worrying so much
It has to be said that the framework was so well done that it was recruited by J2EE and became a part of EJB 3.0
Replace the original EJB 2. X about entity bean and become the EJB ORM tool
Here we explain ORM / / or mapping
Chinese name object relation mapping
What do you mean? We know that traditional databases are relational
A record is stored in the form of a table, which is filled with relationships / relationships
For example, a person’s name is Zhao CE, gender is male, age is 23, so it is stored in the database
Name gender age
The entities in the actual application server exist in the form of objects, one by one
This is the form in which zhangce exists
Human human=new Human();
In this way, we know that the traditional JDBC is to extract data through a two-dimensional string
We need to wrap it into objects by ourselves. When we store it, we also need to open the objects
Put it into SQL statement / / insert into huamn values (‘zhaoce ‘,’ m ‘, 23)
Then execute the SQL statement
It’s too much trouble. The idea of ORM has changed all these things. ORM believes that these things should be done by the framework
Instead of programmers, programmers do what they should. Don’t be distracted by this kind of crap. They test for half a day
So there are hibernate, JDO, TopLink and so on. Even. Net has ado.net
In the past, hibernate and JDO competed. Now it seems that hibernate is gradually becoming the mainstream and officially accepted
Become one of the specification standards and replace the original ORM entitybean of EJB2. X
TopLink is an ORM introduced by Oracle and combined with Oracle Database
Commercial software, expensive and complex, is gradually opening up
Like the presentation layer, the data layer specific code is also called the data persistence layer
So the concept of data persistence sometimes doesn’t just refer to databases
As for ORM, the highest level should be that there is no SQL statement in Java code
Note that SQL statements are not included, and Hibernate’s HQL and EJB QL are not included
As for the absence of alternative QL such as HQL / EJB QL, it depends on the specific situation, but it is better not to
Of course, the over ideal situation in the end is often unrealistic. In a word
SQL represented by SQL/And HQL, EJBQL, etc/The fewer statements in the code, the better
Remember this. You may not understand it now. You will understand it after you learn it

These three are the most commonly used frameworks at present, and the published frameworks are more than 500
In addition, it is impossible to list them one by one. If you are interested, you can go to the corresponding documents to point out whether the framework is an application
It’s just an orderly composite of a bunch of components, which can’t exist independently of the application server when applying

To beginners 9: closing

The last part introduces some common concepts
Design pattern
This is not just unique to Java
The books I read are examples of C + + and Smalltalk
Let’s talk about the design pattern first
What is the pattern? Pattern is the summary of experience and the abstraction of latent rules
What do you mean? For example, we need to go through several steps before we get on the plane
What security check get boarding pass and so on, this set of process can change?
Yes, but why do airlines around the world use this process before boarding?
Because after a long period of practice, airlines have come to a lot of conclusions and experiences
And think it’s the safest or most efficient way to do it
This is the pattern. Pattern is the bridge between programmers
Two programming experts understand each other’s thoughts through the unified naming mode
Of course, can we do without the help of models? Of course, it’s just that patterns are everywhere, you don’t know
For example, when we eat a meal, we should first serve a bowl, take chopsticks, open our mouth, plug the entrance of the meal, chew and swallow
This is a pattern. We call it eating
So when Dad calls for dinner, we can understand what it means
And I don’t need my dad to come in and talk. It’s a long time compared with the painting. It’s not the way to use mute
This is the pattern. There are more than 400 known patterns / / it seems that there are more. I don’t remember
For example, database has database design mode, programming has programming mode, etc
There are 21 common patterns of object-oriented, which need to be mastered. They are mainly divided into three categories: creation, behavior and structure
J2EE has J2EE mode. Sun company has published a book called J2EE core mode, which can be used for reference
It must be pointed out that the mode is not standard, such as the dining mode
No one says you have to eat like that. You can carry the bowl, toss it, open your mouth and swallow the bowl together after falling
It’s OK, as long as you want, as long as you want, you can not follow the pattern
In addition to the mode, there are anti modes. The mode of learning can not be fixed. The highest level is not to learn to die, to learn to use flexibly, and to win with no moves

Document tool, extremely easy to use
HTML documents can be generated automatically based on comments

In 1998, a programmer thought of such a thing when he flew back from Europe to the United States
That changed the world. His name was James Duncan Davidson
Organization management tool, which can be described in this way
For example, you want to automatically generate Javadoc again after compilation
Then you just need to edit ant script / / Yes, just like Windows Script
Then batch processing is OK, but now ant has been widely integrated into ide
You don’t need to write it by yourself, but if you want to dazzle, it’s said that it’s not good for you to try it all

Testing tools, JUnit is not the only one in the unit family
There are other versions. If you don’t elaborate on them, you will understand them in practice

//Plain Old Java Object
It’s a traditional Java object, a JavaBean
Control the life and death of virtual machine
Two common management architectures / specifications are spring and EJB containers
The name comes from someone / I forgot the name
I think we use so many specifications that we forget the pure Java objects
So we all ignored its existence, so we called such a name
In order to wake up people’s memory, in this sense, EJB is not a POJO
After all, it follows a lot of interfaces, but anyway, the interface belongs to the interface, and there is no inherited class
Nothing is imposed / / follow can write null method fake follow
So POJO is right
But because of the lack of management, unlike servlet, which has special container management and inherits certain classes
And unmanaged objects are very dangerous in virtual machines, because the garbage collection mechanism is different among virtual machines
And it’s not that bad. It’s very likely that it won’t be recycled for a long time, so it can be used in enterprise applications
It is possible to cause a large amount of memory to be occupied and crash. There is no doubt that this mechanism needs to be optimized
This optimization is realized through EJB container or spring architecture
Another advantage of doing this is to force programmers to encapsulate each class
Force him to do management to prevent memory leakage. The most frequent error of memory leakage is
The reference is not released. The most typical reference is the new keyword. The more new, the more references
As time goes on, it may lead to a cycle that keeps new new new
Even if one new is not handled properly, the virtual machine cannot reclaim memory
It’s very likely to end, and the bigger the project, the more difficult it is to find such a small bug
It is possible to influence the whole project team because of one person, so it’s better to remember one of my experiences
A good system framework should not have the new keyword in the business logic process
It doesn’t matter if you don’t understand now. You will understand one day

Service Oriented Architecture
Not too much. It’s a superstructure
But remember one of my words, which can help you understand this concept
Facing what is encapsulating what
Object oriented is to encapsulate objects
Similar to service orientation, the rest depends on savvy

1.4 new features, very powerful
Through reflection, the program can parse the properties of the class itself, that is, variables
//Note that the attributes mentioned here are not the attributes in. Net. I don’t like the new terms created by Microsoft
And the behavior is the method, which is called by the invoke () method
Even new objects can be added. Java is the first one, which is not available in other languages
Later, it was copied by Microsoft. With this function, the open source framework benefited a lot and was adopted in a large amount. It was almost wildly used
Let’s not be specific. Finally, it should be pointed out that the use of reflection will reduce efficiency
In the early days, it was, but now it’s not. Don’t worry

Containers appear in J2SE after 5.0
You can even try to use containers with standard libraries

Recommended website
Www.javaeye.com / / Java Vision Forum, the domestic authority of Hibernate
Dev2dev.bea.com / / the dev2dev community of BEA, the best place to use Weblogic
Www-128.ibm.com/developer works / / IBM developerWorks community, home of IBM products
According to www.jdon.com / / J, JBoss has its own framework for more discussion meetings in China
Www.matrix.org.cn / / matrix, with its own framework, is a very fresh Forum
Jcp.org / / JCP, as mentioned earlier
SourceForge. Net / / open source things can be found here. Besides Java, there are game sharing, etc
Saloon.javarange.com / / I often go there. I’m popular
Www.apache.org / / Apache home
Www.jboss.com / / home of JBoss and Hibernate
Www.springframework.org / / spring home
Www.wiki.org / / it’s a very good encyclopedia site. Unfortunately, it’s blocked in China. The founder joined eclipse zone
Www.google.com / / you want it here, don’t you believe it? Type in the key words and press the left white button again

Thinking in Java / / to be honest, the original version is OK, especially the translated version
Java tutorial / / the book published by electronic industry publishing house. It’s in two volumes. It’s very thick, but it’s well translated
Learn Java in 21 days / / excellent introduction, but learn J2EE in 21 days is terrible. Don’t buy it
Mastering EJB / / I don’t know the quality of the translated books. I don’t think so. Please read the original books
Master hibernate / / see the author, sun Weiqin. Don’t buy others

Others can be used. There are more and better ones on the Internet than in books, though they are also miscellaneous

Final recommendations

One, don’t be an impetuous person

Second, it’s important to learn English well

Third, read the source code and documents

Four, share source code, don’t be a utilitarian

V. love Java

Author: a little confused

Read the original text

This is the original content of yunqi community, which can not be reproduced without permission.