Back to Development

Pascal's Way of Doing Application Design

So. You want to create a piece of software to do X. Here is how I go about doing a rough sketch of the application. I'll walk you through one of my recent projects. An application for cost declarations for obstetricians in the Netherlands, linked to one or more COTS applications for patient administration. I call it 'ObDough', oh-bee-dough.

I'll break it down into, hopefully, easy to follow steps. Even if you've never written software, you should be able to at least design an application. There isn't much magic involved.

This isn't a guide for large company employees. You probably have procedures, board meeting requirements, ass kissing needs, stuff like that. You may or may not end up sending people to the moon, we'll just be doing a simple application design. I usually take several pieces of blank sheets of paper, preferably with a funny color.

Do I actually work like this?

Good question, and the answer is yes. I use these steps, but mostly in a loop. Start with one, and then loop through 2, 3, 4 and 5 until done. It is like a good massage. There is a pattern to it, but you never rigidly adhere to it. We're not machines! As you can see I do actually create the colored pieces of paper. I find them very, very helpful.

Step 1: Define The Problem.

This is probably where you are at now. The trick is to know which problems(!) you are trying to solve. But there is always one core problem. One sentence should do the trick.

For ObDough I started out with:
"I want to extract the invoice lines from application X and send them to the insurers."

That isn't enough to do an application, but it is a start. Write it at the top of one of the sheets. Underline, leave some space for the application name (I never know them at this point), and another line.

Step 2: Define the scope of the problem.

Next I talk with the people who will be using it. If it is a personal project I talk to myself. Out loud. Yes. There you have it. You're being taught by a mad man. This brainstorm session usually takes 1 to 2 hours. More is pointless, IMO.

For ObDough, I had some history of doing a previous very similar application. This made it simpler do create a basic problem scope. Right here, you'll be tempted to ask the big question 'GUI Application', 'Web application', 'Java application', 'batch job'. Please don't do that. You have no idea what you actually need in human interaction, so how can you know what the right tool is?

At this point, list the things you want to do. Add them to the sheet you just created. I generally feel I have enough when I fill about half to two thirds of the sheet. I usually do three to four items here first, and then go to step three, four and five and then go back here to add some more.

The ObDough List:

  1. extract from sybase
  2. for multiple practitioners
  3. create disks, accompanying letters and dymolabels to send them
  4. make something we can sell
  5. low to zero install and maintenance hassle. Non technical users.
  6. Do reports on the declarations:
  7. handle corrections:
  8. (bulk)check patient details with insurers
  9. record results back from insurer
Keep adding things until you think you have enough work and something people will actually want to use.

Step 3: Choose a sword.

The elblag boatlift is a marvelous piece of (Dutch!) 19th century engineering. The five water driven boatlifts span a height of 96 meters. This one alone manages to lift the boats 26 meters. Not all software is created equal. Nor are the development tools.

How you choose is wholy up to you, the amount of money you can throw at the problem, the tools you know. The list goes on.

For ObDough, I briefly considered the following four solutions:

  1. Solve everything by extending the existing patient administration system.
  2. Create a Tcl script to run as a batch job, use existing features in the patient administration.
  3. Create a Windev GUI application
    1. as a separate application which synchronizes with patient administration
    2. grafted onto the sybase database used by the patient administration.
I ended up with the Windev GUI application with a separate database and synchronization with external systems. Windev is a Deplhi like tool (or Microsoft Access on steroids), which I use professionaly at Unitas Software. The main reasons were requirements 4, 5, 6 and 7 from step 2. Those are really easy to do in Windev (and Deplhi and Access, maybe). Another reason was that I wanted to learn more about windev's ability to do RAD, an aspect of Windev we rarely use at Unitas.

Why not the other solutions? Extending the existing system is not possible, as it is a COTS, closed source product with no public API. The Tcl script solution would not handle corrections easily, and would not sell easily (no sexy looks) and the Windev grafted onto the existing database would mean paying close attention to locking strategies by the existing application, would severely limit the RAD power of Windev and would incur a rather large additional license cost for database access.

