PDA

View Full Version : How to organize project? (how do you do it?)


matak
07-08-2007, 09:44 PM
There is this small open-source project i'm planning to do, and that is the first project that i want to create from begening till the end, in order to test my PHP skills.

Now, i've been thinking about the whole project a lot, and wrote some aspects on paper, like how is it going to show pages, where am i going to place admin panel, what is admin panel going to contain, how will i work with sessions and stuff like that.

But since i'm a lot unexperienced i'm asking here, about more things that i need to be aware before starting a project.

This is how i figure it out for now

Directory structure -> organize a neat directory structure for the project eg (admin, includes, pages, styles)

List of functions i will use -> i created a simple list of functions i want to include in the project like (Login (session start), Pages dir reading and creating arrays to use with GET, File editing form function, Creating file function)

CSS part -> in order to be able to use more CSS templates functions are going to be called from one file which is going to contain simple template easy editable.
Also PHP will create xHTML structure of Menus, and content...

Something like that...

Can you tell me on what aspects i still need to take care and think about before starting a project, so that later i don't come to a dead end.

I will use procedural programming instead of OOP, and there won't be MySQL database couse this is just a simple project.

Pennimus
07-08-2007, 11:37 PM
When I'm tackling relatively complex webdev projects I always find it useful to develop flow charts that plot out how users will interact with the site and how the different scripts you need will fit into this. That way you can refine it while its on paper before you start to code anything.

matak
07-09-2007, 11:30 PM
When I'm tackling relatively complex webdev projects I always find it useful to develop flow charts that plot out how users will interact with the site and how the different scripts you need will fit into this. That way you can refine it while its on paper before you start to code anything.

can you send me (or post here)a simple flowchart of how you do it. i tried to create flow charts but i can't visualize it good enough. it's so 2d :(

oracleguy
07-10-2007, 12:29 AM
A sufficient use of server side includes can play a major role in making your project easier to develop and maintain. I have some diagrams that I can post if desired.

rfresh
07-10-2007, 12:30 AM
One of the more important things to get a handle on is how you plan to organize and format your PHP coding - that is, your coding style. In addition to all of the other "things" to keep track of on a project, source code format and style are also important because when you find that you have to go back and work on a section of coding that you thought you finished last month, it's critical that you can follow your own code and understand it. If you have to spend a lot of time figuring it out then you'll loose time and if it happens enough, you'll get behind schedule.

So give some thought as to how you would like to style your coding so that you understand it, etc. and then always follow that coding style. And adding commments in your code will help you understand it faster when you have to do maintenance on it.

For example, I personally like to use this coding style in my PHP if then statements:

if ($php_name == 'Smith')
{

}

However, I think most coders like this style:

if ($php_name == 'Smith') {

}

Indentions are another area of preference which can usually be configured by your editor. I personally like to use 4 spaces but some developers prefer to use 8 spaces or use Tabs vs spaces.

I think you get the idea. Regardless of which style of PHP coding style you prefer, establishing one format and staying with it will help you keep your code organized and reduce bugs.

matak
07-10-2007, 12:31 AM
A sufficient use of server side includes can play a major role in making your project easier to develop and maintain. I have some diagrams that I can post if desired.

sure if you think they can be usefull. as i stated above, i'll have includes folder with functions (but i'm not sure in the rest of the stuff) :)