Developing my most complex php script so far.
As the number of files and code get larger the question of how to organize them comes up
so far i have 4 folders
1) user manageent folder - logins/logouts
2) the core processes folder
3) the design folder (Views)
4) classes
I am not looking for any specific tip..but rather any thing that you have learned over the years with experience as to what works best.
Things like:
what should be placedin the root folder and what goes into separate folder ?
and anything related to this.
thanks
Tips on code organization
Moderator: General Moderators
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Tips on code organization
if you haven't already done this take a look at existing cms for ideas on file structures
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: Tips on code organization
thats a nice suggestion will look at wordpress or joomla structure
Re: Tips on code organization
You'd probably do better to look at the file layout of a PHP Framework. Most CMSes I've encountered are frightfully poorly written. They're good at what they do, but I wouldn't use them as references for best practices.
Re: Tips on code organization
Thanks ..Inspecting the code structure of CI - and i see reasons why MVC is better for code modification and extensibility