Hey Shawn,

> I'll try. ;)
> 
> Basically, XML is great for preserving stateful data, but not 
> really useful for editing it.

OK, now I get it :)

Yeah, compared to a pipe-separated text file, it is harder to edit. But to
say XML is not hand-edit-friendly is a stretch, IMO. 
Compare the standard tools available for pipe-separated text files to those
for XML editing and management.

> > Good point... It seems only ">" is valid as contents of an 
> > attribute.
> 
> Even that may be changed in future patches to IE.

The fact that ">" is interpreted as valid, yes. Which characters are valid
as attribute text, no.
That's dictated by the XML standard, so it's not likely to ever change.

> > On the other hand, if we're to build a UI for configuration, proper 
> > encoding takes care of itself.
> 
> But that's another layer (unnecessary, I might add) of 
> scripting to encode and then decode it.

To present a management UI to the user, you still have to write a layer to
edit and query the text file... 
The difference is, with MSXML, the majority of that code is written and
working -- with the text file one us has to do it.

OTOH, if you mean that notepad.exe + aliases.txt are sufficient, then I
agree that it's an unnecessary layer. But writing a user-friendly interface
on top of that text file is not something I'd like to do or see done.

> > I haven't seen a single piece of active script in 
> > preferences.js, most of it is just var declarations.
> 
> Here's a couple selections from my own:
> 
> var floaxButtons =
>   Array(
>     Array('images\\ra.png',      'Visit RA',
> 'http://ReliableAnswers.com/'),
>     Array('images\\yahoo!.png',  'YG [Clipboard]', 'vbsx yg 
> ClipboardGetText'),
>     Array('images\\yahoo!.png',  'Yahoo Profile [Clipboard]', 
> 'vbsx yprof ClipboardGetText'),
>
> [...]

How would you have done that if prefs.js was already an XML doc instead?
Probably something like:

        <preferences>
                <clocklongform value=" EEE MMM d, yyyy h:mm A " />
                <!-- etc... -->

                <floaxButtons>
                        <button img="images\ra.png" title="Visit RA"
function="http://reliableanswers.com"; />
                        <button img="images\yahoo!.png" title="YG
[Clipboard]" function="vbsx yg ClipboardGetText" />
                        <button img="images\yahoo!.png" title="Yahoo Profile
[Clipboard]" function="vbsx yprof ClipboardGetText" />
                        <!-- etc... -->
                </floaxButtons>
        </preference>

Compared to a nested array, I think this is cleaner. Of course, your search
may have to enumerate an XML doc, and that may be problematic if you're not
accustomed to MSXML, which is why I think we should provide a wrapping layer
(either a COM object or a script class) that builds structural elements like
an array or collection of data objects.

> > Why do you feel the pressing need to have preferences.js contain 
> > script code, rather than declarative settings?
> 
> Because I use it that way.
>
> I'm still probably the most active user of the floax tool (if 
> anyone else even knows it's there!)

OK, I retract that question, it was stupid. I can see how putting script
code inside the prefs can provide some functionality that would otherwise be
less convenient to add, BUT it's nigh impossible (OK, maybe not that hard,
but hard) to write a good general-purpose UI to configure this stuff. With
XML, it's just so much easier.

- Kim



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Archive: https://lists.sourceforge.net/lists/listinfo/dqsd-devel

Reply via email to