Page 1 of 1

project design

Posted: Thu Dec 15, 2005 11:53 am
by Telos
Hi, I have a "fun" idea to do this console-like php software. This is just for fun and no actual use is planned but I want it to be customizable and re-usable. The software should have an area where the responses go and then
an input box for the actual user commands. I know how to do this so don't go there but I want to know how to design the architecture of this app. I thought to put all commands into database but that is a tricky one since command can for example return pretty much anything depending on the command. I thought to do this with classes since I haven't used them much and I could use the practise. So what classes I should have. Maybe a command class for commands and then one class for the app itself which whould take care of user input and initiate the correct command and so on. Any suggestions?

So where do I put the commands and how because the software needs to be able to do for example this:

User Input: /adduser Telos telos@myemaildomain.com
APP: validates input, checks database for adduser command and initiates the command
APPCOMMAND: does what the command does in this case adds the user and gives feedback that the user has been added
APP: a log area shows the user input command and the feedback that the user has been added.