Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
quick and dirty settings
#4
(07-08-2015, 05:48 AM)lelldorin Wrote: Why you des not use attributes?

That's a good question.

First, of all let me say that while I love yab, I have a love/hate relationship with Haiku. When I wrote Trope some years back, I still had this faint hope that someone might revive the old flyab project so I could write cross-platform apps in yab. Silly, I know. Since we are not likely to see BeFS installed on Windows or MacOSX machines, ever, I wanted to keep things portable.

Also, I actually started to design this app before Jan__64 added attribute handling to yab (somewhere around Haiku alpha2 IIRC). It could be done, but with a lot of SYSTEM$ calls.

But anyway, what are the advantages of doing this particular task with attributes? One that I can see is that the user is less likely to mess with them, but I try to build in defaults when reading my settings file yields gibberish, and you have to do that regardless of how you store the settings. I don't see a huge speed advantage on any vaguely modern machine.

Attributes turn the file system into a flat-file database. But when do you need a database? When you have a lot of data. You don't load Microsoft Access to store six lines of text.

In my next major project, I intend to use attributes extensively. I'm even creating a new filetype for them. Because they must be able to store thousands of data records.

But it's great that we have three different ways of doing this on record here now. People can try all three and see which one works for them.

I remember seeing a BASIC routine somewhere that allowed the parsing of MS-style .ini files. I'll see if I can get my hands on it again and post it here for reference purposes.
Reply


Messages In This Thread
quick and dirty settings - by clasqm - 07-06-2015, 10:55 AM
RE: quick and dirty settings - by lelldorin - 07-08-2015, 05:48 AM
RE: quick and dirty settings - by bbjimmy - 07-08-2015, 06:33 AM
RE: quick and dirty settings - by clasqm - 07-08-2015, 08:59 PM
RE: quick and dirty settings - by lelldorin - 07-08-2015, 10:12 PM
RE: quick and dirty settings - by bbjimmy - 07-09-2015, 03:05 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)
Free Web Hosting