[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libquran in embedded environment
- To: benoit midy <bmidy23 at gmail dot com>, Development Discussions <developer at arabeyes dot org>
- Subject: Re: libquran in embedded environment
- From: Abdulhaq Lynch <al-arabeyes at alinsyria dot fsnet dot co dot uk>
- Date: Wed, 25 May 2005 09:49:13 +0100
- User-agent: KMail/1.8
On Wednesday 25 May 2005 09:05, benoit midy wrote:
> Assalamu 'alaykum
> I also use the sqlite embedded database, and indeed it is fast, and easy to
> integrate in existing software.
> And it provide "real database" features, I previuosly try the shsql embedeed
> database, and I get some problem with restrictions :
> - only 1 type : all is considered as string
> - limits of max fileds records, max columns, max column length ...
> So sqlite is really a good solutoin for embedded database, and easy/fast to
> Abdulhaq for what application do use it ? you port the quran application to
> the zaurus ..
I'm still hoping to port QtQuran to the Zaurus rather than try to re-invent the wheel.
However, libquran is segfaulting on me and when I had a look at the code I realised that the
combination of C and the callback-type of XML parser (libexpat) made the whole thing
very difficult for me to understand. Because I am aiming to do other projects using
Quran data, I decided to see if I could by-pass all the XML stuff for use in any python
programs I am writing in terms of islamic/arabic software.
As an aside, my personal opinion is that XML is great for transporting data between
applications, but is poor for the internal representation of data in the vast
majority of applications. I prefer to have a simple native object-oriented view
of the data in my apps, and import and export to XML as and when it's required.
Adopting that principle I imported the Quran XML into a sqlite database and now
I find that using the data is very very simple from python by using SQL. Searches
become very easy and quick etc.
To be honest, for those using sqlite, libquran becomes redundant (i.e. unnecessary) for the
looking-up and searching of aayaat. Having said that, not everyone will want to use SQL
and libquran will be ideal for them.
So anyway I knocked together a quick quran browsing app in python and tried it on the zaurus.
I found that there is a lot to be done in terms of displaying quranic arabic and tashkeel in
Qt 2.3, which will need to be done whether we are using QtQuran or anything else.
The work M Yousif is doing, I believe, is primarily on the rendering of the quranic arabic
in modern environments. He is using OpenType as the font format and I think this is probably
the best way forward. Unfortunately, on Qt 2.3, this format is not supported. Therefore
in the embedded environment I am currently of the opinion that the best way forward is to
A - Don't ty to display tajweed marks etc, just display the basic quran text in an easy-to-read font
B - Bypass the native font technology and manually place each glyph on the canvas. This is a
lot easier than it sounds, and allows the developer total control over the look of the final result.
As a final note, I should say that even though I am comfortable with C++, developing apps
is so much faster with python. Just a quick advert there :-)