The.Anti.9
The.Anti.9

Reputation: 44648

Getting Prepared/Planning

For the first time, I am trying to create a rather large .NET project. I think the largest one I have made so far was about 6 classes, but this one is already at 14. For the section I'm starting to work on, I'm having some trouble putting everything together in my head, which is what I normally do. I think it's just a little too complex for that. I want to plan it out, and I want some way to visualize it and be able to play with it and manipulate the structure easily. Is there any sort of (free) program I can use to do this?

Upvotes: 1

Views: 217

Answers (7)

Frederik
Frederik

Reputation: 2971

Pen and paper is often good enough, because you don't really want to get to a state where you can't visualise your problem on a single sheet of paper. When designing solutions, try to break the problem down into them down into smaller sub problems. Applied to class design, this is called the Single Responsability Principle. Ideally, do it in a way so that the classes are independent, rather than coupled. If they have to be coupled, keep it as minimal a possible. You'll end up with more but smaller classes that are easier to maintain and you'll need to keep less of the whole program in your head at one time.

A good (free) tool to visualize the dependencies in your codebase is NDepend. It can be a bit overwhelming at first and needs a bit time invested to get the most out of it.

Upvotes: 2

Donnie Hale
Donnie Hale

Reputation: 411

I agree highly with the pencil and paper method. In addition to doing a class diagram, which is something that's fairly common but gives a static view of elements of your solution, I like to do sequence diagrams. These help clarify the relationships and responsibilities between the classes and, importantly, help you identify just the methods that you need to implement.

Upvotes: 0

NinjaBomb
NinjaBomb

Reputation: 793

Good ole' pencil and graph paper. Let's you line things up better, draw better boxes, draw straight lines and makes you feel like an engineer designing some high-tech piece of machinery, which in an abstract way you are.

Upvotes: 0

Funroll Loops
Funroll Loops

Reputation: 74

Do you have access to a whiteboard? Software tools are great, but I've always found drawing it out by hand really helps me think through design problems. Just start with some boxes which represent the problem at a high level, then begin fleshing it out from there.

That, and I hear the marker smell is scientifically proven to increase creativity.

Upvotes: 2

Dave Swersky
Dave Swersky

Reputation: 34810

Here's a GNU-licensed UML design tool: http://www.umlet.com/

UML Class Diagrams will help you figure out your object model. The others (Sequence, Use Case) will help you plan to meet your requirements.

Upvotes: 0

Thiago
Thiago

Reputation: 2258

You might also consider astah

Upvotes: 0

SLaks
SLaks

Reputation: 887453

Visual Studio can make Class Diagrams. (In the Add new Item dialog)

Upvotes: 0

Related Questions