Some tips for novice java----Java Knowledge point generalization (EE and Web parts)

Source: Internet
Author: User
Tags soap wsdl

Java EE (JAVA2 Enterprise Edition) is generally used in the development of enterprise-internal applications, especially Web applications, so gradually, some people will be the Java EE and the web model is an equal sign. But in fact, the Java EE is not only the web, you can see a lot of the specifications are universal, the purpose is to efficiently develop a robust service business model of the application system. In the Java EE is also can not have the Web interface the application, but now for the mass user development website often also uses many Java EE's technology, so the concept of the Java EE and the web development is fused together.

I myself in Java development, also did a lot of web related projects, and then gradually less web use, and now the Web development technology is changing, but some basic knowledge is similar, so also this part of the content of a little to arrange, in order to hope that we can give you some experience.

Another: The Java Basics section of the collation, can be seen here: Some suggestions for Java novice----Java Knowledge Point Summary (Java Basic section)

This is mainly about two pieces of content: Web-related, EE-related technologies

Web Part:

Out of all languages, purely web-related: Html,css,javascript. Even if you do not use Java development, in C #, PHP, or python, these things are generic, here the main emphasis on some basic knowledge.

    • HTTP protocol, HTTPS protocol

I think that doing web development, HTTP is the basis of the foundation. In the beginning, the developer may not be very thorough about this content, just have a preliminary concept, this is no problem, you can start from the understanding, simple use. But once you have some experience with web development, you need to take this piece of content in-depth understanding of thoroughly understand. Just knowing the simple concept, without a deep understanding, may not affect you getting started with web development, but once it comes to performance tuning, system architecture and so on, you need an in-depth understanding of HTTP to get the job done.

For HTTP requests, I focus mainly on the following:

Mode of HTTP request: Request/response

HTTP request method: GET, POST, Put,delete, etc.

Specific format of the protocol: Head + body

Type of return code of the Agreement: 1xx,2xx,3xx,4xx,5xx

Implications and usage scenarios for some of the main attributes in the header

HTTPS protocol

Basic principles and usage scenarios for cookies

    • HTML, CSS

This is a foundation for web development, and if the company has a dedicated front-end developer, you may not need to do this. You might just need to prepare some services to provide some data on the line. But if the company does not have a dedicated front-end staff, then you need to write your own simple page and simple layout. In this case, there must be a simple understanding of HTML and CSS.

HTML simple to understand the words need to know the structure of the page, specific forms, the use of tags, CSS needs to know some basic selectors of the writing and use. But this can only meet the requirements of some simple pages. If there is more complex page development needs, that the use of css+div need to have a more in-depth understanding, the specific content because of their own on this aspect is not much, also said, we can find other references.

    • Javascript:

