Sign in to follow this  
shoez

Design Advice

Recommended Posts

[font=Arial][size=2]I'm needing a bit of design advice on what class/class's would be appropriate to build for my current situation. [/size][/font]
[font=Arial][size=2]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[/size][/font]

[font=Arial][size=2]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!![/size][/font]


[font=Arial][size=2]EDIT:[/size][/font]

[font=Arial][size=2][font="Arial"]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![/font][/size][/font]

Share this post


Link to post
Share on other sites
Frankly there shouldn't be a lot of classes here; or particularly a lot of work. You might have a class to define what products exist if that info is non-trivial. You might have a class for versioning if your standard library doesn't have one. You'll likely have a class for database interaction, but most of these will simply be static methods, or methods that are part of your service contract (if you want to organize things like that).

Personally, I wouldn't put too much emphesis on modular design here. This is [i]maybe[/i] a few days of work. Make it right, make it robust. Spending a few days if stuff changes is better than spending the time configuring or debugging an over-engineered solution for these things.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this