[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] [RFC] KRES::Resource class for KDE 4.0
From:       Cornelius Schumacher <schumacher () kde ! org>
Date:       2005-03-21 22:51:15
Message-ID: 200503212351.16389.schumacher () kde ! org
[Download RAW message or body]

On Monday 21 March 2005 18:18, Tobias Koenig wrote:
> On Mon, Mar 21, 2005 at 11:26:07AM +0100, Cornelius Schumacher wrote:
>
> > What about the identifier,
>
> This is an interesting topic. In libkabc and I guess also in libkcal
> exists classes which need an unique id.
> So what do you think about an UniqueObject class (is the name ok?)
> that can act as base class for all these classes?
> It just has the methods
>
>   void setUid( const QString& )
>   QString uid() const
>
> and uses QUuid for a real unique id.

Isn't that a bit too much, introducing an extra class and requiring 
multiple inheritance just to save two trivial functions?

> > Another problem we might want to address is the semantics of
> > open/close in relation to load/save. This isn't too well-defined
> > right now. How is open actually used?
>
> IMHO this differences are needed to provide a clean API for resources
> that access servers. Most protocols know an open/close load/save
> state, so that fits well.

But it isn't well-specified when application call which function and 
what they are supposed to do. Even if on a protocol-level you can 
identify these functions that doesn't necessarily mean that it also 
makes sense to expose them to the application code.

> > In practice I experienced more problems than benefit from
> > having separate calls for open and load.
>
> So what for example?

For example when the open function is used to log in to a server and 
create a session, this works fine for a while, but when the session 
expires, the load will require to reopen the session. This effectively 
leads to code moved from the open function to the load function.

Is there any resource which has an open function which does more than 
nothing?

-- 
Cornelius Schumacher <schumacher@kde.org>
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic