10 Principles of the PHP Masters
Moderator: General Moderators
10 Principles of the PHP Masters
This article was on digg today:
http://nettuts.com/articles/10-principl ... p-masters/
I think I agree with most of the points, and I can't really think of anything important to add. Since I consider many of you PHP Masters, do you guys have anything to add or say about this list?
http://nettuts.com/articles/10-principl ... p-masters/
I think I agree with most of the points, and I can't really think of anything important to add. Since I consider many of you PHP Masters, do you guys have anything to add or say about this list?
Re: 10 Principles of the PHP Masters
saw this on digg
PHP performs much slower then assembly, should I use assembly for my sites from now on? smacking my head8. Don't use a PHP Framework - Rasmus Lerdorf
Contrary to Josh's belief that one should use a PHP framework, Rasmus Lerdorf, the Godfather of PHP himself, believes that frameworks aren't that great. Why? Because they perform much slower than simple PHP.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: 10 Principles of the PHP Masters
I can't say that the list is all "principles"? Some of them are just tips.
#1 and #9 are the same idea of using PHP for what it's good for and using other languages and applications for a complete solution. Similarly in PHP we use standard databases or technologies like LDAP to solve problems where other languages write custom sub-systems.
Not sure what to say about #2 or #8. Scalability is an art that requires a deep understand of exactly how the pieces of your architecture do their jobs. Specific tips are of little general help. And Mr. Lerdorf is in a separate universe at Yahoo than most PHP programmers, so take his advice with a grain of salt. They use custom compilations and extensions to achieve much of their performance.
#3 and #6 should go at the top of the list under Security. I would rather have people read a good Mordred rant than either of these suggestions though.
#4 is good general advice.
#5 and #10 are just tips ... you could build a list of many more that two useful tips.
And #7 is much better advice for PHP programmers than it is given credit in this article. I think having Do/Don't in the list is funny, but does a disservice to the PHP community.
I can think of a number of other topics I would cover before some of these: such as becoming familiar with using the online PHP manual, or understanding the "share nothing" architecture of PHP which helps in understanding sessions, connections, etc. Unit testing and tools is not on the list. Probably an understand of design patterns and their PHP implementations would be good. And I would move security to the top. I am sure there are more...
#1 and #9 are the same idea of using PHP for what it's good for and using other languages and applications for a complete solution. Similarly in PHP we use standard databases or technologies like LDAP to solve problems where other languages write custom sub-systems.
Not sure what to say about #2 or #8. Scalability is an art that requires a deep understand of exactly how the pieces of your architecture do their jobs. Specific tips are of little general help. And Mr. Lerdorf is in a separate universe at Yahoo than most PHP programmers, so take his advice with a grain of salt. They use custom compilations and extensions to achieve much of their performance.
#3 and #6 should go at the top of the list under Security. I would rather have people read a good Mordred rant than either of these suggestions though.
#4 is good general advice.
#5 and #10 are just tips ... you could build a list of many more that two useful tips.
And #7 is much better advice for PHP programmers than it is given credit in this article. I think having Do/Don't in the list is funny, but does a disservice to the PHP community.
I can think of a number of other topics I would cover before some of these: such as becoming familiar with using the online PHP manual, or understanding the "share nothing" architecture of PHP which helps in understanding sessions, connections, etc. Unit testing and tools is not on the list. Probably an understand of design patterns and their PHP implementations would be good. And I would move security to the top. I am sure there are more...
(#10850)
Re: 10 Principles of the PHP Masters
That isn't what Rasmus is saying. He's not saying "Do everything you can to make things as fast as possible". He's saying "Frameworks add too much overhead to be useful and don't actually add very much to the development process".jshpro2 wrote:PHP performs much slower then assembly, should I use assembly for my sites from now on? smacking my head8. Don't use a PHP Framework - Rasmus Lerdorf
Contrary to Josh's belief that one should use a PHP framework, Rasmus Lerdorf, the Godfather of PHP himself, believes that frameworks aren't that great. Why? Because they perform much slower than simple PHP.
I kind of agree with him. You don't need a framework for 99% of tasks. Building a small website using a technology designed to aid in building massive websites is very wasteful. If you're building a little photo gallery or a CV website it just doesn't call for a framework. If you're building Facebook then a framework is may be a good idea... but then the overhead of the framework itself becomes an issue. It's a tricky software design problem.
Re: 10 Principles of the PHP Masters
Oh I agree if its a simple gallery script a framework is pointless
Re: 10 Principles of the PHP Masters
Which clearly raises the question of where is a framework not pointless?jshpro2 wrote:Oh I agree if its a simple gallery script a framework is pointless
Re: 10 Principles of the PHP Masters
Well youd have to define the difference between a couple objects and a framework? Technically if I wrote a very limited framework would it still be considered a framework? Can I have just a bunch of objects and not call it a framework? lol
Re: 10 Principles of the PHP Masters
jshpro2 wrote:saw this on digg
PHP performs much slower then assembly, should I use assembly for my sites from now on? smacking my head8. Don't use a PHP Framework - Rasmus Lerdorf
Contrary to Josh's belief that one should use a PHP framework, Rasmus Lerdorf, the Godfather of PHP himself, believes that frameworks aren't that great. Why? Because they perform much slower than simple PHP.
That isn't what he's saying at all, that's a ridiculous argument. Frameworks ARE good for smaller sites and I use one myself, but I don't think anyone would argue a non-framework based site will perform better than a framework based site.
Also Rasmus Lerdorf does know a thing or two about PHP remember..
Re: 10 Principles of the PHP Masters
Why?panic! wrote:Frameworks ARE good for smaller sites
Re: 10 Principles of the PHP Masters
Scalability.
Read the sentence after. Pound for pound Non-frameworked sites scale better than framework based sites.
Read the sentence after. Pound for pound Non-frameworked sites scale better than framework based sites.
Re: 10 Principles of the PHP Masters
by the way when I say small and scale I'm referring to popularity not content.
Re: 10 Principles of the PHP Masters
You're suggesting that a few simple functions, the bare minimum for your needs, is going to perform worse than something like Cake or Zend? That doesn't seem very likely for a small website. Quite the opposite in fact. Frameworks add a big overhead that only becomes worthwhile for a larger application that's doing a lot in my experience.
Re: 10 Principles of the PHP Masters
when did I say that?
I said NON-FRAMEWORKED SITES, i.e: sites without a framework (not using a framework) will scale (ie perform better when traffic increases) BETTER than FRAMEWORKED sites (those using ZEND, CAKE etc).
To reiterate: sites without a framework will perform better than sites USING a framework.
I said NON-FRAMEWORKED SITES, i.e: sites without a framework (not using a framework) will scale (ie perform better when traffic increases) BETTER than FRAMEWORKED sites (those using ZEND, CAKE etc).
To reiterate: sites without a framework will perform better than sites USING a framework.
Re: 10 Principles of the PHP Masters
I'm totally confused.
First you said:
Why are frameworks good for small sites?
First you said:
Then I asked you why. You said:Frameworks ARE good for smaller sites
That's an explanation about why frameworks aren't good for small sites.Scalability
Read the sentence after. Pound for pound Non-frameworked sites scale better than framework based sites.
Why are frameworks good for small sites?
Re: 10 Principles of the PHP Masters
development time...that's why people use frameworks,.
If you still don't understand: I'll explain again.
Frameworks are good.
I like frameworks.
They speed up development time.
That's why people use them.
They are good for small sites.
Because they speed up development time.
Clients do like it when sites are developed quickly because it costs them less money.
But on more popular sites where you are anticipating high traffic it is better not to use them.
Because Non-frameworked sites scale better than frameworked sites.
Clients don't like it when their sites die.
If you still don't understand: I'll explain again.
Frameworks are good.
I like frameworks.
They speed up development time.
That's why people use them.
They are good for small sites.
Because they speed up development time.
Clients do like it when sites are developed quickly because it costs them less money.
But on more popular sites where you are anticipating high traffic it is better not to use them.
Because Non-frameworked sites scale better than frameworked sites.
Clients don't like it when their sites die.