Why do people choose to start a project with PHP? Ever.

I got into a discussion with a co-worker (and PHP programmer) about the PHP language and why a new project would ever be started using it over other popular languages. He happened to be on his way out from our company and was starting at a new development company where they programmed, near exclusively, in PHP.

Disclaimer

My exposure to PHP has typically been a forced one. I never actively sought to learn the language, but I’ve had to develop in it on numerous occasions and I can get the basics done with relative ease. I don’t claim to be a PHP programmer and I would call myself a novice at best when it comes to writing code in the language. I am a C# developer by trade.

To me, PHP does not seem to be a good choice for starting new projects that you plan on being successful. Every time I’ve seen a large PHP application, it just looked like a complete mess that nobody but the most familiar with the application could comprehend. The language was not designed to be object oriented (assuming you feel that OO is a huge step forward like I do), and they are just pushing some essential functionality to the language in the upcoming release of PHP 5.

PHP has always seemed like more of a client side language to me, probably because it’s basically a scripting language. It reminds me of classic ASP which I don’t care to be reminded of.

It has the following perceived problems in my eyes:

  • It’s feature set seems crippled in comparison to other languages.
  • It seems to take more code to accomplish the same task as other languages.
  • You need to use 3rd party frameworks to get acceptable performance and scaling, let alone to get needed functionality.
  • There is no good IDE for it that I have found.
  • Most modules are not thread safe.
  • There are no namespaces (yet)
  • Configuring PHP can be a major pain in the ass, especially on Windows IIS.
  • Session handling sucks.
  • Object Oriented development is difficult, even with the new features. It just seems crammed in there.

  I If you were going to create any type of serious program for the web, wouldn’t it make more sense to use a more robust language like Java or a .NET language?  Yet, very large, very successful web applications are built on PHP (Wikipedia, Digg, Facebook, the list goes on…). New and innovative web applications are constantly being developed in PHP. Entire web development companies code in nothing but PHP! WHY!?

Reasons for using PHP?

Is it because there is less overhead with the code? I admit that I use .NET along with its AJAX.NET additions to write applications on a regular basis, and it sure does add a lot of unneeded overhead (not to mention ViewState). But it lets me write code so much faster by having access to the added functionality when I need it.

Is it because it’s free? I’ve heard that argument as a major selling point over and over again, yet just about every PHP developer I’ve met programs on Windows or a Mac. Besides, Java is free, the .NET language is free, and so are its (express) development tools. True, to avoid headaches you need a Windows server to deploy .NET applications to, but Java will run on that same LAMP server, just toss TomCat on it.

Is it because it’s easy to learn? Maybe. I would have to say that it’s got a flatter learning curve than the other languages and may be more inviting to the newbie.

One thing is for certain, PHP development isn’t going on in the enterprise, and for good reason.

A plea for help

Can someone tell me WHY you would start a new application in PHP? What are the benefits? If you knew PHP equally as well as Java or a .NET language, why would you code in PHP?

kick it on DotNetKicks.com


Related posts

Comments

August 21. 2008 03:35 PM

Korayem

I always have the same question. I sat down with a php guru friend of mine and was surprised to find that php's roadmap was to reach what java and .net are now (OOP,compiled language..etc)

So why guys do you use a language which it's ultimate goal is reaching what others are at right NOW!?

Korayem

October 6. 2008 05:16 PM

'nonymous

Not sure why they're heading towards ASP.NET and Java.... Both ASP.NET and J2EE are in utter shambles from poor architecture choices, over-engineering, and terrible overhead.

I'd say the only smart choices lie with Python or Ruby right now... Web is different that desktop apps... you *must* have a dynamic language to make things simple enough....

I'm an ASP.NET expert, and a J2EE wannabe. Which is why I'm anonymous... I don't want to badmouth my source of income publicly Smile

'nonymous

November 27. 2008 06:34 PM

dernieres nouvelles

I think php is an ideal programming language for the beginers

dernieres nouvelles

December 26. 2008 10:48 PM

Busby SEO Test Pinay

Yeah. Your right. I really agree on your explanation. Thank you for that article.

Busby SEO Test Pinay

January 12. 2009 07:25 PM

Busby SEO Test

Yes Is it because it’s free.

Busby SEO Test

February 17. 2009 07:21 PM

Mouse Cursor

