Address Book
by Roedy Green ©1996-2009 Canadian Mind Products
This essay does not describe an existing computer program, just
one that should exist. This essay is about a suggested
student
project in Java programming. This essay gives a rough overview of how it
might work. I have
no source, object, specifications, file layouts or
anything else useful to implementing this project. Everything I have to say to
help you with this project is written below. I am
not prepared to help
you implement it; I have too many other projects of my own.
I do contract work for a living, which could include writing a program such as
this. However, I don’t do people’s homework
for them. That just robs them of an education.
You have my full permission to implement this project in any way you please and
to keep all the profits from your endeavor.
The CurrCon Java Applet displays prices on this web page converted with today’s exchange rates into your local
international currency, e.g. Euros, US dollars, Canadian dollars, British Pounds, Indian Rupees… CurrCon requires
Java 1.1 or later, preferably 1.6.0_14. If you can’t see the prices, or if you just
want to learn more about CurrCon, click
here for help.
This project is mainly an exercise in printing several small logical pages to a single sheet of paper, both sides. This
is called 2-up or 4-up printing, depending on how many pages there are per sheet.
Every few years, my address book gets too untidy with changed names and addresses and I start over, copying the most
useful names, making errors in the process. I keep the old books around for reference. I would like to automate this
process. I’m not rich enough to buy a Palm Pilot, so I ordered a
program from DayTimer.com to do this.
Supposedly, it will let me maintain the lists electronically, and periodically print out subsets of the master address
book, so that for example I might just print out a mini address book of my Seattle contacts, or just people I might want
to ask for sex, or my Christmas card list, the people I need to contact to organise a high school reunion, just the
people I phone frequently…
Your job is to create a portable Java clone of this program.
Things to consider in doing a bang up job to make your code even better than DayTimer’s:
- Validate the heck out of the data. Cross check area code prefixes/state/province/zip/postalcode. Look for invalid x0x
and x1x telephone prefixes in area codes that don’t support them. Look at the Business
Classes for some ideas. Validate the format of email accounts, and do a DNS check on any domain names if you are
online. Arrange for auto-update of validation classes.
- Allow printing in many formats, e.g. DayTimer expensive pre-printed sheets, blank paper with black circles showing where
to punch, mini, midi and maxi formats, mail labels, plain paper lists. The trick here is to print on front and back of
each sheet in such a way that when you cut the paper up into smaller pages, everything comes out in the right place.
- Automatically record the last change date, and provide a way to print a list of entries given a start/end change date.
That way you can get a list of likely obsolete entries or to review your recent entries. You might use it to print a
master address book once every 6 months, and, every month, a printed update of just the recent
changes since that printing.
- vCard import.
- The simplest implementation is a ram-resident many-to-many TreeMap that you pickle between incarnations. You want to be
able to look up each item by many different keys. Each key might link to many different items. George W. Cherry will be
publishing a book that shows a simplified Personal Information Manager that demonstrates the technique. A fancier
implementation would use an SQL engine, possibly web-based to avoid the hassle of installing one on the client’s
machine.
- Allow you to configure which fields you want to track on each person.
- Allow you to add new fields, and give them names and types which controls data entry and validation.
- Allow plug in additional data entry validation filters using Class. forName
- Allow you to define different reports listing which fields you want to keep. The fields tend to automatically align with
minimal fiddling.