I'm needing a bit of design advice on what class/class's would be appropriate to build for my current situation.
Currently I have a program that communicates with my php server, which in turn communicates with my database server to make SAFE/INJECTION safe queries. The following request need to be handled in my program
1.) Query database to check if user credentials are valid
2.) Check if user has latest version of application
3.) Check what software the user has purchased from us and use this information to display the list of purchases to the user so he can pick which one he would like to download
4.) Allow the user to request a password change
keep in mind, Every query returned from the php server( which queries my database ) returns the database information in XML format. Therefore it will need to be parsed
Does anyone have any recommendations on the Class/Classes that would be appropriate to implement and recommended names for them? i was thinking just a class name CAuth. Any advice is greatly appreciated!!
Keep in mind that im wanting to keep this program modular and change out these classes i implement just in case the verification process changes( for example if i wanna just query the database only.....or maybe i want to make it where non XML formatted data gets returned). Pretty much if i decide i want to try a newer secure method i can swap classes out easily without breaking anything if not much!
Uhm...it is quite hard to give you good advice having so few information. However, assuming each point 1-4 is going to send a query to the database I would start creating a base class, let's say QueryHandler, that has two method to send a query request (via HTTP post I suspect) and to parse the XML document it receives back. Then you can override/implement these two method to customize the behaviors of the class and therefore the implementation details of each point. Doing this you will end up with a class per request and therefore a quite modular system. You could also chain classes, so that request 4 cannot be done before request 1, and therefore doing 4 triggers the execution of 1, and so on....
Just an idea.