Re: Lots of design issues needed.

From: Alwyn (dt015a1979_at_mac.com.invalid)
Date: 08/11/04


Date: Wed, 11 Aug 2004 10:28:44 +0100

In article <411882da$0$62366$5fc3050@dreader2.news.tiscali.nl>, Val
<valmont_programming@hotmail.com> wrote:

> Design first though. I believe these basics belong in this ng (jsut an
> opinion :D), and not in a comp.oo ng
> (or whatever). Because I am
> adressing some basic design issues that many c++ novices/hobbyists *might*
> be interested in...

In the real world, software design procedures are intimately bound to
lifecycle issues. See, for instance:
<http://asd-www.larc.nasa.gov/barkstrom/public/The_Standard_Waterfall_Mo
del_For_Systems_Development.htm>
Such issues are well beyond the topic of this newsgroup, which is
learning to program in C or C++.

All in all, I think you have produced a viable solution - for a toy
program. Any improvements I could suggest would be largely cosmetic and
would relate mainly to issues of coding style and technique (which you
profess not to be interested in), not basic design. Any realistic
design for this kind of problem area would require some sort of
database system, which again is not within the domain of this
newsgroup.

I note in passing that you define a lot of functions in header files,
which do not seem to be either templates or inline functions. Your
project builds only because there is only one compilation unit and each
header file is included only once. Should you introduce an additional
compilation unit that includes these header files, your linkage editor
will complain that it found multiply defined symbols. In a typical
project, each non-template class will have its own header and at least
one source file for the implementation.

Alwyn



Relevant Pages

  • Re: include file question
    ... and that represents good design. ... By the time you get to your level of expertise, good judgment and good design ... guideline is "Don't do that!" ... We also used Bridge pattern so that core header files ...
    (microsoft.public.vc.mfc)
  • Re: speed vs. modularity
    ... >> I have a question about calling functions. ... > If you inline functions, you get readable and fast code. ... But you don't have to implement classes in header files to get the ... See Whole Program Optimization: ...
    (microsoft.public.vc.mfc)
  • Re: Passing CPtrList through a procedure
    ... error messages in header files without saying which module was beingcompiled. ... the designer of these misfeatures ever actually wrote a line of code. ... But that sounds like it would involve Intelligent Design, ...
    (microsoft.public.vc.mfc)
  • Re: homegrown libraries
    ... )>> I want to start compiling ... In C++, at least, inline functions are often placed in header files. ... You all think I'm paranoid, ...
    (comp.programming)
  • Re: [PATCH RFC] spinlock/rwlock fixes V3 [1/1]
    ... We had an issue with gcc ... header files: gcc does a lot of work on an inline function regardless of ... Clearly inline functions are "nicer", but they do come with a cost. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)