473,725 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Managing large class heirarchies

Does anyone know of a good article dealing with organizing large class
heirarchies? I've always had trouble with circular dependencies,
global constants and variables, etc. Thanks.

Jul 31 '06 #1
6 1533
[cross-posted to comp.object]

razael1 wrote:
Does anyone know of a good article dealing with organizing large class
heirarchies? I've always had trouble with circular dependencies,
global constants and variables, etc. Thanks.
Read /Refactoring/ by Martin Fowler. Then add unit tests to all your
behavior, and refactor until you don't have so much excess stuff.

Question: Why is your class hierarchy large? Most are very small. Your
incidental problems suggest that your hierarchy is causing trouble instead
of solving it.

Does every element of your hierarchy actually do something?

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Jul 31 '06 #2

ra*****@gmail.c om skrev:
Does anyone know of a good article dealing with organizing large class
heirarchies? I've always had trouble with circular dependencies,
global constants and variables, etc. Thanks.
If you're using namespaces then, for one approach, browse:
http://www.edkirwan.kgbinternet.com/...ac-page10.html

--

www.EdmundKirwan.com - Home of The Fractal Class Composition

Aug 3 '06 #3
ia********@hotm ail.com wrote:
ra*****@gmail.c om skrev:
>Does anyone know of a good article dealing with organizing large class
heirarchies? I've always had trouble with circular dependencies,
global constants and variables, etc. Thanks.

If you're using namespaces then, for one approach, browse:
http://www.edkirwan.kgbinternet.com/...ac-page10.html
My recommendation is not an article, but a dead-tree book:

"Large-Scale C++ Software Design" by John Lakos:

http://www.amazon.com/gp/product/0201633620/
Aug 3 '06 #4
red floyd wrote:
ia********@hotm ail.com wrote:
>ra*****@gmail.c om skrev:
>>Does anyone know of a good article dealing with organizing large
class heirarchies? I've always had trouble with circular
dependencie s, global constants and variables, etc. Thanks.

If you're using namespaces then, for one approach, browse:
http://www.edkirwan.kgbinternet.com/...ac-page10.html
My recommendation is not an article, but a dead-tree book:

"Large-Scale C++ Software Design" by John Lakos:

http://www.amazon.com/gp/product/0201633620/
It's more than 10 years old! Things have changed a lot since then. He
should revise it heavily, if he can. Or other books should be recommended.
One of the good sources of info probably is 'comp.software-eng' newsgroup.
I am expressing caution here because there are other parts of this book
that should essentially be ignored, but they are not really marked as such
and it's not easy to recognize them.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Aug 3 '06 #5
Victor Bazarov wrote:
red floyd wrote:
>ia********@hotm ail.com wrote:
>>ra*****@gmail.c om skrev:

Does anyone know of a good article dealing with organizing large
class heirarchies? I've always had trouble with circular
dependencies , global constants and variables, etc. Thanks.
If you're using namespaces then, for one approach, browse:
http://www.edkirwan.kgbinternet.com/...ac-page10.html
My recommendation is not an article, but a dead-tree book:

"Large-Scale C++ Software Design" by John Lakos:

http://www.amazon.com/gp/product/0201633620/

It's more than 10 years old! Things have changed a lot since then. He
should revise it heavily, if he can. Or other books should be recommended.
One of the good sources of info probably is 'comp.software-eng' newsgroup.
I am expressing caution here because there are other parts of this book
that should essentially be ignored, but they are not really marked as such
and it's not easy to recognize them.
Yes, it's 10 years old and pre-Standard, but from an organizational and
process point of view, it's still quite valid. The specifics of C++
have changed, but not the design, organizational, and process issues.
Aug 3 '06 #6
red floyd wrote:
Victor Bazarov wrote:
>red floyd wrote:
>>ia********@hotm ail.com wrote:
ra*****@gmail.c om skrev:

Does anyone know of a good article dealing with organizing large
class heirarchies? I've always had trouble with circular
dependencie s, global constants and variables, etc. Thanks.
If you're using namespaces then, for one approach, browse:
http://www.edkirwan.kgbinternet.com/...ac-page10.html

