[sword-devel] HTML-based Windows Front End?

David dnr at crosswire.org
Tue Jun 21 00:52:29 MST 2005


I have experimented with several different things lately, the main 
objective was a light weight html document view. Not specifically for 
Sword, but I tend to believe that this is needed for all Bible study 
software in the future. A secondary concern was a gui framework, and 
cross platform would be nice but not required. Here are my conclusions 
(it might save someone a little time):

1. wxWidgets: The html view is really not sufficient, and it also 
results in very large executables.

2. QT: A very complete framework. And I think provides most support that 
is needed, but the dll is about 6 megs. And text copied from the html 
view does not maintain formatting. Also I believe that it will not 
support Win95. There are some people who still use Win95, it would be 
nice (if possible) to maintain support for those people who really can 
not afford to buy new computers, or upgrade the ones that they have. Of 
course QT will most likely not be installed on the users system, so that 
means the basic starter package will be quite a bit larger. Not good for 
people who do not have fast internet connections.

3 GTK+: Very nice, Glade is not as fancy a gui designer as a lot of 
tools but it makes it very easy to create even complicated gui's 
quickly. And it can generate code in C, or C++, and it can use libglade. 
It can also generate projects for Dev C++, VC6, and I think some other 
ide's. There are 1 bug that I have seen that I think will be fixed in 
the next release scheduled later this year, and that is with painting of 
windows when a vpane, or hpane has been resized. Print support does not 
exist but I think it is scheduled for the next release also. It has the 
same problem of loosing formatting when pasting text that QT has, and I 
have not seen anything about support for that being added. GtkTextView 
is really nice with the exception that it does not support bulleted 
lists, and tables (I am not sure if there are any plans for supporting 
those things either). I think that everything needed for GTK+ will 
compress down to about 2 megabytes (zip compression).

4. Embedding Internet Explorer: Provides everything needed as for 
rendering, but you can not be certain that there will be a suitable 
version installed on the users computer. And if not it would be a pretty 
large download.

5. Embedding Mozilla: The ActiveX control does not expose all of the 
interfaces that will be needed by BibleCS, either the ActiveX control 
would need to be improved, or interface with xpcom instead. But, either 
way this could result in a large download.

6. Building components from the Mozilla source: The build process for 
Mozilla is complicated. I have been able to build nspr, and some of the 
other dll's but I have not been able to build the complete browser. And 
I have tried separating some of the components, but that proves to be a 
difficult task also.

The conclusion:
Mozilla uses native functions to draw text, controls etc. So there will 
not be any special libraries needed to build an html control (other than 
for images) on Windows. Use native functions to create an html rendering 
engine for Windows. Using messages, and callback functions that emulate 
RichEdit could make it easier to get it working in BibleCS (of course 
BibleCS interacts with RichEdit through a Delphi wrapper, so that might 
make it a little more complicated to make the change). Creating the 
rendering engine should not be really difficult with the exception of 
table support. But, currently BibleCS does not have support for tables, 
so if that were left out, it would still not be a step backward. Table 
support could be added later. There are a couple of advantages to this 
that one might not think of at first, like designing the parser for the 
rendering engine to work directly with OSIS. Which would make sense 
since the 2 pass filter which is planned to come after the 1 pass filter 
will be going from whatever the input specification is to OSIS to 
whatever the required output specification is for the renderer.
Instead of something like:
ThML > OSIS > RTF, or
ThML > OSIS > HTML,or
OSIS > RTF,or
OSIS > HTML

It would be:
ThML > OSIS, and documents that were already marked up in OSIS could be 
passed directly to the rendering engine.

DNR


DM Smith wrote:

