Board index » off-topic » Re: XML versus textbased DFM

Re: XML versus textbased DFM


2008-01-14 06:56:01 AM
off-topic9
Marco Caspers wrote:
Quote
and can also leave out some of those properties that are set by
default..
If there were defaults, they wouldn't be in the DFM either though.
--
TJSDialog - TaskDialog for other operating systems:
www.jed-software.com/jsd.htm
Visual Forms IDE Add In: www.jed-software.com/vf.htm
Blog: jedqc.blogspot.com
 
 

Re:Re: XML versus textbased DFM

Very nice. It would be interesting to see the result when you are done :)
I'm trying to convince Allen Bauer that XML format in .dfm files is the way
to go. He tells that you get a size and speed overhead, but I can't see that
as true (in his blog comments). Size is smaller, and speed could be just the
same (as long as they don't use MSXML, but a serial top to bottom parser
saving properties as it traverse the XML).
-Atle
 

Re:Re: XML versus textbased DFM

This was just a fast sample with some manual editing, and I did not run it
through any checks. Only provided for a quick demonstration.
But thanks for the adjustment :)
-Atle
 

{smallsort}

Re:Re: XML versus textbased DFM

Quote
As you can see, the XML file is smaller than the normal DFM file.
I prefer the "one property per line" strategy of the dfm. This:
<fmMain class="TfmMain" Left="416" Top="45" ClientHeight="745" ClientWidth="781" Color="clBtnFace">
isn't very SCC-friendly IMHO.
 

Re:Re: XML versus textbased DFM

Atle Smelvfr wrote:
Quote
Or you could change the layout style:

<fmMain>
<Class>TfmMain</class>
<Left>416</Left>
<Top>45</Top>
That would certainly make the files larger. XML wasn't the buzzword it
is now.
I think it is overkill and also if an XML parser can be fast, then
there is no reason they couldn't improve the text dfm parser to be just
as fast.
--
TJSDialog - TaskDialog for other operating systems:
www.jed-software.com/jsd.htm
Visual Forms IDE Add In: www.jed-software.com/vf.htm
Blog: jedqc.blogspot.com
 

Re:Re: XML versus textbased DFM

Quote
>Or you could change the layout style:
>
><fmMain>
><Class>TfmMain</class>
><Left>416</Left>
><Top>45</Top>

That would certainly make the files larger. XML wasn't the buzzword it
is now.
True, and that's why I did not show this "solution" the first place. I just
wanted to demonstrate that you could use it in many ways.
Quote
I think it is overkill and also if an XML parser can be fast, then
there is no reason they couldn't improve the text dfm parser to be just
as fast.
This entirely depends on how many special cases you need to look for in the
current .dfm logic. Using speed as an argument against XML is not something
I would recommend, because the difference will be minimal or nothing when
done right.
The thing with XML is that it is a standardised format, and could help for
any build process etc. you might have. The other thing is that it would make
this format good also for normal object save/load, and not just something
for visual VCL stuff. So you could have one format for all, and easy display
data, import, eksport, etc.
-Atle
Quote

--
TJSDialog - TaskDialog for other operating systems:
www.jed-software.com/jsd.htm
Visual Forms IDE Add In: www.jed-software.com/vf.htm

Blog: jedqc.blogspot.com