> 1.2. Re: The future life of Frontier vs. migrating to other platforms
> Posted by: "steve harley" yahoo.20020228.groups@...
> garbanzito_real
> Date: Mon Jul 6, 2009 8:57 am ((PDT))
>
>
> i don't manage websites with Frontier, and it sounds like my use
> of the odb is not what you'd expect
>
> i have a very fine-grained ODB that my client needs to be able to
> edit conveniently; for example just one of the numerous book
> formatting configurations in my system exports as 1325 files and
> folders, nested 7 deep; all of the values are scalars or short
> strings
>
> this would translate well to Python dictionaries, with a fairly
> simple code translation path; i'm sure i could read a set of
> files into dictionaries, the problem is how to edit the files? i
> don't know anything as convenient as Frontier's odb editor
Yes, this puzzled me too, as I was contemplating writing RubyFrontier -
that's going back a couple of years now. At the time, as I saw that my hopes
for the Frontier Open Source project were not going to be realized, I
started to think about alternatives. At first I feared that I might have to
write some kind of Cocoa-based GUI front end to allow editing of some sort
of ODB-like structure. Then I discovered that Ruby likes to save structured
data as YAML.
http://www.yaml.org/
Saving out a "dictionary" (Ruby calls this a hash) to a text file, or
reading it back in, is a single brief line of code. Now you've got (wait for
it) a text file! With a good text editor, such as TextMate's YAML module,
that's easy to edit. And TextMate's wonderful project / folder editing
abilities make it easy to go after those files no matter how deeply they are
nested.
Just to give a simple example, here's how YAML and RubyFrontier save a web
site prefs table to a text file:
---
:renderoutlinewith: halo
:dreamweaver: false
:smartypants: true
:halo_shortcut: "|"
:haloautoparagraphs: true
:useImageCache: false
:includeMetaCharset: true
:stylesheetstyles: true
:includeMetaGenerator: true
:dolinkback: false
:markdown: true
:draft: false
:flatten: false
Look familiar? Look easy to edit?
So, as I say, I don't think there is anything special about the odb or about
Frontier's interface for editing it. YAML is all about configuration files -
configuration files that are edited as text but are then instantly read in
as complex data structures (like Frontier's tables). Look at Ruby on Rails
if you don't believe me.
At this point, the only thing Frontier does well that I miss is edit
outlines. But I just use another outliner (OmniOutliner, at the moment) and
save out as OPML. OPML is just XML (really crappy XML, but never mind), so
RubyFrontier can easily read it and parse it and Bob's your uncle.
I'm saying all this not to persuade you to use any particular tool. Others
have pointed out Python and various Python-based solutions. It doesn't
matter what you eventually use. I'm saying it because a couple of years ago,
I was where you are (I think). I felt trapped in the ODB. But the more I
began get my head out of the sand and to look into what was going on in the
real world, the more I began to understand that every part of the puzzle was
already a solved problem, and that Frontier wasn't doing *anything* on which
I was absolutely dependent.
m.
--
matt neuburg, phd = matt@..., http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Customizing Leopard, http://tinyurl.com/2t9629
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com