> Greg,
>     If the architecture of a non-trivial program is sound, I find that 
> it is easier to improve something than to start all over from scratch. 
> If there are only a few features of BibleCS that are less than ideal, 
> then it probably should be much easier to fix those than to start all 
> over.
>     I imagine that when BibleCS developers looks at rendering HTML 
> that they will evaluate the different possibilities (much as we are 
> for BibleDesktop/JSword) of available HTML renderers. It is quite 
> possible that Qt will be evaluated. They may find (as we are with BD) 
> that the best choice requires significant rewrite.
>     If you are capable of writing a system from scratch, I think that 
> you would be of greater help to improve one of the existing projects. 
> Try taking BibleCS and drop in an HTML renderer where the RTF renderer 
> is today. Preserve the existing behavior of intra-application cross 
> references, dictionary lookups and informational popups. You can get 
> the source via SVN and modify it to your hearts content.
>     If all you are wanting is an HTML rendering, BibleDesktop already 
> does that. So do other Sword derivatives (e.g. web apps). If you are 
> looking for a cross-platform application, BibleDesktop is that. If you 
> want to code in C++ for Windows, then BibleCS is where it's at. If you 
> want to program using Qt, try BibleTime (perhaps port it to Windows). 
> And if you want to program in Gnome for Linux or on the Mac, there are 
> projects for that.
>     Each of these projects want committed developers to join them. 
> Please help.
> Thanks,
>     DM
>
>
> Greg Hellings wrote:
>
>> I don't want to be tied to a single IDE and layout program.  Also, I 
>> have been informed that there are a few features of BibleCS that are 
>> less than ideal.  I realize that no program is ideal, but if one were 
>> to start over, then these flaws could be fixed.  Work ages with 
>> perfection, does it not?  Perhaps it is time that the Windows client 
>> for Sword return in a second manifestation.
>>
>> --Greg
>>
>> On 6/17/05, *Chris Little* <chrislit at crosswire.org 
>> <mailto:chrislit at crosswire.org>> wrote:
>>
>>     Why are you planning to start from scratch rather than adding HTML
>>     rendering to BibleCS? (out of curiosity)
>>
>>     Greg Hellings wrote:
>>     > Yes, the need is pretty glaring.  Is the support there?  If someone
>>     > ( i.e. myself?) were to begin work, would help be forthcoming?
>>     > Presumably Bibletime would be possible in Windows with the recent
>>     > release of free Qt for Windows, but would a native UI
>>     achievable with wx
>>     > be desireable?
>>     >
>>     > On 6/16/05, *DM Smith* <dmsmith555 at yahoo.com
>>     <mailto:dmsmith555 at yahoo.com>
>>     > <mailto:dmsmith555 at yahoo.com <mailto:dmsmith555 at yahoo.com>>> wrote:
>>     >
>>     >     See http://www.crosswire.org/bugs/browse/BCS-24. Troy
>>     mentions that
>>     >     "yep, we need to switch to an HTML renderer" for BibleCS.
>>     >
>>     >     Greg Hellings wrote:
>>     >
>>     >>     Fellow Sword-bearers,
>>     >>     Would there be any interest amongst the Sword developer's
>>     >>     community to develop a new front end for Sword that would
>>     be based
>>     >>     off of HTML display rather than the current one with its
>>     >>     RTF-base?  I realize that there already is BibleStudy to
>>     >>     supplement BibleCS, but the current 1.0 release of
>>     BibleStudy is a
>>     >>     bit dated.  When I did a check-out from CVS for it, it
>>     would not
>>     >>     compile against the newest versions of the Sword
>>     library.  What I
>>     >>     am thinking of would be a complete rewrite, hopefully
>>     using the
>>     >>     wxWidgets, as BibleStudy aimed for.  I have been
>>     experimenting
>>     >>     recently with wxMozilla, which is a wrapper for Gecko within
>>     >>     wxWidgets which makes the Gecko engine surprisingly simple to
>>     >>     use.  I would like to start development on a new client
>>     some time
>>     >>     in the next few weeks and have a first pass at it out by
>>     the end
>>     >>     of August, hopefully.
>>     >>
>>     >>     Is there other support for this within the community?  I
>>     noticed
>>     >>     in the ancient archives of the Sword developers, someone had
>>     >>     proposed this idea, but it seems to have died off fairly
>>     rapidly.
>>     >>     Let me hear some feedback!
>>     >>
>>     >>     --Greg
>>     >>
>>     >>------------------------------------------------------------------------
>>
>>     >>
>>     >>_______________________________________________
>>     >>sword-devel mailing list:
>>     >>sword-devel at crosswire.org <mailto:sword-devel at crosswire.org>
>>     <mailto: sword-devel at crosswire.org
>>     <mailto:sword-devel at crosswire.org>>
>>     >>http://www.crosswire.org/mailman/listinfo/sword-devel
>>     >> < http://www.crosswire.org/mailman/listinfo/sword-devel>
>>     >>Instructions to unsubscribe/change your settings at above page
>>     >>
>>     >
>>     >
>>     >
>>     ------------------------------------------------------------------------
>>
>>     >
>>     > _______________________________________________
>>     > sword-devel mailing list: sword-devel at crosswire.org
>>     <mailto:sword-devel at crosswire.org>
>>     > http://www.crosswire.org/mailman/listinfo/sword-devel
>>     > Instructions to unsubscribe/change your settings at above page
>>
>>     _______________________________________________
>>     sword-devel mailing list: sword-devel at crosswire.org
>>     <mailto:sword-devel at crosswire.org>
>>     http://www.crosswire.org/mailman/listinfo/sword-devel
>>     Instructions to unsubscribe/change your settings at above page
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>sword-devel mailing list: sword-devel at crosswire.org
>>http://www.crosswire.org/mailman/listinfo/sword-devel
>>Instructions to unsubscribe/change your settings at above page
>>
>------------------------------------------------------------------------
>
>_______________________________________________
>sword-devel mailing list: sword-devel at crosswire.org
>http://www.crosswire.org/mailman/listinfo/sword-devel
>Instructions to unsubscribe/change your settings at above page
>



More information about the sword-devel mailing list