• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 20. Sharing Data with WDDX > Storing WDDX Packets

20.3. Storing WDDX Packets

So far, in this chapter, we have covered all sorts of techniques for serializing and deserializing WDDX packets. All our examples have shown the serialization and deserialization process occurring on the same page. While great for illustrative purposes, the examples have little practical application. After all, why would you want to serialize and then deserialize a packet on the same page? This leads us to the topic for this section—storing your WDDX packets so that you can refer to them later. There are two ways you can store WDDX packets: in a text file or in a database (including LDAP directories). The next two sections discuss these two methods and provide examples of both storing and retrieving packets.

20.3.1. Storing Packets in a Text File

One of the most interesting things about WDDX is you can use it to store for data without having to write the data to a database. For example, record-set data stored in a WDDX packet is much more useful than it is when it's stored in a delimited text file. Example 20-8 takes a query object and serializes it to a WDDX packet. The resulting WDDX pack is then written to a text file using the CFFILE tag.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint