AccountsNow 1.0 Tutorial

Thanks to Naked Objects [http://www.nakedobjects.org], this is the first version of Account management system. The system is very simple and small [again, thanks to NakedObjects, it was developed in less than 850 lines of code in 3-4 hours], so this page should be a good enough tutorial to understand the system.

NOTE: THIS TUTOTIAL REFERS TO VERSION 1.0. AN ADDENDUM TUTORIAL FOR VERSION 1.1 CAN BE FOUND HERE. ALSO, SOME IMAGES HERE MAY NOT BE EXACTLY HOW THE SYSTEM LOOKS IN VERSION 1.1. BUT MOST OF THE CHANGES ARE ADDITIONS AND SHOULD BE EASY TO UNDERSTAND. DUE TO TIME CONSTRAINTS, I CANNOT REWRITE THE TUTORIAL. TUTORIAL FOR VERSION 1.2 CAN BE FOUND HERE.

1. Run the run.bat file in the main installation directory. For it to run, either java should be available in the PATH or JAVA_HOME variable to be pointing to your Java installation directory.

2. You should see the following Flash Screen and File Open dialog come up:

If you want to open an existing file, choose the file or click the Cancel button to start with a new file. For the sake of this example, lets click Cancel and start with a new file.

3. You will see the following system after this:

Ignore the Object Information window below. In the Objects window, there are three Objects. First is the Person object, which represents the "people" involved in the accounts. Transaction represents each individual transaction between two Persons. And a Group Transaction represents a group expense or transaction. More information on these later.

4. To create a new Person in the system, right client on the Persons icon and select the "New Person..." menu item in the popup menu. It should look like this:

5. Enter the attributes (name) of a Person in the dialog box. A new Person instance will be created. Similarly create a few sample Persons, e.g. Person1, Person2 and Person3.

6. To show all the Persons in the system, right client the Persons icon and select "Persons..." menu item. Example:

7. The next picture shows the "Persons" available in the current system and also the "New Transaction..." context menu item. The "New Transaction..." menu item is obtained by right clicking the "Transactions" icon. Similar to the "New Person..." menu above, use this to create instances of Transactions.

8. In the next picture, the attributes of a Transaction are filled in:

A Transaction has 4 attributes; Amount and Purpose are self-explanatory. The "From Person" and "To Person" attributes denote that, the "From Person" needs to pay "To Person" the given Amount for the given Purpose. The Amount and Purpose fields are filled in manually by typing the data. To fill in the "From Person" and "To Person" fields, DRAG and DROP any of the "Persons" from the "Persons" windows. Note the Transaction description being updated to reflect the most recent attribute changes. One more Transaction is added similarly and all the Transactions can be shown by selecting the "Transactions..." context sensitive menu, see next picture.

9. Similarly, right click and select "New Group Transaction..." on Group Transactions icon to create a new Group Transaction:

Amount and Purpose mean the same thing as above. The "Paid By" field means the Person who paid for this group-wide (group = all People in the system) common expense. This expense will be shared equally by every Person in the group. Similar to the above Transaction example, the "Paid By" field should be filled in by DRAGGING and DROPPING a Person from the Persons list.

10. Next figure shows instances of all the Persons, Transactions and Group Transactions in the system:

11. Now to find out the Consolidated expenses in order to settle the accounts, right click the Transactions icon and select "Consolidate" menu:

12. The following Consolidated expense report appears:

"INDIVIDUAL TRANSACTIONS" show all the transactions being considered. "FINAL CONSOLIDATION" shows final consolidated transactions that need to happen to settle the accounts. This is ensures that minimum number of checks/Transactions happen, though this is just one way of settling the accounts with minimum Transactions. You can Copy/Paste from the Consolidated Transactions window or edit the text in place.

13. You can save the "Person", "Transaction" and "Group Transaction" anytime or retrieve it in the future. Right clicking the Transactions icon gives the Save As menu item. Note that no consolidated transactions are saved as they are always dynamically calculated at runtime:

14. Then the following File Save dialog appears:

Name the file (.ANF extension) and save it.

15. You can remove (delete) a Person, Transaction or Group Transaction any time by right clicking the associated instance and selecting "Remove Person" or the corresponding name. Note that if a Person is removed and if it is referenced by a current Transaction, it will be an invalid Transaction and the system will not produce the correct consolidation (may also cause errors).

Example:

You can also remove all the instances by selecting, "Remove All Transactions". Example:

Some finer points:

1. Note that removing does not update the currently open windows which is showing the removed instances, but that is a NakedObjects limitation (atleast the way I have implemented them). So the best way is to close the instances window and open a new one, which should show only the correct instances.

2. Even if you add a Person AFTER a Group Transaction is created, that Person will be considered part of the group and will share the expense because consolidation operation being lazy is performed as requested. It will then consider all the Persons in the system as a group.

3. The "New Finder..." option you see on all the icons (Persons, Transactions and Group Transactions on the left), is useless. Again its a NakedObjects thing which I cannot control.

4. The "Persons..." or "Transactions...", etc. context menu is only available if there is atleast one instance to show (makes sense).

5. The following are invalid characters in a Person's name: ":" and "|". And following cannot be used in the purpose field of transactions: "|".

Play with the system, would be interesting to see if it is really helpful! Report any bugs (especially the consolidation algorithm) to me. There are a lot of hidden things you can do with the UI, most of them are revealed by right clicking an intance or dragging and dropping it around. It comes directly from NakedObjects!