[Mono-devel-list] Re: xml-serialization

ginga at kit.hi-ho.ne.jp ginga at kit.hi-ho.ne.jp
Sun Apr 27 01:23:25 EDT 2003


Hello. Sorry to be late ...

I'm also CodeDOM newbie and may miss the points, but go on...

There seems two issues using CodeDOM. One is a performance issue,
as Adam concerned about, and the other is completeness of CodeDOM
library. MS's xml serialization is considered to create XmlSerializer
once, and serialize many times using it. Code generation is surely
very heavy, but it occurs one time. It is reasonable in a sense.
(I don't know if generated code is faster than other ways in fact...)

There is certain needs to use CodeDOM, because MS's xsd.exe generates
classes in C# or VB.NET, but as to serializer-generated assembly
(derived XmlSerializationReader/Writer), it seems no need, other 
than security consideration (but I have no concrete idea why it is
required).

As to another issue (code generation) I think it would be a little
better to start from TextWriter.WriteLine(), because we might 
frequently change the generated code snippet (or are we simple
copy cat of MS .NET assembly? Then it is ok, too...). It'll be 
only at launching stage and the following stages depend on 
how it requires CodeDOM library.

Anyway I don't think it is important choice, because it is IMHO
independent of basic framework, and (maybe) pluggable (I wonder
if XmlCodeExporter is useful to make it pluggable...?).

Regards,
  Atsushi Eno




More information about the Mono-devel-list mailing list