How to write Site in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
riz360
Forum Newbie
Posts: 1
Joined: Tue Mar 03, 2009 11:38 am

How to write Site in PHP

Post by riz360 »

I am PHP developer worked on several websites but I am still not satisfied by my code structure, I just wana idea from anyone who to write code example i saw in mostly sites too many classes in difference files called them automatically and on index page there is few line of codes, like frameworks, i just want to get idea how to do secure, reliable code

any help will be very appriciated

Regards
Rizwan
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: How to write Site in PHP

Post by josh »

Model View Controller. If you're new to frameworks I'd check out Zend. It's database abstraction frees you from worrying about SQL injection for hte most part. I'd recommend Chris Shifflet's book though to anyone
User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: How to write Site in PHP

Post by php_east »

riz360 wrote:I am PHP developer worked on several websites but I am still not satisfied by my code structure, I just wana idea from anyone who to write code example i saw in mostly sites too many classes in difference files called them automatically and on index page there is few line of codes, like frameworks, i just want to get idea how to do secure, reliable code

any help will be very appriciated

Regards
Rizwan
it depends on what u mean by secure reliable codes.
and it is difficult and perhaps unwise to avoid classes as it provides a convenient way of managing your codes.

if you want a framework, the best is to use your own understanding of what a framework is, and make your own. what makes a good framework is subject to debate much like what makes a good cheese.

be clear in your mind first, your objectives, ( 'secure' and 'reliable' is not something you can put your hand and codes on. define it ) then set out to map out the structure, then build it. or adopt an example good simple structure and build upon that.
Post Reply