Organization - Where To Start

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
jamgood96
Forum Newbie
Posts: 12
Joined: Fri Jan 21, 2011 12:19 am

Organization - Where To Start

Post by jamgood96 »

Hi All,

I'm currently learning basic PHP/MySQL/Javascript. I've read through a couple books nearly front to back and feel I understand the basics of coding, but I have no formal training and am finding it tough to get my head around how to organize what I am trying to do.

For instance, one of the books I've been reading has some clear examples of how to create a basic site with login/registration/etc. I understand the code, but feel stuck when it comes time to modifying it to be more specific for my needs.

Since I think I understand the basic functions of PHP/MySQL/etc, what direction do I take in better understanding how to implement it?

Thanks a ton in advance!

James
User avatar
MindOverBody
Forum Commoner
Posts: 96
Joined: Fri Aug 06, 2010 9:01 pm
Location: Osijek, Croatia

Re: Organization - Where To Start

Post by MindOverBody »

My advice is to take pen and paper and write down some basic flow chart for your site. Then organize directories where you'll put your files. Quality organisation is more matter of experience than pure knowlage. Play around a bit. You'll see what fit the most. Use your imagination, but try to be close to standards.

As you know your site must have some sort of access point. Start from there. Also, my advice is to start from scratch, rather than trying to modify present code, especially if this is your first php application, just to catch feel. For example, you can first design registration forms, decide what you want to ask your future users, than design database tables for it. Then you can make some sort of controller which will handle form data. Also design some form model to insert/update database tables.

As you can see, i mentioned controller and model, which are part of MVC (Model-View-Controller) schema. Read a bit about it. It is application design pattern. It is excellent for you if you have basic knowlage about php functions and capabilities because it is all about organisation of your code. I recommend to read any of MVC framework books. Zend framework provides great tutorials about MVC and it's application in PHP.

Hope this post helped, Cheers! :)
Post Reply