TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-07-2007, 04:05 AM   #1 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default Planning your project

Before you start on a project for a client, you need to give a quote (or estimate) and a deadline. To do this accurately you need to map out the project and what you will do.

Why plan projects?
Planning a project gives you an accurate time and price estimate, it also gives you guidelines on what to build during development. It can cut your development time by a large amount because you won’t have to worry about bad design. Lastly, there is nothing worse for a large application’s design then having a programmer who added as he went. Planning a project will make the overall design far better.

Is there a right or a wrong way to plan a project?
No. There is no best or worst ways to plan out a project. The contents of this article are what I have found works best for me. As you should do with all tips/tutorials you see, play around and find what works best for you.

Enough of the ever so interesting before talk, lets start planning! Each of these steps should build off the last. For example purposes, I will use a fictional image hosting site to map out.


Step 1. What is the project?
In plain English, outline what the sites general purpose is and all features. This should be confirmed by the client before you start to avoid errors.

Example
The purpose of this site is to safely and securely upload images to the server. Users can manage their uploaded image if they register and log in. Admins have complete and total access and can manage everyone’s images.
Step 2. In English, what are the functions this site would do.
This is where you in more detailed talk, go through all the features. You generally don’t need to show this or any further steps to the client. This step isn’t completely necessary if you are going to map the rest out in the same sitting. If you are going to have a pause in between this and the end of the next step, do this to save you the time of think it all up again.

Example
Uploading –Basic html upload page followed by a php script to see if they are logged in the upload it accordingly.
Login –Basic html login page and a php script to log the user in. I can just use my pre-built user script for this
Register- Html page with a php script following it to register you. Part of the premade user script.
Management –If user is logged in, show all his images and give him the option to delete them.
Admin manage –A list of all images with the ability to delete
Step 3. What files would be used and what would they do
Working off of step 2, create a list of every file you will need.

Example
System
Class.php –Has the user and SQL cleaning class. The user class includes authentication for both users and admin.
Head.php –To be included on every page, logged you into the mysql server, includes
class.php and does other processes every page needs to do.
End User
Index.php –The index page, all html besides the login page
Upload.php –The page that does the uploading from the form on index.php
Login.html –The login form
Login2.php –Actually log the user in.
Logout.php –Delete the user’s login cookie
Register.html –The regsister form
Register2.php –Actually register the user. Check for like username, mismatched passwords, ect.
Manage.php –Show a listing of all the user’s images and redirect them to the login page if they aren’t logged in.
Delete.php –Check if the image if belongs to user logged in (redirect to login page if logged out) and delete image if it is.
Admin
Admin/manage.php –The admin management script, identical to the user’s management script, just remove the queries limitations and display them all.
Admin/searchuser.php –A text box to search for usernames
Admin/searchuser2.php –Searches users from serchuser.php, if no name is in the GET data, search everyone to have a member list without making an identical file. This has links to ban, make member or make admin any user (including other admins and yourself)
Admin/changeuser.php –Actually changes the user the way the admin requested
3.1 Database design (done at the same time)
While you are going though the files, compile your database design.

Example
Table user
Int id
Varchar name
Varchar pass
Int rank
Table images
Int id
Varchar url
int user_ID
4. How much time with expected debugging would this take
You now have your database designed and your files mapped out, go to each file and assign how long it should take you, assign one fee for the database (that includes designing it here)

Example
System
Class.php –2.5hrs
Head.php –.5hr
End User
Index.php –.5hr
Upload.php –1.5hr
Login.html + Login2.php + Logout.php –.5hr.
Register.html + Register2.php –1hr
Manage.php –1.5hrs
Delete.php –.5hr
Admin
Admin/manage.php –.5hr
Admin/searchuser.php + Admin/searchuser2.php –2hrs
Admin/changeuser.php –1hr
That totals to 11hrs, you use that to give your quote or estimate to the client. The art of estimating how long a part will take is a tricky one. If you are not sure how long it will take, break the file into every part you can think of and think how long each part will take to code. If you simply don't know, estimate up. Chances are if you don't know how long it will take you (or exactly how to build it) you will have quite a fun time debugging the file.

When you start programming, you use what you made as a guideline to program your projects by. Go from file to file creating the script. When it is finished it should be almost exactly as you mapped it out.

Happy programming!


Find this article and others like it at http://tips.justanotherportfolio.com/
__________________