Side note: I immediately discarded a web based solution (No close match, printing usually troublesome), a deplhi solution (I want to try that tool, but the ROI was too small for this project), a tcl gui application (design tools not powerful enough for me)

Of course, during the design, you may want to keep your options open. Just remember that you need to know your sword for step five.

Step 4: Roughly sketch a database model

Take a new sheet of paper (don't use the backside of the first one!).

Think of all the things you need to store in your database, put them on the sheet so you can draw boxes around them and relationship lines between them. This is a logical model, not a real table structure! I usually start by putting the one or two central pieces of data near the middle of the sheet. Don't do any actual tables yet. That will interfere with the next step!

Here is mine. The numbers indicate the order in which I added the items.

Step 5: Write down the (user) actions

The key point of most applications is that it solves a certain problem. We've defined this in step one and two. I like to list problems in steps one and two, not solutions. Solutions are important, but not until here, step 5. Solutions force you to choose a tool, choosing too soon will force your hand.

For ObDough I have:

The order of this list is kind of unstructured, beacuse it is the result of a brainstorm session, just write down the ideas and a new one will come. It is all very free form.

Step 6: Define some tables

Okay. This bit may seem too technical to do during a rough design sketch. Well, it is. I almost never end up actually using the tables I draw here. Really, you should not use the ones you draw here.

The reason I draw them is twofold: It is a sanity check for the list I made above. The number of tables is a good indication for the scope of the project. Too few and you've likely skipped some important requirements, too many and you should reconsider your budget. Additionaly, it really helps in step 7. For ObDough I came up with these tables:

  1. Practitioners
  2. Insurers
  3. Patients
  4. Declarations
  5. Declaration-lines
  6. Declaration-statuslines
  7. declaration-runs
That is seven tables. I know there will be a few (system) tables I've missed, I generally end up with 50% more tables than I draw here. I don't know what your figure will be.

For me that was the confirmation that my design matches the scope of the project.

Step 7: Time requirement, the customer quote

This is the hard part of the design session. Really, it took me more than 10 years to start getting this right. Mostly because I didn't follow these guidelines. But the idea is simple: Take your pieces of paper and a different colored pen (preferably). Now look at each paper and put a number of hours effort it will take you to implement them. Don't figure the Mythical Super Developer in the mix. Just you. And only whole hours. Don't do 15 minutes here, 1.5 hourse there. Just whole numbers. Trust me.

Done that already? Go do it now.

Now you're done?

Add all the figures together on one of your sheets.

So. Now you know how much time you'll spend implementing the project. Multiply by your hourly wage, give your customer a quote and go write software. Wow. That was easy!!!

Or maybe not. The numbers, to me anyway, represent relative effort required between different features of the project. The problem is, I have found, while you figure in the individual pieces, you forget the fact that everything will be interacting with each other. That will incur at the very least 50% extra time. And then you will need some bonus multipliers for things forgotten now, unexpected problems/interactions and experience. When you just start out, this is your second or third project. Just guess some numbers, and multiply those by 5. Trust me, it may sound like a lot, but try to be realistic - you're a beginner, part of your time will be spent learning new things. Once you are more experiences, you've been doing projects on and off for the last four years now, multiply by 2 to 3. You've now learned what the real cost of a feature tends to be while wielding your worn in sword, a factor 2 to 3 will cover most other things. When you get really seasoned. Multiply by 1.5 to 2. You always need the 1.5 (once you become a Guru, which I am not, the numbers may be right as hours.)

Now multiply by your hourly wage, and then spend 30 minutes looking for a COTS solution and think of a better project if you find one which solves your needs...

Take a look at all my sheets again, the red numbers are the relative time requirements. On the tables sheet, you'll find that I multiply by 1.5. For this project, anyway.

Go Code

So there you have it. A look into my brain. If it helps you make better software, good for you! If not? Well. You don't have to do it like this. Nice huh?

Back to Development

Copyright © 2006 Pascal Scheffers. Version 0.9, 28-feb-2006 Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike2.5 License.