gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keyed Archiving and MOSX compatibility...


From: Gregory John Casamento
Subject: Re: Keyed Archiving and MOSX compatibility...
Date: Wed, 24 Mar 2004 21:08:53 -0800 (PST)

Nicola,

--- Nicola Pero <address@hidden> wrote:
> 

<snippage...>

> > I don't see Renaissance as the answer due to it's tag-based mentality.
> 
> I don't see NIB (no matter if binary or XML) as the answer due to its
> encoding/decoding mentality.

You seem to have taken this somewhat personally. 

My comment is aimed at the idea that you need to write a new tag every time you
add a new class to the framework rather than simply defining how that class
should encode/decode itself.  Fred's proposal was, I believed, to somehow get
GUI to encode using the gsmarkup format which is innappropriate given the fact
that it uses the tags.  That's all I meant.

Nothing personal was meant, although I get the impression that the only right
answer in *your* mind would have been Renaissance.

> The objects are different on different platforms.  They have different
> colors, different fonts, different sizes, different images, different
> default alignments and properties.  The default button on GNUstep is 
> totally different from the default button on Apple Mac OS X.

All Renaissance does is it comes up with a different way to store it using the
tags and the getters/setters of each object.  How is this better than what I'm
proposing?   The answer: it isn't.

> Given this basic fact, I fail to understand how encoding/decoding objects
> with all their attributes is a good approach to portable interfaces.

Decoding to a known set of attributes is an acceptable approach.  Renaissance
does the same only by using the tag as a proxy for the real class and a
slightly different set of "attributes".

> You encode an object in one platform and it's very nice and fits with the
> environment, then when you decode it on another platform, the object is
> totally wrong and means nothing in that context.
> 
> It's absolutely the wrong approach!  Dumping the objects to disk as they
> are on a specific platform is exactly what you don't want to do to have
> portable interfaces!

Coming up with a compatible way to store archives in general is not wrong.   If
this leads to being able to read the interfaces created by IB since they are
archives, then so be it.  There's still no reason not to try.

As I said a long time ago...  the real problem is the format of the *archives
themselves* not JUST the GUI archives, but the archive format across the board.
 What good is it to develop an application which archives data, but then can't
read it across the different platforms because the archive format is not
compatible?   It's useless.  *IF* we can make a compatible XML format using the
NSKeyedArchiver, then we should pursue this.

> So the only solution is to encode the *logic* of the interface in those
> files.  If you want a button, the file should record that you want a
> button, not if on the original platform the background is white or striped
> by default (you should still be able to force a specific background on all
> platforms if you so wish), then the library will generate whatever type of
> button looks good by default on that interface.

And so by doing this some information *is* lost.  You don't really think you
can get a consistent, acceptable interface on all platforms?  I've yet to see
any complex guis done using Renaissance beyond a few examples.  Inevitably
something is going to be different and it's going to require a new interface
file.

> I think the problem that Gorm, Apple, IB, NIB have is their inability to
> look outside the very strict and religious dogma that the right way to
> create windows description is by serializing/deserializing the objects.  
> It's not if you want portable interfaces, and it's not if you want to be
> able to dynamically modify the interfaces.

I take it dynamically modify = "modify with a text editor".   If I wanted to do
this, I would write code... oh wait.. that's what I'm really doing with
Renaissance anyway, isn't it?  Only I'm doing it in XML, by hand.  

> Doing it differently makes the reading/writing process more complex, but
> gives you the best results.  Encoding/decoding is just not up to the job,
> because you *don't* want the same objects on different platforms.  You
> want automatic and intelligent adaptation to the platform.

If you mean you want a format which doesn't conform to the platform or any
platform in particular, I'm not sure what the benefit is here.   Just because
the format is exactly the same as one on a given platform, doesn't make it any
less portable unless some platform specific things are stored.   

To my knowledge this isn't the case with GNUstep currently and even if there is
Apple specific stuff in the .nib archive (from IB) we can skip it since we only
pull what we need from the keyed archive.

Anyway, these things are possible outside of Renaissance, as I explained in a
private email to you.

GJC

=====
Gregory John Casamento -- CEO/President Open Logic Corp.

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]