Page 1 of 1

making a simple site/cms template (directory structure)

Posted: Sat Apr 30, 2011 12:53 pm
by Sindarin
I am making a very simple site/cms template, currently reviewing its directory structure,

Code: Select all

/site/ { root folder, contains index page,htaccess,page templates,robots.txt etc. }
	/files/ { contains the site resources images,css,javascripts,feeds }
		/styles/
		/jscripts/
		/images/
		/audio/
		/video/
		/flash/
		/fonts/
		/feeds/
	/cms/ {folder for cms of the website}
		/files/ { contains the cms resources images,css,javascripts,feeds }
			/styles/
			/jscripts/
			/images/
			/audio/
			/video/
			/flash/
			/fonts/
	/uploads/ {contains user uploaded files}
	/system/ {contains files used both from the site and the cms, settings, languages, php classes}
		/config/ {contains site/cms settings, initializes variables,objects etc.}
		/errors/ {contains error files 404,500 etc. }
		/includes/ {includes page sections like header,footer,menu,page body for site}
			/cms/ {includes page sections like header,footer,menu,page body but for cms}
		/languages/ {contains language files for site}
			/cms/ {contains language files for cms}
		/libraries/ {contains php classes}
Do you see any flaws to this concept? How would you do it?

Re: making a simple site/cms template (directory structure)

Posted: Mon May 02, 2011 2:45 pm
by pickle
I think something like this can safely be considered subjective. I'd have slightly different file structure, but there's certainly nothing wrong with this. The important thing is that it's organized & orderly, and this certainly is.

Just curious - what will be in the "audio"? Are you doing interface sounds?

Re: making a simple site/cms template (directory structure)

Posted: Mon May 02, 2011 5:48 pm
by Christopher
Since this is subjective, the first thing I noticed was the 'files/' directories. I would get rid of them. They just add a layer without adding any meaning. And I regularly see a "js" or "scripts" folder (I often alias one to the other to provide both) but never a "jscripts" ... that seems non-standard.

Re: making a simple site/cms template (directory structure)

Posted: Sun May 08, 2011 5:56 am
by Sindarin
Since this is subjective, the first thing I noticed was the 'files/' directories. I would get rid of them. They just add a layer without adding any meaning. And I regularly see a "js" or "scripts" folder (I often alias one to the other to provide both) but never a "jscripts" ... that seems non-standard.
"jscripts" sounded a bit weird to me as well, especially after reading the jscript article ( http://en.wikipedia.org/wiki/JScript ) on wikipedia. Previous names were "javascripts" or just "scripts" (which I later changed because scripts could be also PHP scripts and this folder was intended for javascript).
I suppose I could go with "javascripts" and change "styles" to stylesheets maybe for naming consistency.

I am generally not a fan of placing /css/ /js/ /swf/ etc. folders in the root, I believe is a little better to have them inside an files/assets "group" folder
I think something like this can safely be considered subjective. I'd have slightly different file structure, but there's certainly nothing wrong with this. The important thing is that it's organized & orderly, and this certainly is.
Thanks for the input.
Just curious - what will be in the "audio"? Are you doing interface sounds?
Possibly yes, or audio instructions and the like. The "audio" folder is mostly going to be used for HTML5 audio, everything flash-based goes inside the "flash" folder.