Home > CodeIgniter, PHP > CodeIgniter Tutorial: [Creating Accounting Application] Part 2 The Application Specification and UML Diagrams

CodeIgniter Tutorial: [Creating Accounting Application] Part 2 The Application Specification and UML Diagrams

In this part of the tutorial series we will discuss about the application specification. After defining the user requirements we will do the analysis and designing the using UML use cases and class diagram. We are going to use a free UML diagramming tool called StarUML. You can download the program here if you have not installed it in your computer.


User Requirements

Listed here is our web based accounting application user requirement and specification:

  • application must be web based, accessible anywhere from the internet
  • multi-users, with data entry, supervisor, manager, and administrator user group
  • user must provide their correct user id and password to access the system
  • data-entry user group can input cashbook and bankbook transaction as well as any journal entry transaction beside the cash and bank book transaction
  • supervisor user group can manage the transaction, for example to correct, edit, and delete transaction previously entered by the data entry user
  • data entry user group can do a posting process in order that the system can generate balance sheet, profit and loss report automatically
  • data entry, supervisor and manager user group can view the daily, monthly, and yearly transaction report, as well as balance sheet, profit and loss report
  • administrator user group can manage user data (add, delete, and modify), and reset it’s password

 

Use Case

Based on the user requirement, we draw a use case diagram as follow:

Main Use Case

As you can see on the Use Case diagram here is the actor and use case matrix table:

Actor
Use Case

Data Entry

Supervisor

Manager

Administrator

Manage Cashbook Transaction

-

o

-

-

Manage Bankbook Transaction

-

o

-

-

Manage Journal Transaction

-

o

-

-

Manage Chart of Account

-

o

-

-

View Cashbook Transaction Report

o

o

o

-

View Bankbook Transaction Report

o

o

o

-

View Journal Transaction Report

o

o

o

-

Enter Cashbook Transaction

o

-

-

-

Enter Bankbook Transaction

o

-

-

-

Enter Journal Transaction

o

-

-

-

Posting

o

-

-

-

Manage Users

-

-

o

You may download the StarUML diagram file here.

Model Class Diagram

Based on the user requirement and use case diagram above, we then draw a class diagram. We split the class diagram into Model Class Diagram and Controller Class Diagram as we are going to use MVC (model-view-controller) design pattern for the application.

The Model Class Diagram is as follow:

Model Diagram

Bankbook_model

This model class represents the database access and data processing of the bankbook document data to be used by it’s controller class.

Method

Description

get() Get one record of Bankbook document
getAll() Get all record of Bankbook document
addNew() Add one new record
addDetails() Add one new detail record
getDetails() Get all details record of a Bankbook document
sumTotal() Summarize total amount based on the details record
getNewNumber() Get a new document number after the last document number
delete() Delete one record of Bankbook document
posting() Do the posting process to generate accounting journal entry of Bankbook document
update() Update one record of Bankbook document
deleteDetails() Delete detail record of a Bankbook document
updateDetails() Update detail record of Bankbook document

Cashbook_model

This model class represents the database access and data processing of the cashbook document data to be used by it’s controller class.

Method

Description

get() Get one record of Journal document
getAll() Get all record of Journal document
addNew() Add one new record
addDetails() Add one new detail record
getDetails() Get all details record of a Journal document
sumTotal() Summarize total amount based on the details record
getNewNumber() Get a new document number after the last document number
delete() Delete one record of Journal document
posting() Do the posting process to generate accounting journal entry of Journal document
update() Update one record of Journal document
deleteDetails() Delete detail record of a Journal document
updateDetails() Update detail record of Journal document

Journal_model

This model class represents the database access and data processing of the journal document data to be used by it’s controller class.

Method

Description

get() Get one record of Cashbook document
getAll() Get all record of Cashbook document
addNew() Add one new record
addDetails() Add one new detail record
getDetails() Get all details record of a Cashbook document
sumTotal() Summarize total amount based on the details record
getNewNumber() Get a new document number after the last document number
delete() Delete one record of Cashbook document
posting() Do the posting process to generate accounting journal entry of Cashbook document
update() Update one record of Cashbook document
deleteDetails() Delete detail record of a Cashbook document
updateDetails() Update detail record of Cashbook document

Coa_model

This model class represents the database access and data processing of the chart of account data to be used by it’s controller class.

Method

Description

