Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
|
I am in the process of coding a moderatly simple login/user system for use in a planned personal project.
Tech avalible/used:
MySQLi/MySQL <- Not great with joins etc
PHP 5.3 <- Am fine with OOP programming
Apache web server, access to PHP.ini and .htaccess
Ive got the system working as a whole, including:
Login
Logout
Register
Account activation
Reset password
Profiles
While I plan to add alot more functionality, I dont think that will affect what I am trying to achive with this thread.
What I currently have is (im not here for critisism on my current file system, im looking for constructive ideas for a new, better, file system),
Each action either has a file.form.php file in a forms folder or a file.pro.php in a process folder, depending on whether they use a form or are just a process.
The core functionality, login, reigster etc are setup within a class in core.class.php.
Finally I have a content file delivering the correct variables/info to the correct function.
Example:
Address:
address.com?p=login
Process:
Form appears, when filled out it goes to the content file, the content file calls the class->function and passes the email and password into it.
The class->function does all the nesessary checks and sets the sessions. Once it is finished it either passes back errors to display (wrong pass etc) with the form or passes you to a dashboard style "welcome username" screen.
All the functions are similar in thought. content file passes the user input to the processor, the processor returns the processed info to the correct place.
The problem:
It is very messy! Ive got so many files that seem like irrelevant steps, process and routes that seem like they should either be organised into classes or into exisiting functions.
What I am after from you, if possible, is a sensible, robust system for building on, where should i be putting my files for maximum organisation without sacrificing extendibility etc.
Ive looked at MVC and am not conviced it is what I am after.
I hope ive not rambled too much and that you can atleast mostly understand what Im after.
__________________
Please login or register to view this content. Registration is FREE
Learn professional skills from professional people, from $6.50 a month.
Last edited by Phunk Rabbit; 08-20-2010 at 10:29 AM..
Reason: subject
|