Angelo Schneider wrote:
> > Well-coded programs should be independant of this.  You can 
> > separate out the main GUI code from the platform-specific 
> > implementation.  If you do this right,
> 
> Did you ever do that?
> I suppose NO.

I actually haven't written any GUI programs for ages, but
I have successfully applied the same technique to other
platform-dependant libraries, which can be quite different
as well.  It's not something dependant on the GUI.

> > The BOCHS gui code is probably a good example.
> >
> > -- Ramon
> 
> Well I did not write a vm, either but I do also not give silly
> comments on how doing it right :-)

BOCHS does it right.  So there :-P
 
> P.S. no offence but I doubt that you can use standard c to factor 
> out the differences between windows and Xlib e.g. without knowing 
> them both. How do you abstract from something you do not know?

You design an interface that contains everything you need.
Then you leave up the specific implementation of the interface
to people who know the specific platform-dependant libraries.

> You are right in your concept, of cource, but than you have to 
> port to each new library and if that does not WORK?

Why wouldn't it work ?  If it doesn't work then the system isn't
capable of supporting the FreeMWare GUI anyway, because it doesn't
support features that it needs.

> What is you benefit in factoring something out in the first 
> prototype?

The benefit of factoring out, anytime, is that you increase the
amount of shared code.  This is a good thing.  I must say I don't
understand the point you're trying to make.  You say (quote from
above):

: but than you have to port to each new library

But you have to do that anyway !!!  The only thing is, if you
write the code with a standard API, you can share a lot of code
that you'd otherwise have to rewrite as well --- so it's easier
to port to a new platform.  The reason to do this in the first 
prototype already is that it spares a lot of work later on -- you 
don't want to rewrite the GUI code to be more portable, once it's
getting complicated.

-- Ramon

Reply via email to