it is because it runs on linux, it's free, integrates with MySQL, and is widely supported by most web hosting companies. Can you say the same about c#?

Mouse Cursor

February 24. 2009 08:38 AM

learning selling

yesss because it is free i think!

learning selling

February 27. 2009 02:24 PM

Kampanya Damai Pemilu Indonesia 2009

I'd say the only smart choices lie with Python or Ruby right now... Web is different that desktop apps... you *must* have a dynamic language to make things simple enough

Kampanya Damai Pemilu Indonesia 2009

April 15. 2009 06:13 PM

LCD And Gadgets Guide

Yeah.. i like php because it's simple for biginers and free!

LCD And Gadgets Guide

April 18. 2009 04:54 AM

Leadership

PHO! You gotta love it... its the way forward!

Leadership

April 27. 2009 06:22 AM

Compare DVD Prices

If you're a big company doing a big project with lots of developers and you manage your own servers, then PHP probably isn't the language of choice.

But if you're looking at creating a relatively small site and are a small company or individual then it does have advantages. It's easy to learn, it's free, widely supported by most hosts and there's a lot of information and help out there.

So if somebody's starting out and needs to learn a language and/or keep costs down the PHP is a good choice. However, if you already know another language well then keep using that.

Compare DVD Prices

May 9. 2009 03:44 PM

sandalias

In my case I dont like php... its a kind of hard and usually I have less problems and mistakes with html and I hope learn drupal in some month... some advice?
best regards

sandalias

May 12. 2009 01:46 AM

Online University

Because its easy to execute and its server is cost effective

Online University

May 12. 2009 11:06 PM

Bali Transports

I am impressed by your posting and the way you write. Keep sharing any edifying posting like this.

Bali Transports

May 12. 2009 11:57 PM

Bali Spa

PHP does not seem to be a good choice for starting new projects that you plan on being successful.

Bali Spa

May 19. 2009 12:20 AM

Ukf7003axx

More pro.. easy and safe..

Ukf7003axx

May 20. 2009 12:05 PM

Aishwarya Rai Images

Not sure why they're heading towards ASP.NET and Java

Aishwarya Rai Images

May 20. 2009 12:08 PM

Kareena Kapoor Images

Is it because there is less overhead with the code

Kareena Kapoor Images

May 21. 2009 07:13 AM

tukang nggame

I agree with @dernieres nouvelles
php is an ideal programming language for the beginers

tukang nggame

May 26. 2009 11:47 PM

articles trader

I think because it is easy to earn money.

articles trader

May 29. 2009 01:44 AM

Stock Broker

Hey buddy, whats this about? I have never heard it neither I knew that story. I think I had to shape it out and find out how it is. Hope the drink tastes good.

Stock Broker

May 31. 2009 06:38 PM

Guitar Chuck

Maybe the reason is PHP is more easier to understand as it is related to the developer background.

Guitar Chuck

June 5. 2009 12:12 PM

Belajar SEO Para Pemula

but It's difficult for newbies.

Belajar SEO Para Pemula

June 18. 2009 02:46 AM

club penguin

Not sure why they're heading towards ASP.NET and Java. Both ASP.NET and J2EE are in utter shambles from poor architecture choices, over-engineering, and terrible overhead.

club penguin

June 19. 2009 05:35 AM

SEO

Hi,
I have one question.Should I start to program my project with the OO-support PHP4 offers me? Or should I code it the way PHP5 allows me to do, though I won´t be able to test my scripts? Or should I wait until PHP5 is released in order to start the project then?

SEO

June 22. 2009 05:18 PM

Movers

great ppl

Movers

June 22. 2009 05:19 PM

Tampa Movers

can u make it better now?
made me love u more

Tampa Movers

June 22. 2009 05:20 PM

jammer

would it be better?

jammer

June 22. 2009 05:21 PM

Alabama movers

we love u all
must be better place now

Alabama movers

June 27. 2009 01:33 PM

rhodes ranch real estate

You've raised good points. With the facts you presented is just good. Thanks for informing me about PHP's reality.

rhodes ranch real estate

June 30. 2009 02:28 AM

Las Vegas Nevada real estate

The facts you gave are true but the trend is set for PHP so expect a lot of people to follow PHP. More people using would able to find help more easily.

Las Vegas Nevada real estate

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

July 3. 2009 10:52 PM

Search

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009