Several restful Java frameworks

Source: Internet
Author: User
Tags http authentication

Currently, the declared restful Java frameworks include the following:
Restlet (http://www.restlet.org /)
Cetia4 (https://cetia4.dev.java.net /)
Apache axis2 (http: // http://ws.apache.org/axis2)
Sqlrest (http://sqlrest.sourceforge.net /)
Rest-art (http://rest-art.sourceforge.net /)

The following provides a comprehensive analysis of these frameworks.

Restlet, latest version 1.0.1
Feature: servlet APIs are completely discarded. As an alternative, you have implemented a set of APIs. Supports complex rest architecture design.
Disadvantages:
1. Although it can also run in Web containers, it is difficult to use resources such as Servlet and JSP. Because you need to learn another set of APIs and concepts, the learning cost is relatively high.
2. HTTP sessions on the server are not supported at all, and development is based entirely on the stateless server model. It is difficult to develop browser-based applications.
3. It does not include integration with spring. You can use third-party code to integrate with spring, which is difficult to integrate.
4. The document is not very rich, and most of the documents are short. You may need to read the code yourself or go to its wiki to search for it.
5. There is no built-in international support.
Advantages:
1. There is a built-in HTTP authentication mechanism and no additional security mechanism is required.
2. high flexibility, support for more rest concepts, and transparent content negotiation. It is suitable for developing more powerful REST components (not limited to server applications ).
3. Zero configuration file, all configurations are completed through code.

Related Resources:
Features: http://www.restlet.org/about/features
Introduction: http://www.restlet.org/about/introduction
Tutorial: http://www.restlet.org/documentation/1.0/tutorial
FAQ: http://www.restlet.org/about/faq

Cetia4, Latest Version 1.0
Features: developed based on servlet APIs, it can run in all web containers.
Advantages:
1. resources such as servlet APIs and JSP can be fully utilized. There are few additional learning concepts and the learning cost is low.
2. for traditional Web applications, HTTP sessions can be used on the server side. For Web service applications, HTTP sessions are not used and developed based on the stateless server model.
3. It includes support for Web MVC, which is easy to understand by developers who are familiar with the Web MVC framework. The built-in functions such as parameter ing and parameter verification are also supported by the traditional Web MVC framework.
4. the built-in concept of its own navigation object stack is very helpful for supporting the development of traditional Web applications (browser-based navigation.
5. jsp tag library is provided, which is very helpful for traditional web development based on HTML forms.
6. Support the combination of sitemesh and sitemesh to support the reuse of page layout.
7. built-in integration with spring is very easy to integrate.
8. The configuration file is completely based on the standard web. XML, and no additional configuration file is required. A large number of default configurations are usually enough to meet common requirements.
9. Good documentation.
10. built-in international support.
Disadvantages:
1. There is no built-in HTTP authentication mechanism, and you need to develop a security mechanism on your own.
2. weak support for content negotiation. Only HTML and XML formats are supported. It must be extended to support the performance of other formats.

Related Resources:
Tutorial: https://cetia4.dev.java.net/files/documents/5545/38989/cetia4_tutorial.pdf

Axis2, latest 1.2
Features: supports both soap and rest-style Web Services.
Disadvantages:
1. Only get and post methods are supported.
2. Web services are exposed only in the rest style. The data format is still XML containing soap encapsulation and cannot be used in a more effective format.
3. Only synchronous calling is supported.
4. It only provides minimal support for exposing Web Services in soap mode, and does not support comprehensive rest architecture design.

Related Resources:
Introduction: http://ws.apache.org/axis2/1_2/rest-ws.html

Sqlrest, latest version 0.3.1
Features:
1. provides Web service access interfaces for any database that can be accessed through JDBC, and automatically converts HTTP requests in the rest style to corresponding database SQL statements, the records in the database are encoded in XML format and sent to the client. Is a direct ing of restful HTTP requests to data in the database.
2. servlet-based API development.
Disadvantages:
1. Because it is a direct ing between restful HTTP requests and SQL statements, it is mandatory to use a data modeling design method centered on SQL and relational databases, and does not support object-oriented design. Low flexibility makes it difficult to implement complicated business logic.
2. Because the definition of resources is limited to database tables, it is difficult to achieve high-level abstraction, which will inevitably lead to very fine-grained APIs. The performance and scalability of applications are hard to guarantee.

Related Resources:
Tutorial: http://sqlrest.sourceforge.net/5-minutes-guide.htm

Rest-art, latest 0.2
Feature: A rest framework designed to replace the complex soap framework, used as a tool to replace soap to easily publish Web Services. It is not developed based on servlet APIs.
Disadvantages:
1. It is still in its infancy and has few features.
2. Not based on servlet APIs, it brings additional learning costs.

 

Related Article

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.