SOA, SAAS, cloud computing, and so on. There are a lot of hot-lifting concepts, and many developers are looking to re-examine where future software development will go. And the Open API appears, in fact, the foreign Internet application developers have brought a new kind of innovative thinking, a new development model, the concept of SOA information interoperability throughout the Internet industry, so that more "grassroots" developers to use innovative thinking to maximize the value of the information.
For the domestic developers, in the SNS boom for the first time contacted the Open API, but this is only the beginning. The API provided by SNS, and the APIs provided by some of the existing sharing websites, are just one corner of the open API, and the amount of space that can be created for developers is limited.
A lot of time this year into the Open API integration platform design and development, so for the open API have some of their own gains and feelings, and hope that through the Open API introduction, practice can let more people understand and invest in this emerging development model. This development model is a challenge, and an innovation is an opportunity.
I. Introduction to the Open API development of the Open API
The most important thing about Internet applications is creativity and timely response to changes in these two points. Traditional software to strive for professionalism and quality of service, but piracy, homogeneous competition, customer demand for personalized service support, so that customers and software manufacturers have not been satisfied with the results. The introduction of SaaS model, in fact, partly also shows that the market and customer demand for Internet applications is increasing, long tail theory is to let a lot of grassroots developers see the future. But is the Internet application just the traditional software to move the Internet even if it is to adapt to the trend, innovation and reform? In fact, the Internet to bring The imitation is far more terrible than piracy, software development cycle long, version iteration cycle long, so that the traditional software development model under the development of staff to meet user needs. And the most important creative, traditional software focus on specialization, and specialization is what we used to say SOA needs to solve the information silo, only the different industry information in tandem, the original data resources will reflect its greater commercial value. So the open API appears, at first it may just be a kind of demand within the Internet enterprise, because the enterprise scale is bigger, the organization internal collaboration also needs the modularization and the service interface, along with the business carding and the abstraction, the service gradually not only can satisfy the internal interaction, simultaneously opens to some business partners, The attendant is that the value of data resources reflects the return of open service enterprises. As more and more Internet enterprises offer their internal business as service to external users, the service release and the normalization of the process are gradually formed. Rest as a lightweight service interaction specification has also been recognized by a new generation of internet enterprises, plus rss,json,xml has been widely used in a variety of data formats, so that the open API has a public foundation, but also for the Open API developers integrated development provides the most basic protection.
The current foreign open API, regardless of the type, provider of service quality, standardization and use of the situation in this year has a great promotion, it can be said that from the initial development to a more mature development. and domestic, on the open enterprise, the provider's service provides the maturity, as well as the security and so on aspect the measure, all is only the beginning, but the benefit is has the model which may draw lessons from. However, next year, as the commercial value of the open API gradually manifests, more people will be added to the new application development model of the Internet, as well as creating opportunities for many developers, especially individuals and small team developers. The internet industry is a small broad industry, when faced with thousands of emerging resources, creativity and action is the cornerstone of success.
The form of the Open API
The form of the open API on the Internet is now divided into two main categories: standard rest and class rest (also known as RPC forms).
RPC form is actually a continuation of the Web service, but less onerous analysis, security norms and so on. Most of the Flickr open API is this form, looking at the following service request URL:
http://api.flickr.com/services/rest/?method=flickr.test.echo&name=value
The service request address consists of two parts: 1. The total entry address of the service is http://api.flickr.com/services/rest/. 2. Service methods and parameters. This is the same as the previous RPC pattern, but only through HTTP, which returns the contents of the format data that can be specified.
There are several main features of rest form: 1. The service address is the resource location address. 2. The service operation is the type of method (Get,post,delete,put) in the HTTP request, which is actually an abstraction of the service in the abstract reality to check the operation. Most of Google's Rest API uses a standard restful style, and the service request address URL is as follows:
http://www.google.com/calendar/feeds/wenchu.cenwc@alibaba-inc.com/allcalendars/full
This service request address is used to locate all the schedules of Google accounts registered with my Alibaba mailbox and to operate on my schedule by configuring GET, Post, DELETE, and put on the HTTP header without landing on Google. (Part of the practice in the next section describes how to operate directly through background Java code)
The discussion of rest forms has been on the web, but in fact, this discussion has no meaning, in fact, it is like arguing whether eating must use chopsticks, there is no technology is "panacea", there is no technology better than bad, only the use of its people have enough wisdom to apply it to the appropriate scene.
The advantage of the rest-like form is that the transformation of the original system is smaller, the "current" user acceptance is higher, and it is easier for logical abstraction. The advantage of rest style is that the resource is easy to manage, the system expands easily, and the permission control can be depended on the existing transport protocol in part. The disadvantage of both is actually the other side's advantages. Take what mode, in fact, according to the enterprise itself, similar to the use of Taobao is the rest of the way, and future Alipay will be the rest of the way, the former to transform the entire system architecture and resource data structure is basically less likely to complete the task, The latter is not difficult to comb the business logic and to abstract the rest-style APIs under the existing internal SOA architecture system. But in the end, the form is just external, the practice of the people to cultivate good internal force is fundamental, there is no need to meet a so-called trend and blindly choose the form, because the service provider will face higher than the site of hundreds or even higher traffic access calls, how to meet the developer business and non-business (stable, efficient, Security) is the greatest challenge.