-
Should design classes from the outside or from the inside
I am designing my c++ classes....
Should I design my classes from the outside (interfaces first) or from the inside (data first)?
____luke
wpdental - Santa Monica cosmetic dentistry.
-
There's no one definitive answer to this, but usually, you start from the interface, which is the part that is less prone to changes, and then implement that interface in an iterative process until you're satisfied with the performance, reliability etc.
Danny Kalev
-
top down design makes the final, outermost layer highly structured and easy to use for any clients of a library or api or whatever. However it can be vague as you go deeper into the development -- issues creep in that can make the lower level classes not play well together (for example, A and B really should have been connected with inheritence but you have them seperated at the top level and cannot change it late in the development).
Bottom up reverses this, the lower levels all play well but the top level interface may be clunky with seemingly redundant functions inherited up the chain or the like.
There are other design methods however, look into extreme programming, design patterns and everything before choosing what is right for your application. It really matters what you are trying to do!
Similar Threads
-
By Brian Pittman in forum Database
Replies: 2
Last Post: 04-29-2007, 08:23 AM
-
By [gx]Shadow in forum Java
Replies: 5
Last Post: 10-25-2006, 10:20 PM
-
By Franklin in forum .NET
Replies: 3
Last Post: 03-04-2002, 05:27 PM
-
By maria in forum VB Classic
Replies: 0
Last Post: 05-01-2001, 06:37 PM
-
By Ronadl in forum VB Classic
Replies: 1
Last Post: 09-15-2000, 05:56 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks