Blast from the past – SimpleCiShop refactoring

You probably don’t know that in the past (2007) I’ve created a Shopping system called SimpleCiShop. It’s based on CodeIgniter framework and you can find more in the GitHub project.

I’ve used this system in the past for my own Shop called cool-clean-quiet which was about PC coolers, heatsinks and filters. Well the shop didn’t go quite as expected and so the SimpleCiShop remained in the archives, until a year ago.

I didn’t want my project to die away without giving a try, so I decided to refactor it.

Cleaning up

I’ve started by updating CodeIgniter to the latest stable version; to get it running with the latest PHP version.

Then I’ve started to cleanup the code. When I realized what kind of shitty code I wrote back then 😳. I was embarrassed; but also motivated to continue my quest.

So I began by renaming variables, functions, style the code and remove deprecated or unwanted features.

Debugging and developing is easy thanks to Devilbox which has all the tools you need without breaking a sweat.

Improving the code

All database migrations are now done, and supporting SQLite (unfortunately not all queries in SQLite are supported from CodeIgniter’s Active Record) in order to switch to TDD in the future more easily.

I want now to create an abstraction between the entities and the database. I’ve discovered an awesome function in CodeIgniter [custom_result_object()] which maps a result to an Entity.


There is a lot to be done, and I am happy doing it as it’s more a learning process than just releasing another shop system. Also I am aware that I could achieve a lot more and lot quicker if I used another framework like Symfony or Laravel but as I sad earlier I want to learn the internals and not to just use the tools.

You can see the progress of the project here where I’ve set a 1st release goal.

If you didn’t already notice the screenshot is in Greek;
but I the goal is a truly multi-language system.

Leave a Reply

Your email address will not be published. Required fields are marked *