8.5. Summary

In this chapter, you learned all about JavaScript Object Notation (JSON) as an alternative data transmission format to XML. You learned that JSON has several advantages over XML for data transmission needs, including a smaller amount of code to represent the same data and a logical object-and-array structure that most programming languages can understand and use.

You also learned that while JavaScript can understand and interpret JSON natively, there are several server-side libraries that provide the same functionality. You learned about a JavaScript utility for parsing and encoding JSON data, as well as the JSON-PHP library that can be used to do the same for PHP.

The chapter went on to describe how to make an Ajax-assisted autosuggest control that enables you to display suggestions based on what the user has typed. This control works similarly to the way that Google Suggest does and takes into account user interaction with the mouse and keyboard as well as providing for fast typists. This control helped to illustrate the power of simple Ajax solutions.

The next chapter will expand on what you've learned here to create reusable Ajax widgets for your web site. These widgets can use a variety of data transmission formats, including JSON.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset