views:

283

answers:

3

I have an Access db I wrote that I've used for my checkbook and budgeting for the last 3 years. I've never written a program before, but I've decided to write the db into a stand alone program. My only experience, besides the simple VBA in the db itself, is an Intro to C++ class and an OO Logic class.

Even though I know what I want the program to do (because it's what my db does now) I want to approach the planning and design as properly as possible, so I can write the program as properly as possible, so that feature additions and maintenance are easier.

I need help planning. I guess UML diagrams should be first. What UML diagrams do I need to do? And in what order? I tried to do a use-case but since the program only involves me, my money, the bank, and the stores, it seemed pointless. Or was I thinking about it wrongly? Do I need to diagram my money and my budget inside my account? I don't know. I need help on how to proceed. Thanks.

+1  A: 

The diagrams are there just to make you understand what you are doing and keep you on track. I guess you already know that. In your case, i Believe a detailed use case will suffice, just to make sure you handle all the features and dont forget anything. (Reminder: Use case is not a diagram. it is text)

Midhat
+3  A: 

It's good to have a set of UML diagrams to keep track of what is happening, but to remember in the end that documentation decays - your code is your design. That said, UML are good for planning and recalling bits and parts. There's a large dose of personal experience involved here, so feel free to take what you want and leave out what you think don't applies.

Use Case Diagrams

Skip this, and just write use cases instead.

Class Diagrams

I find them useful for planning the big picture view of an architecture, but I usually would leave out all the method names, or only leave in the relevant . I use it to illustrate the logical model of your classes

Sequence Diagrams

One of the more useful diagrams especially for business logic, and flow of data. I always find myself sketching sequence diagrams for complicated data-flow and especially when there are events being dispatched.

Object Diagrams

Shows the interaction of objects at run-time. I usually draw those for complex object interactions, and not the 'academically correct' ones. I think it is less useful than sequence diagrams.

Flow diagrams

Good for websites if you have complicate flow

State Transitions

Important if your application has many states. Again, just sketch out the most complex system, there is no need to have one for every sub-system.

ER Diagram

I know this is not UML, but a good database design upfront is important, and an ER diagram would help you to organise and plan how different tables relate with each other

Extrakun
+1  A: 

Since your application is for personal use, I think you only really need two diagrams, maybe three. You can use a Use Case diagram if you want, but you will probably be better off with just a list of use cases. Since no one else has stated it, a use case is a requirement where you state something you're going to use it for. These help you define what features you need.
Next you need the class diagrams for how you're going to organize your program. A class diagram shows which classes you have and how they're connected. This is useful for figuring out if your program is too complicated or if you're using the antipattern known as the blob. If you have a lot of lines connecting classes to each other, you might want to reorganize to see if you can make each class more cohesive and if you see very few classes, you might want to check for a blob antipattern. An antipattern is a common occurrence which is bad for readability or maintainability. Class cohesiveness is defined by if each class has exactly what it needs. For example, if you decide to have a class for your account, it doesn't need to know information which isn't related to your account, like the street address or name of your bank.

The last UML diagram I think you'll need is a sequence diagram which shows how different objects in your program will interact. This will help you better understand the interactions your classes are doing and decide if you need to better organize them if they're getting too complex.

Those are the UML diagrams you might need. You might also want a network diagram to understand how your database is going to connect to the bank's website and get the information you need.

indyK1ng