Saturday, December 30, 2006

PHP Popularity .. Why?

No one can deny that PHP is one of the most popular and spreading web language nowadays. What I want to discuss here is why PHP is a strong competitor in the web world?

Simply, open any freelance website and you will get this fact: PHP fans are usually small business owners who needs to complete their project quickly with minimum cost. So, they need the easy way. They need ready made components. They need to find cost-effective programmers easily when a bug or error raised. This is what PHP giving them.

You can find many open source PHP projects available on the net such as vBulletin, oscommerce, x-cart, pMachine, ez-Publish, gallery, phpBB and php-nuke, plus other hosting control panel favorites. Open source solutions for forums, images-organizer, CMS (Content Management Systems) and even e-commerce. Just some configurations and you have a ready working project in just a moment. This aspect can't be seen widely in .NET or J2EE for example.

Another point here is the hosting. If we compare between the number of PHP hosting servers and Java for example. PHP is the winner in this comparison.

Although the simplicity of the PHP, it's still has a drawback in the style of the code. Actually, PHP is going in the way of creating its rich libraries and assemblies. However, You still develop a PHP application in a missy old fashion way - a combination of HTML and the PHP script. Still no separation between the code and the design which considered unprofessional way in development. You still have problems here related to scalability and updatability.

In my point of view, choosing PHP for projects is still related to the economical aspects not technical ones. Small customers still needs minimum development cost, and PHP is the ultimate choice if this is the only considered side here.


7 comments:

Anonymous said...

Although the simplicity of the PHP, it's still has a drawback in the style of the code.
PHP isn't simple, its coding style is much like (almost identical) to C++. You can of course write PHP code "function style" but 5 version has full featured OOP support.

If somebody is writing Web Apps using PHP "missy old fashion way" dont assume thats the only way just because you cant use PHP proper way!. According to your statement everything is old-fashioned without any CODE/PRESENTATION separation. You can mix code and presentation in PHP, Java, ASP, .NET, in fact in every SS programming language.

You still have problems here related to scalability and updatability.
Wrong. There are many pages written using PHP that are visited by millions of users daily. If you're not able to write PHP scalable applications dont assume PHP lack scalability. Anyway scalability is defined by web server and database, not programming language used.

In my point of view, choosing PHP for projects is still related to the economical aspects not technical ones.
You apparently know very little about what you're talking. Its "your opinion", ok. But you didnt gave us any technical solution examples that PHP especially among other "cheap" SL like ASP, perl, .NET, ... is incapable to implement.

If ease and speed of implementation means that solution is "unprofessional", then OK. Write your scripts in portable C and assembler :D

Mohammad Nour said...

Actually, I didn't say PHP is a bad language or even not professional one. My post was based on what I see in the freelancing communities.

About the Code/Presentation seperation, In ASP.NET for example, mixed code is not the basic rule here. In PHP. you can't ignore that the majority of your code is mixed. Just compare! Does PHP has equivalents to Server-Controls and User-Controls? All of these stuff which sperate the code and the presentation? If you think PHP has more power in this part, so why most of the PHP programmers don't use this power!!

About the updatability. you say language is not a factor here. Hay man! you want to tell me that an old fashion code won't affect the updatability of the project!!

Anonymous said...

About the Code/Presentation seperation, In ASP.NET for example, mixed code is not the basic rule here. In PHP. you can't ignore that the majority of your code is mixed.
You actually saying about an old PHP4 not PHP5. What "majority of code" and "programming language features" have in common. Exactly nothing. Take into account that actually "majority of code" is PHP4 not PHP5.

Does PHP has equivalents to Server-Controls and User-Controls? All of these stuff which sperate the code and the presentation?
PHP does have enought resources to do code separation both efficently and easily.

so why most of the PHP programmers don't use this power!!
Where do you get that info from?


About the updatability. you say language is not a factor here.
I said that language is not a factor of SCALABILITY. I didnt said anything about updateability. But thats right. Language is not a factor here (PHP5) if you separate your business logic from display logic and write your code using full featured OOP incorporated in PHP5.

Hay man! you want to tell me that an old fashion code won't affect the updatability of the project!!
No. I said that programming language wont affect scalability. Old fashion code is not updateable IMO. You still dont get that PHP isnt "old fashion code". Its like you saying "microsoft C++ is better than borland c++ because in borland C++ majority of programmers use GOTO which is old fashion". Guess what. In both languages you can write extensible scripts or sh*t.

меня зовут smik said...

I think the general and most common problem for php - libraries and application arcitecture. There is some good things and some interesting solutions (but in general...) ASM, C++, Fortran, PHP, C# - all "Turing ready" - so for now we think more about "ready to use" frameworks. But some news are good (eg Zend initiative).

Anonymous said...

Hey i think you are seriously biased towards ASP.NET and the likes. I admit that I come from a strong OOP background and when I first came to know about PHP, I was totally disgusted by the PHP's ugliness - lack of type support , function naming inconsistencies and powerful OOP features (it only has a basic set of features). But you can't deny that it is improving now.

PHP ease of use comes precisely from its own weaknesses, such as the lack of type support and strong OOP features. It appeals to novice programmers just like how classic ASP did.

Search for "PHP Frameworks" in google and you've got ASP.NET-like code and design separated third parties framework. It all depends on the programmer whether he wants to adapt a model-view-controller design pattern. PHP is just like the classic ASP - even though both support OOP features, that doesn't mean the programmer has to use them. Programmers misusing a language or not following the "basic rules" like separating code and presenation doesn't mean the language itself is flawed - it simply shows the programmers' incapability.

Cost-effectiveness: You can simply use Notepad, and the many open source editors out there to create PHP applications. Thus, PHP has a wide support base, unlike ASP.NET and Java. To use ASP.NET and Java, you have to purchase Visual Studio and Sun's server software, which is very expensive, especially to SMEs. Thus people have turned to PHP. If PHP can do the same as what other commercial languages can do, so why not?

Scalability and Updatability: Many million-dollar sites like Facebook and Friendster are written in PHP.

monalisa_smile said...

Actually you are not following up here what's going on in PHP world cuz any one working with php what's going on in that world you can find whole lot mass of templating engines that's used to separate the presentation layer from the business layer for example you can find smarty which is the most powerful most secure templating engine for PHP and also you can see while worlking with joomla or drupal or any cms that the presentation is separated from the business layers there also the full oop features which already now there in PHP 5 and what is coming very soon in the next release from the php and as a proud developer for php at least the best cms in the world (Joomla) is made with PHP I don't think that any other language can beat this

Anonymous said...

I found this site using [url=http://google.com]google.com[/url] And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!

Sorry for offtopic