Village Idiot is offline  
Reply With Quote
The Following 10 Users Say Thank You to Village Idiot For This Useful Post:
bdm (12-07-2007), CMellor (12-08-2007), codefreek (12-28-2007), code_junkie (06-17-2009), Haris (12-07-2007), ibndawood (12-08-2007), obolus (12-13-2007), sketchMedia (12-08-2007), Wildhoney (12-07-2007), YBH (12-07-2007)
Old 12-07-2007, 02:56 PM   #2 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

Good to see a topic about planning. Many people just open their editor and start coding right away. When working on big projects this is wrong.
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
Old 12-07-2007, 03:14 PM   #3 (permalink)
bdm
The Acquainted
Good Samaritan 
 
Join Date: Nov 2007
Posts: 127
Thanks: 14
bdm is on a distinguished road
Default

Very nice tutorial indeed. Nice blog too, I've bookmarked it. ;)

Also, does anyone notice that even when you think you've planned everything out to perfection, that you find some answers at the oddest times? For example, you'll be doing something completely unrelated to programming and suddenly it hits you, a faster and more efficient way of solving a problem you've been dwelling on for the past few days. Happens to me all the time! The odd thing is that the aforementioned scenario happens more often than not while I'm showering. ;)
bdm is offline  
Reply With Quote
Old 12-07-2007, 03:17 PM   #4 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

No ****** way! Many solutions also hit me while showering. o_O... That's scary man!
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
Old 12-07-2007, 03:27 PM   #5 (permalink)
YBH
The Wanderer
Newcomer 
 
Join Date: Dec 2007
Posts: 22
Thanks: 4
YBH is on a distinguished road
Default

Thanks, was a good read.
__________________
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
YBH is offline  
Reply With Quote
Old 12-07-2007, 07:10 PM   #6 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Thanks for all the compliments.
__________________

Village Idiot is offline  
Reply With Quote
Old 12-08-2007, 06:34 AM   #7 (permalink)
The Wanderer
 
ibndawood's Avatar
 
Join Date: Dec 2007
Location: Chennai, India
Posts: 11
Thanks: 11
ibndawood is on a distinguished road
Default

Thank you boss!
ibndawood is offline  
Reply With Quote
Old 12-08-2007, 10:50 AM   #8 (permalink)
The Frequenter
Prolific Welcomer Upcoming Programmer 
 
Join Date: Sep 2007
Posts: 360
Thanks: 24
Haris is on a distinguished road
Default

Amazing, thanks for sharing Ken.

I'll add more to this thread when I actually use it.
Haris is offline  
Reply With Quote
Old 12-08-2007, 01:38 PM   #9 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

solutions usually come to me whilst im trying to sleep, very annoying .

Great article
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 12-08-2007, 02:54 PM   #10 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Sleep is the best time for thought as well, I think sketch !
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 12-08-2007, 03:07 PM   #11 (permalink)
The Reckoner
Advanced Programmer Top Contributor 
 
Karl's Avatar
 
Join Date: Sep 2007
Posts: 437
Thanks: 22
Karl is on a distinguished road
Default

Nice article.

Lol, sleep time and bath time here, can't help but think about work in those 2 situations
__________________
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
Karl is offline  
Reply With Quote
Old 12-08-2007, 03:12 PM   #12 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Quote:
Originally Posted by Karl View Post
Nice article.

Lol, sleep time and bath time here, can't help but think about work in those 2 situations
Haha! When I first read that I didn't realise which thread I was in, thought you were telling us it was bed and bath time...at 3 in the afternoon.

I tend to try and keep some of my day for thinking though, although thinking about programming rarely fills the spot
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 06-17-2009, 02:05 PM   #13 (permalink)
The Visitor
 
Join Date: Jun 2009
Posts: 2
Thanks: 0
Santana is on a distinguished road
Default

Nice post on planning!! What i have seen when doing some projects is the use of a project management system. This really helps to get more opportunities of getting new projects as the client gets a better impression of professionalism. Though we use <a href="http://www.proofhub.com/">Proofhub</a> Proofhub as our project management system you can use some but this 1 is the best from all that we have used and at a good price. I realy thank these products to make project management such an easy task.
Santana is offline  
Reply With Quote
Old 06-17-2009, 02:46 PM   #14 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Hola Santana Is Proofhub your creation?
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:57 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design