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

List:       kde-edu-devel
Subject:    Re: [kde-edu-devel] And so it begins (libkdeedu)
From:       Scott Wheeler <wheeler () kde ! org>
Date:       2002-05-31 12:02:54
[Download RAW message or body]

On Friday 31 May 2002 09:11 am, Sebastian Stein wrote:

> But how much code do I need to use the parser provided by the Qt lib? I have
> never done this because I don't need to, but I think it will not be more
> than just some lines.

No, I think a good guess on a simple parser is roughly 100 lines of code.  
Plus you have to learn how to do it.  It took me about 5-6 hours to learn how 
to use QDom and to write the parser, and I think I'm more familiar with XML 
and the Qt libs for parsing since this was my second parser.

Now, the other big thing is that it takes 100 lines of code just to read one 
of these files.  Saving them is a different matter.  If a developer, Annma 
for instance, was writing a parser and/or writer, then she would only 
implement the parts that were useful for her application.  This is what I 
originally did with FlashKard.  However, this means that data is lost when 
you try to save data.  This currently happens with FlashKard.  If we want an 
environment where we can use all of our data files in several of the KDE Edu 
applications.

Let me give an example of how things currently work, as opposed to how they 
*should* work.  If I create a data file in KVocTrain, then open it in 
FlashKard, make some changes, and then save it in FlashKard, when I open it 
back up in KVocTrain it will have discarded all of the KVocTrain specific 
data.  That's because I only used the parts of kvtml that FlashKard needs.  
That's how anyone writing their own kvtml implementation would do things, but 
it is not particularly helpful in our environment.

> Yes, why not reuse qt lib?

The concept of abstraction comes to our aid here and is the basis of object 
oriented programming.  One of my computer science professors repeated many 
times that 90% of the problems in computer science can be addressed by adding 
another layer of abstraction.  That's what we're doing here.  We're hiding 
the XML layer of things and hope to provide easy to use data structures 
instead.  


> I think this is fine and enough. Everybody could build a xml file with this
> DTD with the help of some tools.

They could, but that would be very silly.  We can save several developers a 
lot of work by sharing code.

> I thought the libary will be for providing some functions for a common look
> or something like this. Maybe I missed the thing ;-)

That is indeed something that we will do.  The reason that a kde edu library 
is now being talked about is because there are a few places where it can be 
useful.  I hope to get to that part of things soon, but there was a more 
immediate need for this part of the library.

-Scott

_______________________________________________
kde-edu-devel mailing list
kde-edu-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-edu-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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