addNew() Add one new record
addChild() Add one new child record of a COA record
get() Get one record of COA record
getAll() Get all record
findByNameOrCode() Find COAs based on keyword of code or name
getByCode() Find COA based on it’s code
getTrialBalance() Returns records of trial balance report
getBalanceSheet() Returns records of balance sheet
getProfilLoss() Returns records of profit and loss statement
delete() Delete one record of COA
update() Update one record of COA

Controller Class Diagram

And here is the Controller Class Diagram:

Controller Diagram

Bankbook

This class represents the controller of bankbook document. It’s the class that users will access directly through browser user interface.

Method

Description

Bankbook() The class constructor where the class initialization will be put
index() The index page of the controller class
addNew() Add new bankbook record interface, will call addNew() method on it’s model class
editForm() Show an edit form for user to edit the data
save() Save data from the edit form, will call update() method on it’s model class
delete() Delete data, will call delete() method on it’s model class
viewReport() Show the list of currently available bankbook documents
addDetail() Add new detail record to the currently edited bankbook document, will call addDetails() method on it’s model class
   

 

Cashbook

This class represents the controller of cashbook document. It’s the class that users will access directly through browser user interface.

Method

Description

Cashbook() The class constructor where the class initialization will be put
index() The index page of the controller class
addNew() Add new cashbook record interface, will call addNew() method on it’s model class
editForm() Show an edit form for user to edit the data
save() Save data from the edit form, will call update() method on it’s model class
delete() Delete data, will call delete() method on it’s model class
viewReport() Show the list of currently available cashbook documents
addDetail() Add new detail record to the currently edited cashbook document, will call addDetails() method on it’s model class
 

Journal

This class represents the controller of journal document. It’s the class that users will access directly through browser user interface.

Method

Description

Journal() The class constructor where the class initialization will be put
index() The index page of the controller class
addNew() Add new journal record interface, will call addNew() method on it’s model class
editForm() Show an edit form for user to edit the data
save() Save data from the edit form, will call update() method on it’s model class
delete() Delete data, will call delete() method on it’s model class
viewReport() Show the list of currently available journal documents
addDetail() Add new detail record to the currently edited journal document, will call addDetails() method on it’s model class
 

Coa

This class represents the controller of bankbook document. It’s the class that users will access directly through browser user interface.

Method

Description

Coa() The class constructor where the class initialization will be put
index() The index page of the controller class
addNew() Add new COA record interface, will call addNew() method on it’s model class
editForm() Show an edit form for user to edit the data
save() Save data from the edit form, will call update() method on it’s model class
delete() Delete data, will call delete() method on it’s model class
listCoa() Show the list of currently available COA
 

Mainpage

This class represents the controller of bankbook document. It’s the class that users will access directly through browser user interface.

Method

Description

Mainpage() The class constructor where the class initialization will be put
index() The index page of the controller class
doPosting() Do the posting process for bankbook, cashbook, and journal
balanceSheet() Show balance sheet report, calling the getBalanceSheet() method from Coa_model class
profitLoss() Show profit and loss report, calling the getProfitLoss() method from Coa_model class
trialBalance() Show trial balance report, calling the getTrialBalance() method from Coa_model class
 

You may download the StarUML diagram file here.

In the next part of the article we are going to discuss the Entity Relationship Diagram (ERD) to design the database structure that will hold the data for our application.

  • Share/Bookmark
  1. August 5th, 2009 at 13:55 | #1

    Ditunggu kelanjutannya bro…

  2. August 5th, 2009 at 14:09 | #2

    Mantep lanjut bro..

  3. August 10th, 2009 at 12:59 | #3

    sudah bisa dilihat part-3 nya. thanx

  1. No trackbacks yet.

Ikutilah Seminar GPS! "MEMBONGKAR RAHASIA BISNIS GPS TRACKING" - Pembicara : Ir. Akhmad Daniel Sembiring (CEO Vitraining.com & GpsTrackingIndonesia.com) - Bandung, Sabtu 7 Agustus 2010 - Hotel Arion Swiss - Belhotel, Jl. Otto Iskandardinata No. 16 Bandung - Investasi : 2 Jt (sebelum 31 JULI 2010 HANYA 1 Jt) - Register ONLINE : seminar-gps.vitraining.com - More Info e-mail to : info@gpstrackingindonesia.com

This site uses a Hackadelic PlugIn, Hackadelic SEO Table Of Contents 1.6.0.