C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Starting with big projects in C++

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
shawn
Guest





PostPosted: Wed Apr 20, 2005 3:53 pm    Post subject: Starting with big projects in C++ Reply with quote



Hi!
I am new to C++ and I am working on a C++ project. Part of my job
is to create C++ Library. I read books like The C++ Programming
Language 3'rd edt, Thinking in C++ , The C++ Standard Library etc. But
I did'nt really get the concept to make use in my project, because none
of the books gives example of any big projects and ideas of how to
start and handle them. I am having trouble thinking in abstraction. Can
someone suggest me how to handle big projects in C++ and is there any
book or resources I can go though to get a hold of C++.


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Bronek Kozicki
Guest





PostPosted: Thu Apr 21, 2005 1:56 am    Post subject: Re: Starting with big projects in C++ Reply with quote



shawn <sshakir56 (AT) gmail (DOT) com> wrote:
Quote:
Hi!
I am new to C++ and I am working on a C++ project. Part of my job
is to create C++ Library. I read books like The C++ Programming
Language 3'rd edt, Thinking in C++ , The C++ Standard Library etc. But
I did'nt really get the concept to make use in my project, because
none of the books gives example of any big projects and ideas of how
to start and handle them. I am having trouble thinking in
abstraction. Can someone suggest me how to handle big projects in C++
and is there any book or resources I can go though to get a hold of
C++.

Try to define minimal set of functionality that will demonstrate your
understanding of problem, then deliver it using as simple means as
possible. Do not use inheritance if you really do not have clean "is-a"
situation; in most cases containment is better, and obviously it is
simpler. Use exceptions when appropriate; I recommend "Exceptional C++"
and "Exceptional C++ Style" by Herb Sutter if you want to learn more
about them. Always keep in mind how easy your library will be to use, do
not waste time on corner cases (yet). Once you feel more comfortable on
the subject you can explore them. I would also suggest that you read
some books about test driven development or agile development; this will
help you to develop code that is easy to test and to change.


B.


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


Back to top
Voltron Beta 2
Guest





PostPosted: Thu Apr 21, 2005 2:30 am    Post subject: Re: Starting with big projects in C++ Reply with quote



Well, I am assuming you have some experience developing reusable
components and libraries in C, Java or some other language. A lot of
thought goes into designing libraries that are truly useful, especially
in a large project and part of your experience as designer and user of
libraries goes into making design and coding choices that will impact
large either number of users (developers), potentially for a long time
to come. Initially you should set your goal to giving your users as
much flexibility as they need and as time goes by, with more experience
(in C++, library design, grasp of domain), you can spread your wings
and provide your users as much flexibility as the want.

The eventual goal here is to make your users' life easier, while
ensuring long term maintainability for the project as a whole including
library and user codebase. I know these ideas are not specific to c++,
but that is my point, the task of library design is much more human
than just writing c++, it involves managing expectations, having
foresight and ensuring quality above all.


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
mzdude
Guest





PostPosted: Thu Apr 21, 2005 8:40 am    Post subject: Re: Starting with big projects in C++ Reply with quote

I've read John Lakos "Large-Scale C++ Software Design". It has some
good ideas and the mechanics behind packaging software and dividing
functionality. It might be a bit dated by now, but still worth looking
at.


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
galathaea
Guest





PostPosted: Thu Apr 21, 2005 8:43 am    Post subject: Re: Starting with big projects in C++ Reply with quote

shawn said:

"I am having trouble thinking in abstraction. Can
someone suggest me how to handle big projects in C++ and is there any
book or resources I can go though to get a hold of C++."

i find it is best not to try to force the abstractions

start with the minimum objects your system needs
define how this really simple collection of objects interact

usually you have some type of io for the system
so there is often already a good classification structure of your input
and output objects
(are you an algebraic topology library, a financial reporting library,
a serialisation library, ..?)

now how does your system transform the inputs to outputs
usually there is some little ecology here you can describe with objects
and morphisms in some kind of term calculus

it is often a very good idea to have mostly lightweight objects
(but don't stress it at first - you can pull apart classes that have
grown too busy later)

that usually starts a system off pretty quickly with functionality

then
once you've had some familiarity with what your system does and how it
integrates as a library to its clients
you look for more useful abstractions

try to add functionality
feature points often show up as some form of polymorphism (static or
runtime)

the books you have read show you many good guidelines for building
these objects safely (RAII, exception safety, good coding practices)

but you are looking for more architectural knowledge

in software architecture, common design choices are communicated in
patterns

there are many good books out there that demonstrate common object
interactions, often in a diagrammatic pattern language like UML

a book i like to recommend is "generative programming by czarnecki and
eisenecker" because it really stresses the relationship between useful
models and appropriate domain languages

online and libraries provide many free resources

but the problem is that starting out, it is often difficult to see the
correct patterns for a particular task and it is common to see very
complicated logic used to try to use patterns that were not ever needed
for a system

the best pattern is simplicity

so instead of using pattern books to give ideas for a design at first
i prefer to start with io and the natural ways i talk about it
the patterns emerge during refactoring of the initial system into a
leaner, more flexible expression of the domain language

if you are into mathematical explanations
you might enjoy reading about how logic and type theory are related
through the curry-howard isomorphism, which provides a connection
between the logic of a domain language and natural typed models through
an algebraic system that expresses type dynamics and patterns

like all engineering sciences, though
it takes experience to build the right heuristics

// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// galathaea: prankster fablist, magician, liar


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Alex Beluga
Guest





PostPosted: Thu Apr 21, 2005 8:46 am    Post subject: Re: Starting with big projects in C++ Reply with quote

Maybe you need something that's project-construction related. In
common, principles of architecture of all languages are the same. Maybe
some technical and communication implementations differ.
For example: I'm reading now UML:Distilled and Fowler (author) explains
stuff on examples of Java&C#, but I'll goin' to use it in my C++
project.


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Pavel Vozenilek
Guest





PostPosted: Thu Apr 21, 2005 8:51 am    Post subject: Re: Starting with big projects in C++ Reply with quote


"shawn"

Quote:
Can
someone suggest me how to handle big projects in C++

There's one time proven method: start from small ones

and learn in the process.

/Pavel




[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.