Download program (if you want): http://prdownloads.sourceforge.net/phppointofsale/PHP_Point_Of_Sale_6.2.zip?download
Demo of program: http://phppointofsale.com/PHP_Point_Of_Sale/login.php
I wrote an open source program called PHP Point Of Sale. I wrote this code last year and have done updates along the way. The functionality of the program is great,but the code is hard to maintain and prone to bugs.
I want to do a rewrite but I need some opinions on how to write code that is easy to maintain.
I am not sure if I should program with classes and objects or on even how to approach rewriting it, so their is not so much code to maintain.
Basically here is how my program works.
The program runs on a mysql back-end with tables for customers, items, brands, categories, users, and sales. Currently the database structure is not great, but I know what to do in order to fix it.
Their are 4 parts to the program:
Customers, Items, Sales, and reports
In the Customers and Items module I have files for adding, updating, and deleting info from the customer table in the database.
The sales portion of the program is just to add orders to the sales table. This module also has files for updating, adding, and deleting data from the table.
Reports display sale information with 11 reports to choose from.
But my problem is, how can I somehow cut down on how many files and code I have and make the code easier to maintain. Should I have a file for adding, updating, and deleting data from the program?
What are some strategies you use when planning on how to make code easy to maintain?
Thanks for your suggestions,
Chris Muench