Chapter 16. Using WDDXIN THIS CHAPTER Introducing WDDX 409 Using WDDX with ColdFusion 412 Anatomy of a WDDX Packet 420 Using WDDX Packets to Store Information in Files 423 Other Places to Store WDDX Packets 437 Exchanging WDDX Packets Among Web Pages 439 Binary Content in WDDX Packets 446 When you're developing Web applications with ColdFusion, you often deal with complex chunks of data, such as structures, recordsets returned from queries, and arrays. Often, you need to save that data to disk, store it in a database, or move it from one place to another. Sometimes you even need to pass these chunks of data between environments. For instance, you might want to move information from ColdFusion to JavaScript or from a .NET application to PHP or Java or ColdFusion. Yet the easiest way to store and share information is just to use ordinary ASCII text. If you had some way to turn your recordsets, arrays, and structures into blocks of ordinary ASCII text and back again, it would be easy to store that text in files or databases, exchange it via HTTP, pass it around in Web pages or email messages, and more. This chapter introduces the Web Dynamic Data Exchange (WDDX) format, a simple XML vocabulary that makes it painless to convert any type of complex data structure to text and back again. |