What technology does Java Web project development need to master?

Source: Internet
Author: User

At present, the information construction at home and abroad has entered the stage based on Web application, Java as the best language to be used in the network, the foreground is optimistic. However, it is not easy to build a Web application that is not trivial, even in Java. To summarize, the techniques for implementing a Java Web project are as follows:

Ljava language L object-oriented Analysis design concept L design pattern and framework structure lxml language L Web scripting language L database L Application Server L integrated development environment below we look at each technology in detail. 1. Java language
The Java language system is quite large, including multiple modules. There are JSP, Servlet, JDBC, JavaBean (application) four part technology from the perspective of Web project application. (1), Java Database Connectivity (JDBC) technologyIn Java Web application development, the use of database management system (RDBMS) is indispensable. JDBC (Java Database Connectivity) is a Java API for executing SQL statements. It consists of a set of classes and interfaces written in the Java programming language. JDBC provides tool/database developers with a standard API that enables them to write database applications using pure Java APIs. To put it simply, JDBC can do three things: L connect to the database, L send SQL statements, L process the results. (2), servlet technologyServlets are programs that run on the server side and can be considered server-side applets. A servlet is loaded and executed by a Web server (such as Tomcat), just as an applet is loaded and executed by a browser. The servlet receives the request from the client (through the Web server), performs some action, and returns the result. The main advantages of the servlet include that Lservlet is persistent. The servlet only needs to be loaded once by the Web server, and it can maintain services (such as a database connection) between different requests. Lservlet is platform-independent. As mentioned earlier, the servlet is written in Java and naturally inherits the platform independence of Java. The Lservlet is extensible. Since the servlet is written in Java, it has all the advantages that Java can bring. Java is a robust, object-oriented programming language that can easily be scaled to suit your needs. The servlet naturally has these characteristics as well. The Lservlet is safe. The only way to invoke a servlet from outside is through a Web server. This provides a high level of security, especially when your Web server has firewall protection. Lservlet can be used on a wide variety of client computers. Because Servlets are written in Java, you can easily use them in HTML. (3), JavaServer Pages (JSP) technologyJSP is a small part of the servlet, which simplifies the development and strengthens the interface design. JSP localization in the development of interactive Web pages. Java syntax is used, but the functionality is much weaker than the servlet, and the advanced development only acts as a part of the user interface. When the JSP container receives a request from the client, it executes the program fragment first, and then responds to the client with the result of the execution in HTML format. The program fragments can be: manipulate the database, redirect the Web page and send e-mail, and so on, these are the functions needed to build a dynamic website. All program operations are performed on the server side, and only the results that are delivered to the client on the network are not related to the client's browser, so the JSP is called Server-side Language. The main benefits of  javaserver pages include a write-once, execute everywhere (write once, Run Anywhere) feature as part of the Java platform, JavaServer pages technology has the Java language "write once, Implemented Everywhere "feature. As more and more suppliers add JavaServer Pages technology to their products, you can make a careful assessment of your company's needs, choose a server that meets your company's cost and size, and replace the server platform without impacting the cost of the previous investment, if future requirements change Human development of the application. Paired with reusable components JavaServer Pages technology can rely on reusing cross-platform components such as JavaBean or enterprise JavaBean components to perform more complex operations and data processing. Developers can share development-completed components, or they can enhance the functionality of these components to be used by more users or groups of customers. Based on the method of good use of components, the overall development process can be speeded up, and the development cost and manpower of the company are greatly reduced. Developing Web page developers with tabbed pages are not necessarily programmers who are familiar with the Java language. As a result, JSP technology can encapsulate many functions and become a custom label, which is based entirely on XML standards, that is, the tag library in JSP technology. As a result, Web page developers can use custom tags to achieve job requirements without having to write complex Java syntax, allowing web page developers to quickly develop a dynamic Content Web page. In the future, third-party developers and others can create their own tag libraries for common functions, allowing web page developers to work with familiar development tools, like HTML-like tag syntax, to perform specific functions. The support of  n-tier Enterprise Application architecture is due to the development of the InternetAs the demands of the future service become more and more complicated, and no longer be restricted by the region, we must abandon the two-tier architecture of the past client-server and turn to the more powerful and elastic dispersive object system. Because JavaServer Page technology is part of the Java 2 Platform Enterprise Edition (ee) integration, it is primarily responsible for the front-end display of the resulting content after a complex operation, while the decentralized object system is primarily dependent on the EJB ( Enterprise JavaBean) and Jndi (Java naming and Directory Interface).
(4), JavaBean (application) Application Component Technology
Application is a Java application that primarily applies javabean in Web projects and some development. It is a part of application, logical computing ability is very strong, can greatly exert the advantages of the Java language. JavaBean is known as the core of Java component technology. The structure of the JavaBean must meet certain naming conventions. JavaBean can provide common functionality and can be reused, which allows developers to extract some key functions and core algorithms to encapsulate as a component object, which increases the reuse rate of code and the security of the system.

Advanced Web projects are applied to all of these technologies, and joint use and collaborative development between them can improve the efficiency of development and the performance of the system.

2. Object-oriented analysis and design ideas

The Java language is a fully object-oriented language, so it can be a great help in project design, and should be designed so as to abandon the previous process-oriented design approach.

