Jump to content

Hierarchy and strucutre of the website


r00t

Recommended Posts

Hi people!

I need your help.

Being myself new in learning web-programming made the following question born.

How the files and folders in ../www are located.

Let's say that I need a usual site containing main page, forum, chat, guest book, photo gallery, news and RSS-feed

and of course the administration.

I will use AJAX, OOP and also I have read an article about MVC(interesting thing).

Soo, I need all files and folders to be located in www structured and very logically.

 

Please don't say that I have to learn those things listed above first. I know how they work and have at least an idea.

I just need the structure of folders.

 

Waiting for suggestions and help!

 

Thanx in advance!

Link to comment
https://forums.phpfreaks.com/topic/98210-hierarchy-and-strucutre-of-the-website/
Share on other sites

before i go on though, i'm sort of confused why you state you will use AJAX and OOP - do you know why? are they specifically required by your site, or are they just buzzwords or things you think you should be using?

 

not being unnecessarily negative here, but your decisions on what technologies and the structure of your app can directly influence/help your decision of your site structure. a "conventional" structure would be to organise your folders based around your sitemap - ie, top level folders for stuff like 'about us', etc and have your pages within. a more complex approach, normally encouraging/encouraged by OOP, would be to follow an MVC structure.

 

so as you can see - might be worth plotting out your exact requirements first, what you think you might need in the future, etc and then plot out a proper structure.

This is entirely arbitrary and there is no right answer.  The best thing you can do is download some existing frameworks and see how they organize things.  After that you need to try and come up with something on your own and after a few hundred iterations you'll eventually develop an organization that works for you.

Even though there is multitude of ways you can organize your files, I'd recommend having a single index.php file which is stored within the document root. That file would then include files which are below the document root. If it isn't a file that should be directly accessed by the client, then there is no point in storing it a publicly accessible place.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.