The language of the front-end development, the only language, is JS. and derive a very good framework for jquery. These two techniques are used by the front-end, which is basically as simple as a bit of complexity. And on the basis of jquery, there are other foreground frameworks that provide a variety of dynamic effects, as well as tables, forms and other commonly used processing. In the past two years, the ANGULARJS framework has started to heat up, and the framework has implemented an MVC architecture at the front end, which has revolutionized the development of the front-end (but doesn't mean that all front-end development should use this). These are all worth a good look. Even if not specialized in front-end development, but for these technical points, can first understand the basic situation, the basic principle, for web development, is still a great benefit.

Because of their own on this is not in-depth, so it is not more listed, so as not to fraught.

    • Webservice

In today's enterprise application development, WebService is already a necessary tool. In each enterprise, after a period of time accumulation, there will be many different kinds of applications, these applications may be used in different language development, and need to communicate with each other. The first choice of communication is webservice. The webservice technique can be used in front-end interactions, interactions between services, or interactions between different languages.

WebService is implemented in a variety of ways, with the common denominator that everyone is based on the HTTP protocol, and can be accessed across domains and across languages.

Using more, one is the way of the SOAP protocol. This is a more traditional implementation of the WebService, the protocol is more heavyweight, the Publisher will be webservice in the form of WSDL release, the caller through the WSDL can directly generate entity classes. For callers, the "call" step is easier to handle. However, there are some defects in the form of soap, such as large message volume and low transmission efficiency. The SOAP protocol itself has more options, more complex, slightly different property settings can cause service communication failure, need to spend more time in debugging.

It is now more popular to use restful webservice. This technology simplifies the URL, or the URL to a certain format, and with the various methods of HTTP, including Get,post,delte,put, etc., to achieve the overall service of various functions. The content that is generally transmitted is a JSON-formatted string. The advantage of RESTful webservice is that it is a more lightweight way of using, higher transmission efficiency, clearer interface conventions, and more convenience for debugging on both sides. The downside is that the JSON format is too flexible, so both sides need to handle each parameter in the JSON themselves. The processing of interface entity classes requires more logic and code.

The Java EE section

    • JDBC (can be used in J2SE)

JDBC is used for Java and database interaction. It is a typical example of Java interface-oriented programming: Developers use the JDBC API for development, but the underlying can use different JDBC drivers for different databases (provided by individual database vendors). JDBC is classified as the specification of the Java EE, but it can also be used in a generic program, and is almost always used directly or indirectly (unless the database is not in use). This from the side also shows that, in fact, Java EE Enterprise Development and web development is not the same concept, but the integration of each other.

JDBC is the most primitive, purest, and most efficient way to access databases in Java, and the ORM frameworks we know about Hibernate, MyBatis, and so on, are encapsulated on a JDBC basis. Understanding JDBC can be useful for better dealing with databases in the future. Even if you are a novice in Java development, you need to learn the frameworks such as Hibernate, MyBatis, and so on, you need to learn the basics of JDBC first.

For the specifics of how JDBC is implemented, this really does not need to be understood so deeply. I recommend that you learn JDBC at the very least:

JDBC Principle: JDBC is interface, can have different drive driver class

Some basic concepts in JDBC: connection, statement, resultset, etc.

The basic process used by JDBC

Register Driver

Create connection

Create statement

Execute Get Resultset

Handling returned results RESULTST

The difference between Statement and preparestatement, master the main use of preparestatement (recommended)

Concept and basic usage of thread pool

    • JMS (can be used in J2SE)

JMS (Java Message service) is our commonly known MQ service, and there are many products available, such as ActiveMQ, ZeroMQ, RABBITMQ and so on. The rationale is the same: after you have an MQ server, you send a message to a topic, or queue, or receive a message from it.

This knowledge requires the understanding of some basic MQ usage, including the MQ server connection, the sending and receiving of MQ messages, and so on. It is important to note that this is an asynchronous way of sending and receiving messages, and MQ is a very basic means of asynchronous synchronous requests.

    • Servlet

This is the core concept of Java Web development, and the Web server we are familiar with is actually a servlet container. What is a servlet? I understand that the servlet is a Java class that handles HTTP requests and returns HTTP responses to the program. This program runs in a servlet container, or embedded in a servelt container. A container can define multiple servlets to match different URLs, the container starts receiving HTTP requests, and the container is assigned to the appropriate servlet program for processing according to the rules of the defined URL.

Web Development in Java is done around the concept of servlet, which defines the processing allocation rules for URLs, and the STRUTS,SPRINGMVC framework we use also has a dedicated servlet class for forwarding and processing requests. So to learn Java Web Development must understand the concept of a good servlet.

    • Jsp

The previous Java Web development, mostly JSP-based, need to write in the JSP HTML code and Java code. Recently, some of the more advanced display framework, in the gradual replacement of JSP, such as freemarker, velocity and so on. There are more front-and-back-end separate frameworks that use JavaScript in HTML to interact with the background in Ajax, so that the background is no longer required to provide the presentation layer, but to provide data to the foreground presentation layer.

However, JSP as the most primitive Java Web development tools, in the production of simple pages, it is very easy to get started, it is recommended to learn the basic use of JSP, in the production of simple pages, once more complex pages need to develop, and then consider the use of other display layer framework to replace.

    • Use of Webserver

Another webserver in Java Web Development is the use of the most popular Tomcat, WebLogic, Webspare, JBoss, and so on, which are often used in enterprise environments, and there are really many.

As a web developer, you should be familiar with some Web server knowledge. This is good for you to improve your app's performance and debug your Web app locally.

You can become more familiar with Tomcat because it is used locally by developers as a web container, even if the production is in a formal environment. Learn about the architecture of Tomcat, the detailed interpretation of structural catalogs and configuration files, how to combine Tomcat for development debugging in the IDE, and more. Go deeper to see the source code of Tomcat, to understand how the general webserver is implemented, how to control the number of threads, which for you in other aspects of the design and development is also very useful. In addition to Tomcat, you can also make a specific understanding of the Web server used in your production environment to better develop a suitable web application.

These are just my own for enterprise-level development and web development of some simple experience, of course, there are more specifications in the Java EE, Web development also has more relevant content, because I have not focused on web-related development for some time, these knowledge points listed also must have a lot of omissions, So just simply share your own experience in this area and hope to give some experience to the developers who have just started it.

Some tips for novice java----Java Knowledge point generalization (EE and Web parts)

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.