Java framework Summary (found)

Source: Internet
Author: User

Pattern. It is actually a methodology for solving a certain type of problems. You sum up the methods for solving a certain type of problems to the theoretical level, that is, the mode.
Alexander's classic definition is that each mode describes a problem that is constantly emerging in our environment, and then describes the core of the solution to the problem. In this way, you can use existing solutions countless times without repeating the same work.
The mode has different fields, the construction field has the construction mode, and the software design field also has the design mode. When a domain gradually matures, many models will naturally emerge.

Framework. In fact, it is a semi-finished product of an application, that is, a group of parts for you to choose to complete your own system. Simply put, you can use a stage set up by others to perform performances. In addition, the framework is generally mature and constantly upgraded software.

Mode is a kind of guidance. Under a good guidance, it will help you complete the task, and help you make a good design solution to get twice the result with half the effort. In addition, we can find the best solution to the problem. The framework is generally mature and robust. It can handle many details of the system, such as transaction processing, security, and data flow control. There are also frameworks that are generally used by many people, so the structure is very good, so the scalability is also good, and it is constantly upgraded, you can directly enjoy the benefits of other people upgrading code. The framework is generally located at the intermediate layer between the low-level application platform (such as J2EE) and the high-level business logic.

Common Java frameworks include:
WAF:
Full name: Web Application Framework
Main Application: EJB layer (web layer also exists, but it is relatively weak ).
Main application technologies: EJB, etc.
Source: http://java.sun.com/blueprints/code/index.html
Brief description: this is an example that Sun used to demonstrate the J2EE platform. The framework in PetStore is as follows. It is the application framework proposed in the sun blue book example program. It implements MVC and other good design patterns. Sun's website has technical information. It is best to download PetStore for research. WebLogic comes with this system. The source code is Bea/weblogic700/samples/Server/src/PetStore. This is the preferred framework for learning about J2EE.
Free of charge.

Struts:
Main Application: web layer.
Main application technologies: JSP, taglib, JavaBean, XML, etc.
Source: http://jakarta.apache.org/struts/index.html
Brief description: this is an open-source project of Apache, which is widely used at present. Based on the MVC mode, the structure is good and Based on JSP. In jbuilder8, struts1.02 has been integrated.
Free of charge.

Briefly describe the example of combining WAF with Struts: struts for the web layer and WAF for the EJB layer:
JSP (taglib)-> actionform-> action->
Event> ejbaction> EJB> Dao> Database
JSP (taglib) (forward) <-Action <-eventresponse <――

Turbine:
Main Application: web layer.
Main application technologies: servlet, etc.
Source: http://jakarta.apache.org/turbine/index.html
Brief description: this is an open-source project of Apache. Based on servlet. It is said that the speed is relatively fast, and various services are provided based on the Service (Pluggable implementation pluggable Execution Component) method.
Free of charge.

Cocoon:
Main Application: web layer.
Main application technologies: XML, xsp, Servlet, etc.
Source: http://cocoon.apache.org/2.0/
Summary: this is an open-source project of Apache. XML-based and xsp-based (generally speaking, xsp is a dynamic XML document formed after Java program segments are added to XML static documents .). It can interact with a variety of data sources, including file systems, databases, LDAP, XML resource libraries, and network data sources.
Free of charge.

Echo:
Main Application: web layer.
Main application technologies: servlet, etc.
Source: http://www.nextapp.com/products/echo/
Brief description: an open source project of nextapp. Based on servlet. The page can be very beautiful. Combined with echopoint, you can make a lot of graphic effects (jfreechart package is used in it ). Use the swing idea for web pages and use HTML as a Java class. However, when a large number of sessions are used, there are a lot of page frames, which consumes a lot of system resources.
Free of charge.

Jato:
Full name: Sun ONE Application Framework
Main Application: web layer.
Main application technologies: JSP, taglib, and JavaBean
Source: http://www.sun.com
Brief description: this is a commercial framework launched by Sun. It is known that it is based on Sun ONE's platform. I downloaded jato2.0 and looked at it. It seems a bit simple. I used JSP + taglib + JavaBean. As his doc says, Jato is suitable for small web applications.
Free of charge.

