ColdFusion MX (CFMX) Is Easy Using Web Services

One of the main advantages of ColdFusion MX (CFMX) is easy you can build applications using web services.
Why advertise web services and real applications creep down, ease of use make the CFMX development of attractive options. Here I will show how CFMX makes it easy to call a web service, which shows how to query and return data from the interface is web services Amazon.com ‘s have been introduced recently.

 

Before you start, you need to go to Amazon Web Services site, download the development kit and chip development (ie, identity card number) to get. Sending this signal depends on the Amazon Web Services, and is a way to Amazon on their sites as partners in identifying and paying referral sales. Remove the sample is free, and by the members, if required. For example, all you need is the key to development.

 

Do a keyword
To begin, I would like to check Amazon.com to several search terms and display results. Developer’s Kit Documentation is a section that explains the format of the study and explain the structure of the response. There are two things to consider here.

First, the document states that the method keyword requests a search, there are several values ??that must be provided. These are: keyword, page, fashion, label, type, class and devtag. About the variable reported in the literature. At first glance you may think will be the Amazon Web service to call and pass arguments to each of the values, such as the code in Listing A.

But that’s not how it works. It takes “a little digging around and trying, but finally found a solution: Amazon want you to have a single variable, the keyword query the values ??of a table or structure so that the correct approach would be the first to build. Structural investigations and occupied by order of the Amazon as an argument. B contains a list of job codes that describe how the Amazon to find a list of all products as “hell” key words.

You can see that my application search parameters required type of investigation, the set consists of the dispute. Amazon said it will seek the light (not heavy) research, basic information about the product, and therefore faster.

After your application is successful format, which offers various products for research, relevant research in Listing B. Each array element contains information about this product, and shows users how to very easily, as shown in C. Register

You can get information on products such as return the application and documentation are described correctly. In the above example, the loop at the output range of products and a small image (getImageUrlSmall) product name (getProductName), artists (getArtist), and finally price (getListPrice).

You can also see that my name links to the item’s product information. Data for each object Amazon.com link to the article Amazon page for more information on its website, so you can only use this link. But you may not want to distribute Amazon customers first, maybe I want to stay on the website “I am a little more. To do this, a detailed half-page issue.
Amazon Web Services API also supports application ASIN ago, a unique identifier for each product Amazon sells. Through a series of information and specifications ASIN ASIN pages from data such as Amazon, as shown in Listing D, I request access to information about this product. You can ask to see the kind of research is defined here, too heavy, which means that we will return information about the products that I make my first application, which was created to fight.

 

Code in Listing D is the same, previously known as Web services. But this time I was on the first page of the ASIN change the URL. As can be seen from the inlet and outlet is the same as before (code B), but this time, because choosing different weight to the results, I have more information about the product in the workplace.

 

For example, data capture and display the page larger product image, sales network and a few comments, not the details of an application to fight again. API documentation describes all types of data access, the most interesting. You can call the same product, UPC, publisher, age, and the track list.

 

Amazon products are available through the API, including DVDs, software and books. Amazon also offers a way to allow people to add items to your shopping wish list for Amazon, and buy stuff. So if an affiliate, you can actually make money on your website.

Request additional information to consider is looking for writers and special features such as search and tag to your list of Amazon. Code to call the third party web service similar to the example I gave above. Just check the documentation to determine what needs to be special needs of data and format the results will be returned.

We began to reveal the most useful web services, and acceleration. I hope this example shows how easy it is to use ColdFusion MX to use Amazon Web Services. When it comes to Web services allow developers to facilitate the ColdFusion CFMX benefit greatly from a standard of attractiveness.

Comments are closed.