TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   Planning your project (http://www.talkphp.com/absolute-beginners/1647-planning-your-project.html)

Village Idiot 12-07-2007 04:05 AM

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/

Jim 12-07-2007 02:56 PM

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.

bdm 12-07-2007 03:14 PM

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. ;)

Jim 12-07-2007 03:17 PM

No ****** way! Many solutions also hit me while showering. o_O... That's scary man!

YBH 12-07-2007 03:27 PM

Thanks, was a good read.

Village Idiot 12-07-2007 07:10 PM

Thanks for all the compliments.

ibndawood 12-08-2007 06:34 AM

Thank you boss!

Haris 12-08-2007 10:50 AM

Amazing, thanks for sharing Ken.

I'll add more to this thread when I actually use it. :-)

sketchMedia 12-08-2007 01:38 PM

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

Great article

Wildhoney 12-08-2007 02:54 PM

Sleep is the best time for thought as well, I think sketch :-) !

Karl 12-08-2007 03:07 PM

Nice article.

Lol, sleep time and bath time here, can't help but think about work in those 2 situations :-(

Wildhoney 12-08-2007 03:12 PM

Quote:

Originally Posted by Karl (Post 5920)
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 :-)

Santana 06-17-2009 02:05 PM

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.

Wildhoney 06-17-2009 02:46 PM

Hola Santana :-) Is Proofhub your creation?


All times are GMT. The time now is 03:00 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0