Fundamentals of Java Technology architecture

Source: Internet
Author: User

programming language Classification:

1, System level: C, C + +, go, Erlang

2, Application level: C #, Java, Python, Perl, Ruby, PHP

Categories of programming languages:

Instruction + Data

1, process-oriented: the instruction as the center, around the instructions to organize data;

2, Object-oriented: data-centric, around the data organization directives;

Virtual Machine Type:

1. Java Virtual machine: JVM

2. Python Virtual machine: PVM

Application framework for developing dynamic websites:

1. ASP. NET, JSP

Thinking and Extension:

1, if you need to be able to use the development of a good Java program on different platforms, you need to install Java Virtual machine on different platforms to provide the environment for running Java. Virtual machines are virtual, and Java needs its own library of libraries to run its own programs in the context of this class library. This virtual machine system has different versions on different platforms.


2, if the library on one of the platforms provided by the API follows the POSIX specification, then the development of the platform on the source code, to get a different platform can also be compiled to run. If the A platform is compiled into a binary program, it will not work on the B platform because their ABI is not the same.

Dynamic website:

Client dynamic: The source code of the server is running on the client

Server Dynamics: The source code of the server runs on the server side, and is implemented through CGI (Universal Gateway Interface) technology.

Interpretation: CGI

After the Web server that is running the previous segment receives a request from the client, it sends the requested URI to the backend application server and calls the application server to return the generated results to the client after the server runs, which is called CGI technology.

WebApp Server:

early CGI implementations were done by running a server in the back, which we call WebApp server, based on different frameworks that require different service programs to be installed in the background.

Jsp:tomcat, JBoss, jetty

Note: The Tomcat service can interact with the front-end HTML server to interact with the HTTP protocol or the dedicated CGI protocol .

php:php-fpm


The historical development of the Java programming language:

SUN, James Gosling, Green Project, Oak, Java, Sunworld

1995:java 1.0, write Once, run Anywhere Note: Write once, run everywhere

1996:JDK (Java development Kit) with one JVM (Sun Classic VM)

JDK 1.0:JVM, applets, AWT

1997:JDK 1.1 Note: JDK Java Development Toolkit

Jar document Format, JDBC, JavaBeans

1998:JDK 1.2

Sun splits Java technology into three directions: Java 2

J2se:standard Edition

J2ee:enterprise Edition

J2me:mobile Edition

Representative technology: EJB, Java plug-in, Swing,

JIT compiler: Just in time, instant compiler

2000:JDK 1.3

1999:hotspot Virtual Machine Note: Java Virtual machine technology, originally acquired by Sun Corporation

2002:JDK 1.4


2006, Sun Open source Java technology, follow the GPL specification, and set up the OPENJDK organization to manage this code;


Virtual machines: JRockit, Hostspot;


Java Architecture :

Java programming language; Note: Write the source code of the Java program

Java class file format; Note: The compiled intermediate code is word decoding and can only be run on a Java virtual machine

Java API; Note: The functionality implemented by invoking code in the Java API at run time

Java VMS; Note: Java API + java VM is a Java platform


The core component of the JVM:

Class Loader Note: classloader, loading compiled class files and other dependent class files

Execution Engine Note: The execution engine is developed using the C language, and ultimately Java uses standard C libraries and system calls.


thinking and extension: In fact, the Java virtual machine is only a middle tier, it will eventually need to execute the engine on the local platform, so the Java API is just a translator .


Features of the Java programming language:

Object-oriented, multithreaded, structured error handling

Garbage collection, dynamic linking, dynamic scaling


Three technical genres:

J2SE ==> Java 2 SE

EE ==> Java 2 EE

J2ME ==> Java 2 ME


Procedures for Java virtual machines to execute Java programs

JVM Runtime Zone: running as multiple threads

Method Area: Thread sharing, for storing the class information, constants, static variables, etc. that are loaded by the virtual; permanent generation;

Heap: The Java heap is the largest part of the memory that the JVM manages and is the main area of GC management, and the mainstream algorithms are based on generational collection: The new generation and the old; thread sharing

Java stack: Thread-private, storing information such as the thread's own local variables, each thread has its own stack, access to local variables and other information

PC Register (Program Counter register), thread exclusive memory space; Note: An interpreter that performs the line number of a word decoding, also known as a procedure counter

Local method Stack:



JAVA 2 EE Virtual machine technology contains sub-technologies:

JAVA 2 SE

Servlet, JSP, EJB, JMS, JMX, JavaMail Note: These are specialized classes


Servlet contaier: Note: There are two components of JSP and servlet, which we call servlet container

HTML tags are hard-coded in the application ;


JSP: Note: Can be understood as a servlet of the previous program, JSP can convert the following content into a servlet format

<body>

<%

%> Note: Java code is placed between two%

,

</body>

Summary: JSP is a special class library in Java, the default is not included in the JDK, JDK only provides the Java 2 SE standard implementation, if we want to run as a Web page, we must ensure that Java code can output HTML tags, in order to facilitate these development, Sun Company specifically provides a specification, called the servlet specification, based on this specification, the application can be in HTTP or CGI format to accept the user's request, the common CGI or HTTP protocol can understand the user's HTTP request, can parse the request, And be able to call the user's request on the local JDK processing, build a CGI or HTTP response message, response to the client, this technology is the servlet technology. HTML requires embedded Java code, which is JSP technology.

The JSP works in the previous segment of the servlet, accepting the user request, which translates the request into a servlet format,


Web Container: Also provides JDK, Servlet, JSP

Implementation of WEB Container:

Business Implementation :

WebSphere (IBM)

WebLogic (BEA-to-Oracle)

Oc4j

Glassfish

Geronimo

JOnAS

Jboss


Open Source implementations :

Tomcat

Jetty

Resin






Fundamentals of Java Technology architecture

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.