recent posts related to object oriented design and programming

A Java Model View Controller example (Part 1) alvin May 20, 2011 - 2:11pm

After writing several recent Model View Controller (MVC) pattern articles (A Model View Controller diagram, Model View Controller definitions), I thought it might help to share a real-world implementation of an MVC design. To that end, I'd like to share some information from a Java/Swing GUI application I wrote several years ago to help me in my work with Function Point Analysis (FPA).

The best UML “Use Case” definition I know alvin June 5, 2010 - 11:06pm

Every time I read an article or book about UML “Use Cases” I cringe a little bit. Every author says something like “Jacobson left the definition of a Use Case too open,” and then they try to work through some elaborate scheme of what a Use Case means to them. IMHO, the best use case definition was created in the early 1980s, long before Jacobson mentioned the term.

The best UML “Use Case” definition

Here’s the best Use Case definition I know:

A Java Model View Controller example (Part 2) alvin January 26, 2010 - 1:58pm

<< Return to Part 1 of our Java MVC Example

MVC Controller - our MainController class

As its name implies, the MainController is the main controller/coordinator of our MVC application. It creates the other controllers, and in many ways then turns control over to these other controllers. One of the controllers it creates is the ProcessController.

A Java Model View Controller example (Part 3) alvin January 26, 2010 - 11:14am

<< Back to Part 2 of our Java MVC Example

MVC - Handling data-changing events

Whenever the user adds, edits, or deletes data, such as our Process data, all the proper GUI components need to be notified of this event so they can properly update their displays. In this application, when a user adds a new Process, this means that we need to update our MainProcessTable. We implement this as follows:

UML sequence diagram - how to show a web service call alvin January 24, 2006 - 6:34pm

I recently started to model an application that makes extensive use of web service calls, and my customer asked me to include a UML sequence diagram to show the flow of calls in the system. This prompted me to wonder, "What is the correct way to show distributed systems (like a web service) in a UML sequence diagram?"

If this link is correct, in a UML diagram you show remote systems as actors.

UML use case diagram - visually show processes alvin November 17, 2005 - 5:40pm

Question: Is there a UML diagram to visually show the processes in a system?

Yes, you can use use case diagrams to represent the use cases (processes) in a software system. Use case diagrams show the actors in a system, and the ways in which these actors use the system.

This is why I use the terms "use cases" and "processes" interchangeably. IMHO, "use case" is a fancy way of saying "process", or perhaps more accurately, user-initiated processes, or event-driven processes.


I want to visualize the activity in a use case ... what UML diagram can I use to do this? alvin November 17, 2005 - 5:34pm

Question: I want to visualize the activity in a use case ... what UML diagram can I use to do this?

Use an activity diagram. These UML diagrams are good for visual workflow modeling. Swimlanes in UML activity diagrams can also show the behavior of different actors within a workflow process.


Use Case UI tip - Keep UI assumptions out of Use Cases alvin January 11, 2003 - 11:37am

I ran into the perfect situation this week that defines why you should not put UI assumptions in Use Case (or task) documentation. A customer decided that they really wanted to change a UI from the proposed tabular approach (with potential popup windows) to a tree view. If the use case mentions things like "double-click", "press OK", and UI phrases of that nature, the use cases would need to be re-written. Without those UI assumptions they should be fine.

OOA/OOP Koan: No end user alvin June 12, 2002 - 6:56am

OO Koan: You are assigned to work on a project, but you cannot communicate with the end user -- how do you develop the software?

(Answer: Lots of luck. ;)