Page 1 of 1

How to write Site in PHP

Posted: Tue Mar 03, 2009 11:42 am
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

Re: How to write Site in PHP

Posted: Tue Mar 03, 2009 5:10 pm
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

Re: How to write Site in PHP

Posted: Tue Mar 03, 2009 6:11 pm
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.