[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Reworking the GTK+ cdebconf frontend



On Thu, Jun 21, 2007 at 10:39:24AM +0200, Attilio Fiandrotti wrote:
> Jérémy Bobbio wrote:
> >The whole frontend is currently in one huge single C file.  I'm
> >proofreading the whole thing for refactoring, memory leaks, potentiel
> >segfauts, etc.
>
> I'd like to know What's the problem in having the gtk frontend in one 
> single file: same is for newt and text frontends, are you planning a 
> similar code refactoring for them too?

It might worth it as well. :)

I was currently interested into improving the GTK+ frontend codebase
because it seemed like the one the most likely to get improvements and
new features.

It's not a *real* problem to have everything in just one single 2500
lines long C file.  But it's not what people usually call
maintainable.  :)

Here's the statistics for the three frontend that were mentioned:
  1347 newt/newt.c
   923 text/text.c
  2354 gtk/gtk.c    (after my add of more lines to improve readability,
                     though)

GTK+ API is quite verbose and if we keep adding new debconf question
type to improve the installer usuability, it might just become really
too long to be humanly apprehendable. :)

Another improvement in spliting the current file to more separated
modules is to get more defined interfaces and area of concerns.  In the
process of refactoring into more modules, you have to define clear
interfaces and the whole process really helps to improve code
readability (and add documentation).

I'd be happy to have a more lively discussion about all that on IRC if
you (or anyone else) are interested.

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   

Attachment: signature.asc
Description: Digital signature


Reply to: