Without WebService WCF services, use rest for a lighter weight

Source: Internet
Author: User
Tags representational state transfer

Service-based development has started since 2005, and by 08 Microsoft and Sun have provided a number of service-based development frameworks.

The service-based framework of the Microsoft. NET platform is mainly:. NET Remoting, WebService, heavyweight WCF frameworks.

With the development of Internet technology, ASP. NET WebForm is gradually replaced by ASP.

It is believed that the lightweight RESTful service framework such as the ASP. NET MVC WEB API in the direction of Internet services development should also gradually replace WCF. Not the WCF framework is bad, and it's nice to have a lot of built-in stuff, too heavyweight.

There are also many service frameworks based on the rest-style standard in Java.

[Introduction to rest by Baidu Encyclopedia]

Representational State Transfer (English: representational, Transfer, or rest) is a software architecture style proposed by Dr. Roy Fielding in his doctoral dissertation in 2000. It is a design and development method for Network application , which can reduce the complexity of development and increase the scalability of the system. currently in three mainstream Web service implementations, the rest-mode Web service is significantly more concise compared to the complex SOAP and xml-rpc , More and more Web services are beginning to be designed and implemented in restful style. For example, Amazon.com provides close-to-rest-style Web services for book searches, and the Web services provided by Yahoo are restful.

Recently a service is being done using a REST service framework in Java.

See rest frameworks in Java below

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/)

Jersey (http://Jerseyjava.net)

Finally, Jersey was chosen. The following configuration procedures are described below.

1. First download the Jersey Jar package. I chose the 1.8 version.

2. Create a blank Dynamic Web project with Java Eclipse.

Introduce the Jersey Jar package into the Lib directory such as:

3. The configuration file corresponds to the adjustment. It's not posted here. You have not downloaded to see it.

4. Start writing the demo, the code implementation is very simple. No code is posted. Everybody crossing to see to understand.

is the directory structure diagram:

Attached:http://download.csdn.net/detail/gwxyyuqiang/7691835

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.