When analyzing the project business relationship, apply some UML (Unified Modeling Language) diagrams, such as the commonly used case diagrams (use cases diagram), class diagram (class diagram), timing diagram (sequence diagram) And so on, there will be a lot of help, so as to find the main business logic to face the object, then the behavior of each object division, and finally realize the integration between the object and communication.
3. Design pattern and frame structure
Java is not difficult from a language perspective, but we also need to understand some of the advanced application frameworks in terms of overall design. Mastering the Java language alone is not enough if you want to design a good frame structure. This involves a design pattern, as well as some knowledge related to design patterns.

Design Patterns in the Java project implementation process is the most serious. Mainly in the design mode with two layer, three layer design mode and n layer design mode. It directly determines the application, deployment and actual development design of the project.

Many of the common Web projects use two-tier development constructs. Jsp+servlet or Jsp+javabean. The three-tier development structure of MVC, or Jsp+servlet+javabean, is used in projects where development requirements are high. It allows developers to focus on their own development by separating logical development into an effective way. At the same time, the entire development structure process is clearer, but requires a relatively high degree of development coordination.
In the project, we often use the well-known model-view-controller (MVC) architecture. The MVC architecture is proposed with the development of Smalltalk language language, which is a well-known user interface design architecture. The classic MVC architecture divides a component (a module that can be thought of as an entire application) into three parts of the model to manage the data and business logic used in this module. And how the View management module is displayed to the user, the Controller decides how to handle the events generated when the user and the module interact, such as clicking a button.

4. XML Language


In the server and design pattern structure will be applied to the customization file, and in the application of advanced design will also define their own tags, now popular is to use XML to define the configuration, so the XML language should have a certain grasp. Currently, the Java 2 Platform Enterprise Edition (EE) architecture is highly regarded in the vendor market and the developer community. As a tool, Extensible Markup Language (XML) simplifies data exchange, interprocess messaging, and becomes increasingly appealing to developers and becoming popular. Naturally, the idea of accessing or integrating XML solutions in the Java EE architecture is tempting. This will be a combination of a powerful system architecture and a highly flexible data management solution.

XML applications seem to be endless, but they can be broadly divided into three broad categories:
1. Presentation and exchange of simple data (Simple API (SAX) and Document Object Model (DOM) syntax parsing for XML, different document type definitions (DTDs) and Profiles (schemas))
2. User interface-related, presentation-related contexts (Extensible Stylesheet Language (XSL), Extensible Stylesheet Language Transformations (XSLT))
3. Message-Oriented computing (XML-RPC (remote Procedure Call), SOAP protocol-based Web service (Web services), Electronic Business XML (EbXML))

5. Web scripting language

In order to improve the overall performance of Web projects, improve the friendly interface of human-computer Interaction, Web page scripting language is very useful, and sometimes can solve a lot of problems or improve the performance and application of the program.

The execution of the Web scripting language is performed at the client, is very fast, and most of the operations do not interact with the server, so it is ideal in some applications. The scripting language of Web pages plays a role in designing Web project applications, so if you are designing Web project applications, you should have a certain understanding of JavaScript. JavaScript is a scripting language that is Object-Based-based and event-driven (driven) and has security performance (secure). It is used in conjunction with HTML Hypertext Markup Language, Java scripting language (Java applet) to link multiple objects in a single Web page, interacting with web customers. So that you can develop client applications and so on. It is implemented in the standard HTML language by embedding or inserting. It has the following basic features: 1. It is a scripting language
JavaScript is a scripting language that implements programming in the form of a small program segment. Like other scripting languages, JavaScript is also an explanatory language that provides an easy development process.
Its basic structure form and C, C + +, VB very similar. But unlike these languages, it needs to be compiled and interpreted on a row-by-line basis in the course of a program's operation. It is combined with the HTML identity to facilitate the user's use of the operation. 2. Object-based language.
JavaScript is an object-based language that can be viewed as an object-oriented one. This means that it can use the objects that it has created. Therefore, many functions can be derived from the interaction of the methods of the objects in the scripting environment with the script. 3. Simplicity
The simplicity of JavaScript is mainly reflected in the following: First, it is a simple and compact design based on Java basic statements and control flow, which is a very good transition for learning java. Second, its variable type is weakly typed and does not use strict data types. 4. Security
JavaScript is a security language that does not allow access to local hard disks, does not store data on the server, does not allow modification and deletion of network documents, and can only be browsed or dynamically interacted through a browser. So as to effectively prevent the loss of data. 5. Dynamic Nature
JavaScript is dynamic, and it can respond directly to user or customer input without having to go through a Web service program. It responds to the user in an event-driven manner. Event-driven refers to the action that occurs when an action is performed on the home page, called an event. For example, pressing the mouse, moving the window, selecting a menu, and so on can be considered as events. When an event occurs, a corresponding event response may be caused.

6. Development tools (1), DatabaseIn the main application, the database related link application is many, therefore must have the understanding to the database. It is not possible to understand only one database, because many database solutions are presented in many practical developments, so there is only one comparison scenario if you understand multiple databases. The database should be aware of his performance and some basic operational knowledge, as well as the characteristics of the database. The development of database for Java language Web project is mainly the application of JDBC, as well as the application of advanced concepts such as database transaction processing and connection pool.

(2), Web serverAs with databases, you should understand the performance, features, and common sense of the server. In the application aspect, the Web server is mainly for configuration and deployment, configuration of directories, debugging, modification of profile properties, control of access rights and concurrency, deployment of Java classes, etc.
(3), Integrated development Environment (IDE):
"Public desire good things, its prerequisite." For Web application developers, a good integrated development environment (ide:integrated development enviroment) is very important. An integrated development tool that currently dominates the market is eclipse.

What technology does Java Web project development need to master?

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.