My recommendation is not an article, but a dead-tree book:

"Large-Scale C++ Software Design" by John Lakos:

http://www.amazon.com/gp/product/0201633620/

It's more than 10 years old! Things have changed a lot since then. He
should revise it heavily, if he can. Or other books should be
recommended. One of the good sources of info probably is
'comp.softwa re-eng' newsgroup. I am expressing caution here because
there are other parts of this book that should essentially be
ignored, but they are not really marked as such and it's not easy to
recognize them.

Yes, it's 10 years old and pre-Standard, but from an organizational
and process point of view, it's still quite valid. The specifics of
C++ have changed, but not the design, organizational, and process
issues.
Actually they have. But it all has really nothing to do with C++...

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Aug 3 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1509
by: Torsten Wiebesiek | last post by:
Hi, I am currently working on a computer vision system. At the moment I'm adding support for firewire cameras. Since there is only one firewire system on a computer, I have writen a firewire manager class as Singleton. User access to firewire camera objects should only be accessable via refereces obtained from this manager class. I want to avoid the creation of more than one camera object accessing the same physical camera.
21
4833
by: dub | last post by:
Hello web folks... I've been desigining web pages for 13 years using my trusty text editor (UltraEdit) and in depth knowledge of HTML. I'm truly a text editor ninja at this point. I am frequently using regular expressions to search and replace in multiple files. I also use many different copy buffers and know all the keyboard shortcuts like the back of my hand. The point is... it's comfortable. Unfortunately, it's become just too...
7
3616
by: tgh003 | last post by:
I would be interested to hear how others are managing their javascript (.js) files from the original code vs the obfuscated version they publish to their site/webapp. I currently manage 2 files, and everytime i need to make a change, I have to switch the names, test, then rename again, obfuscate to the original file name (because this is the file referenced in php/perl/asp whatever files). So its kind of a pain. Any thoughts out...
4
3535
by: ChrisB | last post by:
Hello: I will be creating 50+ enumerations related to a large number of classes that span a number of namespaces. I was wondering if there are any "best practices" when defining enumerations. Should a single class be created that contains all of a solution's enumerations? Or should enumerations be defined directly in the files that contain the related classes? Are there any other design patterns I am overlooking?
8
2168
by: Braky Wacky | last post by:
Hello, I have an ASP.NET webpage that uses an instance of System.Web.UI.HtmlControls.HtmlInputFile for uploading files to our server. I came across the documentation at MSDN for upping the filesize limit, once I saw the behavior of the page bombing with files bigger than 4 MB. So far so good. But the situation I'm coming across is that there doesn't seem to be an elegant way of recovering from a user attempting to upload files
3
1118
by: Tim Mavers | last post by:
I am looking for a control (freeware or commercial) that operates like a standard ASP.NET dropdown list, but is able to display heirarchies in the actual dropdown list. This can be similar to a treecontrol, but I don't need to be able to expand/collapse nodes in the actual dropdown list--only have them appear indented. Thanks,
4
1720
by: ddtl | last post by:
Hello everybody. Consider the following code: class A(object): def met(self): print 'A.met' class B(A): def met(self):
0
928
by: Brian L. Troutwine | last post by:
I've a need to pickle arbitrary class hierarchies, which, luckily, can be made to conform to the pickle protocol. At the moment, however, I'm having a rather hard time discovering which classes in a heirarchy cannot be pickles. For instance, say class A has class B in it's __dict__ and let class B have a file handler in its __dict__. When I call cPickle.dumps(A) UnpickleableError will be raised when B's file handler is reached, but the...
0
1050
by: mathieu | last post by:
Hi there, I am currently involved in managing a large python/c++ project (using swig to automagically wrap c++ code to python). So far my current experience was that python was a second class citizen and extremely little python code was written and everything seemed to work. Now this is the contrary, large portion of code are written python with a few expection of c++ code for core algorithms. So as you might
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3221
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.