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