Re[8]: DB?

Michele Ravani <[email protected]>
Newsgroups gmane.comp.gnome.apps.mr-project.user
Message-ID <[email protected]>
On 24 Aug 2002 11:45:57 +0200 Mikael Hallendal <[email protected]> wrote:

MH> lör 2002-08-24 klockan 11.39 skrev Michele Ravani:
MH> > On 23 Aug 2002 23:59:07 +0200 Mikael Hallendal
MH> <[email protected]> wrote:
MH> > 
MH> 
MH> > I'm not sure I understand what you mean.
MH> > A cache would be a local file, which can act as a 'recovery
MH> repository'
MH> > should the application crash or anything, and which can act as a
MH> decoupling
MH> > between the application(s) and the 'proper' storage, e.g. database.
MH> 
MH> I think we are talking about the same things here. 
MH> 
MH> How we currently built MrProject is that we have a libmrproject
MH> containing project logics. Here you have a MrpProject object containing
MH> a loaded project. When we write to a file we give that object to the
MH> output module which currently outputs it in an XML file.
MH> 
MH> In the future we would be able to instead of outputting to an XML we
MH> could commit it to a database.

Here is the difference. The application would still output to XML (cache
file) and the latter would be committed to the database upon a Save action
from the user. The key word in your sentence is 'instead', which implies
that when you choose to use a DB something deeper in the guts of the
application would change.
The way I see it is that the only thing changing from storing to a file or
to the database, is the type of the object instantiated as StorageMedium in
the Storage class. Changes would be more localized and therefore easier to
maintain and expand. 

MH> What you are saying is that we should also have a "backup"-file which
MH> we
MH> write to every now-and-then (from the data in the MrpProject object)? 
MH> Kind-of like auto-save but to a file instead of to the database. This
MH> can be done and shouldn't be to hard. This doesn't in any way change
MH> how
MH> it will be implemented and can be left for later.

Yes, that's what I meant. And yes, it would be the same code performing the
save now, only with a slightly different 'semantic' on top.

Regards and thanks for the discussion :o) 


-- 
Michele Ravani                  [email protected]
"Those who live hoping, die singing" My Gran
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.