About the use of Java to develop MIS system related content.

Source: Internet
Author: User
Tags html form

How to develop a small information management system using the Java programming language, first we need to know what method to develop the system.

1, Java Simple basic knowledge:

(1) Java's three technical architectures:

1) Javaee:java Platform Enterprise Edition, the development of applications under the environment of enterprises, mainly for the development of web programs;

2) Javase:java Platform standard Edition, complete the development of desktop applications, is the basis of the other two;

3) Javame:java Platform Micro Edition, the development of electronic consumer products and embedded devices, such as mobile phone programs;

(2) Java Syntax Basics:

1) keywords;

2) identifiers;

3) constant;

4) variables;

5) data type;

2, Jsp+servlet+javabean:

JSP is the server-side programming language, see more is on some sites (of course, not only this) JSP is developed by the servlet, we first explain what the servlet servlet is the Java server-side programming components, can be used to generate dynamic Web pages. What do you call dynamic? For example, visit the West Shrine, why each visit to our version, with the same domain name, but the content is different each time? Of course, it is not possible to use a static page of pure HTML, because the dynamic element is added (the West Shrine uses ASP). The servlet provides a way to write business logic that can be handled automatically, such as postings here, and so on, if you are familiar with HTTP you will be more aware of this. In short, the servlet for the server, you can also be a simple one-sided understanding for the Web site JSP is what? Because the servlet generation page is not very convenient, especially for non-Java professionals, so the evolution of a language, its syntax is java+html, you see a few source program to understand. In fact, all of the JSP to be automatically translated into a servlet to work, it is only easy to program, so popular JavaBean is a component, often used to provide JSP some auxiliary functions, such as people used to write pages with JSP, So some complex business logic put together on the chaos, so with JavaBean encapsulation, in fact, JavaBean is the ordinary Java class, but a few more features.

MVC is the abbreviation for three words: M,model (model), V,view (view), C,control (Control).

The purpose of the MVC pattern is to realize the functional division of the web system.

Model layer: Implement the business logic of the system, that is, the JavaBean part

View layer: Responsible for interacting with the user, that is, to display the data objects on the interface to the user, i.e. html,jsp

Control layer: A bridge between model and view that can dispatch a user's request and select the appropriate view for display, and it can also interpret the user's input and map them as executable operations of the model layer, which is, of course, the responsibility of the servlet.

3, Struts+hibernate+spring

Java three frameworks are used to make Wen applications. Struts is primarily responsible for presentation layer display spring uses its IOC and AOP to handle the control business (responsible for database operations) Hibernate is primarily the persistence of data to the database When using the JSP servlet to do Web page development, there is a mapping file with Web. XML, there is a mapping tag is used to do file mapping. When you enter the URL address in the browser, the file will be based on the name you write to a Java file, according to the content written in the Java file displayed in the browser, is a Web page, so the page name is casually written, random name, whatever you get up is. php. jsp. Do or everything else corresponds to this Java file, the code in this Java file to do what to do, display a word or connect the database or jump to other pages and so on, this Java file to encapsulate the data for security and easy to manage the role. In fact, this Java file compiled is a. Class of a bytecode file, there is not a similar HTML embedded tags and code page file. The difference between him and the JSP file is that the JSP embeds the code in the HTML tag.   And the commit name in the action of the servlet or the HTML form in struts corresponds to a Java file, and struts is generally. Do, which is mapped as above .

1) Struts framework: Struts is open source software.

Struts is used to help us reduce the time it takes to develop Web applications using the MVC design model. Struts is a good choice if we want to mix the benefits of Servlets and JSPs to build scalable applications.

1. Process: After the server starts, read the Struts-config.xml file contents to memory according to Web. XML Load Actionservlet.

2. Architecture: Struts provides the corresponding components for both Model,view and controller. Actionservlet, this class is the core controller of struts and is responsible for intercepting requests from users.

Model part: Composed of JavaBean, Actionform used to encapsulate the user's request parameters, encapsulated as Actionform object, the object is Actionservlet forwarded to the action, The action processes the user's request based on the request parameters inside the Actionfrom. The JavaBean encapsulates the underlying business logic, including database access.

View section: This part is implemented by JSP. Struts provides a rich library of tags that can reduce the use of scripts through a tag library, and a custom tag library enables effective interaction with the model and adds real-world functionality. The corresponding JSP part.

Controller components: Controller components are composed of two parts-the system core controller, the business logic controller.

(1) System core Controller, corresponding to the Actionservlet. The controller is provided by the struts framework and inherits the HttpServlet class, so it can be configured as a callout servlet. The controller is responsible for intercepting all HTTP requests and then deciding whether to transfer to the business logic controller based on user requests.

(2) The business logic controller, which is responsible for processing the user request, does not have the processing power, but calls the model to complete processing. Corresponds to the action section.

2) Spring Framework

Spring is a powerful framework that solves many of the problems that are common in the development of Java EE. Spring provides a consistent approach to managing business objects and encourages the injection of interface programming rather than the good habits of the classes. The schema base of spring is based on the inversion of control container that uses the JavaBean property. However, spring is unique in using the IOC container as a complete solution for building play that focuses on all architectural layers. Spring provides a unique data management abstraction that includes a simple and efficient JDBC framework that greatly improves efficiency and reduces possible errors. Spring's data Access architecture also integrates hibernate and other O/R mapping solutions.

3) Hibernate frame

Hibernate is an object-relational mapping framework for open source code, and the Philadelphia Lightweight object encapsulation is awakened to JDBC, allowing Java programmers to manipulate databases with arbitrary objects. Hebernate can be applied to any JDBC application, either in Java client programs or in servlet/jsp Web applications, and hibernate can replace CMP in the EE architecture of the EJB application. The task of achieving data persistence

Hibernate has a total of 5 core interfaces: Session, sessionfactory, Transaction, query, and configuration. These 5 core interfaces will be used in any development. Through these interfaces, you can not only access persistent objects, but also enable transaction control.

4. Ajax:

Ajax is "A Synchronous J Avascript and X ML "(Asynchronous JavaScript and XML) is a Web development technique that creates an interactive Web application. AJAX = Asynchronous JavaScript and XML (a subset of standard generic markup languages).

AJAX is a technique for creating fast, Dynamic Web pages. AJAX enables Web pages to be updated asynchronously by exchanging small amounts of data in the background with the server. This means that you can update a part of a webpage without reloading the entire page. Traditional Web pages (without AJAX) if you need to update the content, you must reload the entire page page.

The core of Ajax is the JavaScript object XMLHttpRequest. This object was first introduced in Internet Explorer 5, which is a technique that supports asynchronous requests. In short, XMLHttpRequest allows you to use JavaScript to make requests to the server and handle the response without blocking the user.

Ajax does not require a server, it can be a Java EE application. NET applications and other types of application services. With Ajax, you can write JavaScript code to improve HTML and create a rich interactive user experience.

About the use of Java to develop MIS system related content.

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.