[bt-devel] refactoring::namespace

Martin Gruner mg.pub at gmx.net
Wed Jul 7 23:54:02 MST 2010


Hi Jaak, hi Olaf,

I'd be more than grateful if you could also investigate on how we could
implement a BibleTime::Test (unit tests for the backend at least). I
tried at one point, but didn't get really far. So far I only have tests
for the CBTConfig, which are really trivial, but better than nothing.

We need good unit testing support to be sure that refactoring efforts
don't break things. Unfortunately I don't know how to do that in C++
efficiently. The lack of this is a major problem in BT's codebase quality.

What do you think?

mg

Am 07.07.10 17:30, schrieb Jaak Ristioja:
> On 07.07.2010 15:47, Olaf Radicke wrote:
> > I see busy activities in subversion. Good. Here my proposal for new
> name space
> > hierarchy:
> >
> http://devel.bibletime.info/wiki/User:OlafRadicke/portal:refactoring/namespace_hierarchy
>
> I think the source code needs so much refactoring that not much of
> that hierarchy will
> survive. I would settle for BibleTime::Core, BibleTime::Gui (not GUI)
> and BibleTime::Test.
> Right now I think we don't need BibleTime::Test at all. And the Util
> stuff can be directly
> under BibleTime::
>
> But I think at the moment there are more urgent matters than namespaces.
>
> > The class BibleTime is a part of the GUI, so i proposal a rename to
> > BibleTtime::GUI::MainWindow.
>
> Agreed.
>
> > I think, the parsing of command-line options in BibleTime.cpp is non the
> > best place. Better in Main.cpp or in a new class. If I want to
> implement a
> > function without X (Unix or Linux), does not go in such a way.
>
> Agreed.
>
> > For the init of the backend, it's better place out site of the GUI -
> i think.
> > So a new class for init backend (and scannings of OS-specific things)
> > is a goot idea - i think.
>
> Yeah, perhaps something like that.
>
> > In this moment, i don't no, is this better, wen write a proxy-class for
> > QSettings.
>
> > if you have fear, which is QSettings too slowly, because of many to
> write
> > and read operations one hart disc, so a proxy-class can buffer. But is
> > trust, all object those using the setting-proxy, have the same data
> (up to date).
>
> > In namespace "CBTConfig" we have a "half proxy-class". If we convert
> into
> > a real class we can buffer the write and read operations.
>
> > My proposal: "CBTConfig" -> BibleTime::Config::Proxy
>
> Personally, I'd like to move to QSettings entirely. What we need more,
> is to write a
> specification for the format of the configuration file.
>
>
> Jaak
>
> PS: Patches are also welcome! :)

_______________________________________________
bt-devel mailing list
bt-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/bt-devel





More information about the bt-devel mailing list