Wishes for Preferences?

AmigaOS users can make feature requests in this forum.

Re: Wishes for Preferences?

Postby trixie » Fri Jan 10, 2014 4:13 pm

@chris

I know how you feel about XML, we've discussed it before :) But PrefsObjects is fairly simplistic, without unnecessary bloat that XML sometimes incurs. And it's actually quite a neat concept: what I especially like is it's ability do save prefs in different hierarchies. For instead, the main program can save its settings in level 1, and program plugins in level 2 - all this in one prefs file but still logically structured and easy to read. As the individual prefs elements (individual settings as well as whole clusters of settings) are seen as objects, it's all very simple to manipulate through the Application Library/PrefsObjects methods.
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon R5 230 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
trixie
 
Posts: 377
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: Wishes for Preferences?

Postby nbache » Sat Jan 11, 2014 1:43 am

trixie wrote:@nbache
No, PrefsObjects is great, and easy to use.
Maybe, but the schema design is really horrid.

Every tag is either called "key" or "string" or "integer" or similar, so the real schema definition ends up being "hidden" in the values of the tags. That's not how good XML is designed. (And it bloats it even more as well.)

In effect, all XML documents using this schema end up being constructed out of a few super-general building blocks. That's why I likened it to Morse code (which has dots and dashes, and maybe a convention about the lengths of pauses between some of them, but that's it).

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1298
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: Wishes for Preferences?

Postby JosDuchIt » Sat Jan 11, 2014 12:00 pm

@chris thanks for the hint

I was pointe to CLIExchange which complements the command above very nicely (or is there an offical "CLI exchang""
JosDuchIt
 
Posts: 286
Joined: Sun Jun 26, 2011 6:47 pm

Re: Wishes for Preferences?

Postby JosDuchIt » Sat Jan 11, 2014 12:20 pm

The Amidock preferences is an xml file
I was able to generate one that crashed Amidock as well as the workbench
I copied it to an other name and would like to correct it 'manually' to restore the lost info by removing the last app added.
So i got interested in this format.
The prefs file points to
http://www.amiga.com/DTDs/PrefsObjects-1.0.dtd
this link does not work. The file is not on my HD either Where can i get it ?
How can the prefs be interpreted without the dtd ?
JosDuchIt
 
Posts: 286
Joined: Sun Jun 26, 2011 6:47 pm

Re: Wishes for Preferences?

Postby Raziel » Sat Jan 11, 2014 12:51 pm

JosDuchIt wrote:The Amidock preferences is an xml file
I was able to generate one that crashed Amidock as well as the workbench
I copied it to an other name and would like to correct it 'manually' to restore the lost info by removing the last app added.
So i got interested in this format.
The prefs file points to
http://www.amiga.com/DTDs/PrefsObjects-1.0.dtd
this link does not work. The file is not on my HD either Where can i get it ?
How can the prefs be interpreted without the dtd ?

Maybe Utilities/PrefsObjectEditor is what you are looking for?

I was told it will display (and even fix) errors in XML files.
At least you can manually edit those files
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
User avatar
Raziel
 
Posts: 864
Joined: Sat Jun 18, 2011 5:00 pm
Location: A haunted Castle somewhere in the Bavarian Mountains

Re: Wishes for Preferences?

Postby JosDuchIt » Sat Jan 11, 2014 3:09 pm

@raziel
Maybe Utilities/PrefsObjectEditor is what you are looking for?

I was told it will display (and even fix) errors in XML files.


Thanks for the suggestion. works great
It even fixed problems i did not correct knowingly: notably subdockis i thought were lost
JosDuchIt
 
Posts: 286
Joined: Sun Jun 26, 2011 6:47 pm

Re: Wishes for Preferences?

Postby MichaelMerkel » Sat Jan 11, 2014 3:18 pm

nbache wrote:
trixie wrote:@nbache
No, PrefsObjects is great, and easy to use.

Maybe, but the schema design is really horrid.

Every tag is either called "key" or "string" or "integer" or similar, so the real schema definition ends up being "hidden" in the values of the tags. That's not how good XML is designed. (And it bloats it even more as well.)

In effect, all XML documents using this schema end up being constructed out of a few super-general building blocks. That's why I likened it to Morse code (which has dots and dashes, and maybe a convention about the lengths of pauses between some of them, but that's it).


+1 +1 +1 +1

for plain prefs it may be sufficient. but i we should never use if for anything else.
but even the amidock prefs file (which is in that format) is almost absolutely unreadable and uneditable... compared to better designed xml files.

regards...
michael
Michael Merkel :lol:
(Member of Amiga Freunde Pfalz)
User avatar
MichaelMerkel
Beta Tester
Beta Tester
 
Posts: 337
Joined: Mon Dec 20, 2010 3:08 pm
Location: Germany

Re: Wishes for Preferences?

Postby trixie » Thu Jan 16, 2014 8:55 pm

@nbache

the schema design is really horrid.

Fair enough, I take your point. But why was it designed like that? Am I to understand that nobody in the team even bothered to check what the guy responsible for PrefsObjects actually did, before releasing it as part of the OS?
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon R5 230 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
trixie
 
Posts: 377
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: Wishes for Preferences?

Postby nbache » Fri Jan 17, 2014 12:17 am

trixie wrote:@nbache
the schema design is really horrid.
Fair enough, I take your point. But why was it designed like that? Am I to understand that nobody in the team even bothered to check what the guy responsible for PrefsObjects actually did, before releasing it as part of the OS?
Good XML design requires some special skills (no, I don't necessarily have them all myself either, but I have used XML enough to recognize well designed and poorly designed varieties). I don't know whether (and how many) persons with these skills are/were on the team, but even if there were, they might have been busy with other stuff at the time. And the alternative, hiring a pro from the outside to do it, costs money, a resource which as we all know is not abundant in AmigaOS development.

The present solution "works", even if it is hard/ugly to use more widely than for its present specific purposes, so maybe it was regarded as a sufficient stop gap for now. But we can always hope that some day somebody looks at it again with more long-range spectacles.

(Just speculation on my part, I have no inside knowledge about this, and if I had, I wouldn't be in a position to speculate like this ;-)).

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1298
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Previous

Return to AmigaOS Feature Requests

Who is online

Users browsing this forum: No registered users and 5 guests