i wondering xml serialization. if understand correctly, main reason using lets transport object data more easily, right? also, tried serializing data using constructor says that can serialize data "parameterless". thing constructors because allows me have example player class, , adding new player properties more productive having set properties 1 one. big question here is, what's big purpose of xml serialization, ways use it? way see adds level of complexity code, because need class serialize data. can shed light?!
if you're talking overall purpose of serialization, strictly speaking, serialization (note said "serialization," not "xml serialization" - more on in second) doesn't make transporting objects easier, it's only way transport object.
as indicated in pablo santa cruz's answer, xml 1 of many ways can serialize data. if you're going save or send data somewhere, definition must first have way represent it. serialization means represent object state in specified format. deserialization opposite - given representation of object state, reconstruct original object state was.
in sense, xml serialization, saving object state database somehow, saving json, saving in binary format, , saving in xml format examples of serialization (because you're representing object state in pre-defined format later use).
while defined format can technically serialization, there several standard ways of doing that. xml , json far common formats because they're standardized, easy parse, easy constrain (e.g. xml schema), supported libraries, can relatively human-readable (which makes debugging easier), , they're used.
in case last point sounds little odd (they're used because they're used), standards nature tend have strong network effect. in other words, more people adapt them more useful are; example, it's useful have email if can use contact other people - wouldn't useful have email if 1 using it.
a lot of standards , technologies win out on competitors more because have more adapters because they're technically superior. example, if prove os x "better" operating system windows, wouldn't matter because there's vastly more software developed windows , prohibitively expensive people try switch os x. (you make similar argument token ring vs. ethernet).
Comments
Post a Comment