Jump to content

Planning a php site


draco2317

Recommended Posts

Define 'planning a website'.

I thought that meant deciding what content there was and what interaction (if any) there would be between visitors and content, as well as what content (if any) would be dynamically generated and how.
Link to comment
Share on other sites

Sorry for any confusion.  Basically, what i mean is, for example lets say i am starting a website like one model place, I want to know about planning the code, files, and folders.  I guess what I am trying to says so i am not just sitting at the computer typing random pieces of code, which might work, but would be difficult to maintain, repair, or upgrade.  Im looking at how to plan the code files and folders to its clean and effinecent. Also is there such a thing as commenting too much?
Link to comment
Share on other sites

Commenting too much? There's no such thing as you'll find out when you want to modify a piece of code that's six months old  ???

I normally have an organization like this for the root folder:

index.php
robot.txt
.htaccess
... and other files ..

then folders ...
/admin - protected folder for anything to deal with database editing etc.
/includes - for top of page/bottom of page with my 'template'
/support - for CSS files, db-conn file, etc.
/images/core - for images NOT related to content
/images/content - for images related to content
Link to comment
Share on other sites

[quote]how to plan the code files and folders to its clean and effinecent[/quote]

This is something that is very subjective...what is "clean and efficient" to me, may not be to you.  Generally, I tell people who work for me to do what is logical to them, and just make sure to document everything clearly, which leads me to your second question...

[quote]is there such a thing as commenting too much?[/quote]

If at any point in the future there is the slightest possibility that someone else that may be less proficient will have to maintain your code, then -- generally -- no, you can not comment to much.  You can always go overboard with anything, just keep it reasonable.  When I code, I usually only comment blocks of code so  in the future I can come back and look through the code and remember what I'm doing.  I don't need to comment each and every line and function that I'm doing...for me or for anyone else that I work with, but that may not always be true.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.