XML processing in Ajax, part 3rd: Using JSON and avoiding the use of proxies

Source: Internet
Author: User
Tags final json

Introduction: Ajax-style server calls do not necessarily use XMLHttp requests. The last part of this series introduces the final method of the weather panel, implemented using WEB public service JavaScript Object notation (JSON) and dynamic script markup.

The first two sections describe three ways to create reusable weather panels. These methods use the asynchronous javascript™+ XML (Ajax) technology, especially the JavaScript XMLHttpRequest object to implement the weather Panel library. These methods use some form of WEB proxy to move XML weather data from National Weather Service (NWS) XML to my server to avoid the same domain problem with Ajax.

The 1th part of this series discusses the same domain problem in detail, limiting the XMLHttp request to the same server that provides the original Web page for security reasons. In fact, many Ajax applications need to go beyond one server-wide range of data. The design must therefore be determined to access the Web server configuration (such as creating Apache proxypass rules) or to create specialized server scripts.

Practice has proved that there is another way. It avoids the same domain problem and the programmer does not have to deal with the tasks described above.

Method 4 the tools needed

Before we discuss the final implementation of the weather Panel library in detail, let's first introduce the tools you need:

Yahoo! Pipes

Json

Dynamic Script Markup

Yahoo! Pipes

Yahoo! Pipes is a web-based tool that aggregates different types of data that can be accessed through the web, such as RSS feeds. Yahoo! Pipes is created using the graphical editor (Figure 1) editor, which runs in a standard Web browser, such as Windows®internet explorer® or Firefox.

Figure 1. Yahoo! Pipes Editor

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.