Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ColdFusion: Does anyone use WDDX?

I'm working on a ColdFusion site where data is stored in WDDX packets inside a database and it's a real pain. (I have no idea why the values aren't just stored in another table.)

I've not used WDDX before and the only documentation I can find about it seems quite old. So I'm curious if anyone still uses WDDX, and if so, what for?

like image 755
nedlud Avatar asked Jun 23 '09 06:06

nedlud


1 Answers

I use WDDX for storing configuration values in a small app that requires no database. I could use an ini file and GetProfileString(), but WDDX is a lot more convenient.

It is XML, so in theory you could use it to do AJAX (in the original sense). Especially because there was no native support for JSON until CF8.

You could also use it as a input for XSL transformations, so you don't have to make up your own XML to represent CF data types like structs or queries.

Last but not least you can use it as an extensible way of storing varying structured data in a database (log messages that cover different cases, for example). I'm not sure why this is a pain in your case, but maybe it's more of an architectural problem than a WDDX problem (?).

It boils down to this: It is handy to have quick and simple, yet portable and safe (no Evaluate() or custom plumbing required) way of serializing and de-serializing (i.e. "storing" or "persisting") any CF data type.

like image 77
Tomalak Avatar answered Sep 24 '22 09:09

Tomalak