TCF:
Full name: Thin-client framework
Main Application: Java GUI.
Main application technologies: Java application
Source: http://www.alphaworks.ibm.com/tech/tcf
Summary: this is a framework developed by IBM. Based on the MVC mode and Java application. I recommend an introduction to: http://www-900.ibm.com/developerWorks/cn/java/j-tcf1/index.shtml

I have been learning various Java framework technologies for the last two months, and the gains are still quite large. Different frameworks have their own highlights. At this stage, we mainly look at their design concepts and related concepts. Therefore, we mainly look at them and there are not many coding ideas.

Main frameworks: struts, webwork2, tapestry3, and spring.
Database Object relationship ing framework: hibernate, Caster, ibatis
Concepts involved: MVC, IOC, Di, and AOP
There are other well-known frameworks

1. Struts, originally learned something about Java last year, but I did not study it more deeply for work reasons. I just did a few simple form data verification and submission programs. At the beginning, I thought he was very efficient. Now he is not very good at his rating on the internet. "advantages: low learning curve, easy to use, suitable for beginners. Because it has been around for a long time, he is a mature product and has learned a lot. Disadvantages: Modification and debugging of JSP + taglib pages is quite troublesome, and the system configuration is also cumbersome ". Struts is currently the most widely used, and is also the basic requirement for most companies to recruit programmers. Last month, I simply looked at him again, but it was not too deep.

2. webwork2: I saw it at the beginning of the year. At that time, the company was working on a project using an "open-source system". The system used webwork, webwork, and webwork2. Due to the great difference, they did not study in depth, besides, I modified the code of the controler layer of the system, which does not involve webwork. At the end of last month, I learned it again. I made a few simple examples and roughly read its official documents. Development efficiency should be similar to struts, but the configuration of webwork2 should be relatively simple. The biggest advantage of webwork2 is its good view layer design. It supports JSP, taglib, velocity, freemark, etc. The learning curve of webwork2 is slightly higher than that of struts, and there are relatively few materials. However, he and Struts feel a little like close relatives. As long as he learns one of them, it is much easier to learn the other.

3. tapestry3: It took me nearly a month to work on this item. He and Struts and webwork2 are completely different from each other. The learning curve is very high and there are very few learning materials. He advocates the concept of a group key, and the development process is a bit like winform. The PDF document of "tapestry in action" that I read in the first week is very painful. In the second week, I started to use it as a daily travel management system for the company. After three weeks, all the basic functions were completed, and the rest of the changes were handed over to other colleagues, it's okay. When I first started using it for development, I felt awkward. I felt that it was inefficient because it was not suitable for many places. After a while, I gradually got used to it and found that it was quite convenient to use it. Because it has too little information, it is depressing to have a deeper understanding of its source code. Tapestry4 is already in the testing stage. tapestry4 has a great improvement over tapestry3. It integrates hivemind. After the integration, tapestry becomes an additional package of hivemind, in this way, tapestry4 will become a close friend of sping, because their design goals are the same.

Struts, webwork2, and tapestry3 mainly focus on form processing. After the form data is transferred to the controler layer, the controler layer does not care about how to process the data. Different from them, spring uses the IOC design and di design to work at the controler layer and model layer.

4. Spring provides a wide range of functions, but it is difficult to use and configure. Therefore, when selecting a framework, more companies will choose struts and webwork. Spring's biggest highlight is its bean management function, which provides a great deal of Transaction Management for database operations. This function is not available in other frameworks, therefore, it is usually used in combination with other frameworks.
Struts + spring + others
Webwork + spring + others
Tapestry + spring + others
The daily travel management of the company I mentioned above is done using "tapestry + spring + hibernate ".

5. hibernate. This is a big metric. I don't need to know much about it.
Better support for caster and XML and poor paging Functions
Ibatis is easy to use. You can write SQL statements in the configuration file.

6. For IOC design and di design, you can refer to the documents of spring and hivemind1.1. Spring and hivemind1.1 both implement bean management. However, hivemind1.1 is rarely used. The document organization on his official website is messy and it is difficult to learn through its official documents.

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.