Java for three months-the fun of Object-Oriented Programming (OOP)-programming life

Source: Internet
Author: User

I found that learning from JSP and then turning to Java is a good process for me. An expert in programming said, "The object-oriented technology has been reduced.ProgramEntry threshold ", I think this sentence can be put into the network technology, changed to" JSP technology reduces the entry threshold for Java programs ". Using JSP technology, you can useCodeFewer statements implement "helloworld ".

JSP technology encapsulates the connection between the client Java code and the network application server, and the backend support of Servlet technology, so that developers can easily encapsulate the program control logic into the web page, generate dynamic web pages. Using JSP/Servlet technology to form the front-end of the J2EE platform, developers can focus more on the independence and Implementation of the backend business logic. This is also the best MVC performance I have seen so far. MVC is the most widely used architecture so far. The structure division of Model-View-controller makes the program structure very clear, the program is more diverse in forms, and the coupling of program functions is more relaxed, the business logic is more independent, which ensures the maintainability and scalability of the system.

Java is a pure OO language, which makes it easy to implement some design patterns in Java. You can easily use design patterns to Improve the Quality of code, you have even "created" A design model, even if you have never touched on it. When we develop JSP in our group, different developers need to use JDBC to deal with the database. At first, every developer tries to use their own connection method. Most people use the simplest drivermanager. the getconnection () method gets the database connection, but soon I found that many web pages and JavaBean have such code. This is a terrible thing: if many web pages need to request the database connection separately, this will cause a great deal of resource occupation and waste, and once the database changes, the system maintenance will be very complex. So I immediately wrote a database connection JavaBean containing the getconnection () static method and handed it to every developer. In this way, the database connection can be easily obtained during the development process, saving the development time. Data connection interfaces are also unified. The static method makes database connection faster. Most importantly, the encapsulation of data connections makes it easy to change the database connection mode. For example, you can easily use the database connection pool to improve system performance. Later I realized that this actually belongs to the fa c Ade mode, even though I didn't know the FA C Ade mode before.

Read full text: http://www.javah.net/chengxurensheng/20070403/41.html

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.