Finally! The difference between PHP, ASP and other scripting languages.
PHP
Perl
ASP
That coupled with the fact that you can write add-on modules for ASP using Visual Basic and COM would make the whole solution very attractive indeed if it were not for the fact that ASP only really works well on IIS. On other platforms there are many fewer features, and it generally runs a great deal slower. When running on Windows, the security issues and licensing costs tends to be the most important thing, particularly when an all-Microsoft solution stack is being used.
and
JSP
Java Servlet Pages has often been considered the "dark horse" in web scripting because at first many thought it would be overkill for the job and yet has managed to get quite a substantial community about it nonetheless. JSP has three key advantages over some of its competitors, which may be why it has done so well:
From: http://www.hudzilla.org/phpbook/read.php/2_2_5
Thanks to tilldoomsday for the link.
PHP uses a blend of interpretation and compilation in order to provide the best mix of performance and flexibility to programmers.
Behind the scenes, PHP compiles your script down to a series of instructions (called opcodes) whenever it is accessed. These instructions are then executed one by one until the script terminates. This is different from conventional compiled languages such as C++ where the code is compiled down to native executable code then that executable is run from then on. Instead, PHP re-compiles your script each time it is requested.
This constant recompilation may seem a waste of processor time, but it is actually not all that bad because you no longer need to worry about hand recompiling your scripts when you make any changes. On the flip side, many scripts take longer to compile than they do to execute!
Furthermore, it provides very quick feedback during development. If you have an error somewhere in your file, PHP will refuse to compile the page until you have fixed the problem, and you are able to step through execution of your code line by line until you find the problem.
The speed hit of regular compilation is nullified entirely by the use of PHP accelerators.
One major advantage to having interpreted code is that all memory used by the script is managed by PHP, and the language automatically cleans up after every script has finished. This means that you do not need to worry about closing database links, freeing memory assigned to images, and so on, because PHP will do it for you. That is not to say you should be lazy and make PHP do all the work - good programmers clean up themselves, and let PHP work as backup in case something is missed.
Perl
Perl is the most popular of the PHP alternatives out there, arguably because it is also the oldest. There is a large installed base of Perl out there; many open-source projects require Perl to be installed to work properly. It has the advantages of being very (very!) flexible, and also having a large collection of modules already written for it. However, it is let down by the fact that it is very easy to write obfuscated and confusing Perl without really realising you are doing so, and this has resulted in such marvels as the annual Obfuscated Perl Contest.
Well-written Perl scripts often look fairly like their PHP equivalent. The major cause for Perl's messy appearance is that many Perl programmers rely on "one-liners" - packing large amounts of functionality into just one line of code. Perl was once described very accurately by its creator, Larry Wall, when he argued that the front cover for his O'Reilly book on Perl should be a camel, saying that Perl was ugly but serviceable, and able to go long distances without much nourishment.
Perl is often a better choice when you want to take advantage of some of the pre-written libraries. CPAN, Perl's library repository, is very big, and there is a huge range of code for you to take, customise, and re-use. Perl also has a very active - and very cool - hacker community around it that's a whole lot of fun to be part of and is really a bedrock of support when you need it. Larry Wall and Damian Conway (both core Perl developers) are both rightfully revered as "alpha geeks" - people who really push the envelope of programming by doing cool new things. They are both very friendly, and and attend many conferences year round - go ahead and introduce yourself if you meet them, because they really are fascinating to talk to.
ASP
Active Server Pages (ASP) and ASP.NET is Microsoft's attempt to succeed in the web development market, and comes as standard with their web server, IIS. ASP has been mauled by the open source community ever since it came out, and they gave a variety of reasons: it is proprietary, single platform (Windows), and slow.
I would like to say, "Yes, yes, and yes", but I'm not going to try to pull the wool over your eyes. The reality is that ASP has been implemented on other platforms, and, when running on Windows and Microsoft Internet Information Services (IIS), is actually lightning-fast.
That coupled with the fact that you can write add-on modules for ASP using Visual Basic and COM would make the whole solution very attractive indeed if it were not for the fact that ASP only really works well on IIS. On other platforms there are many fewer features, and it generally runs a great deal slower. When running on Windows, the security issues and licensing costs tends to be the most important thing, particularly when an all-Microsoft solution stack is being used.
and
ASP/ASP.NET is generally favoured when an all-Microsoft stack is in place. When used on Windows, it is very easy to deploy .NET code to ASP.NET pages or even write your ASP pages using C#.
ColdFusion
ColdFusion used to be quite popular back in the hey-days of the dot.com boom because it is developed using a proprietary IDE designed for novice programmers who have no wish to see source code of any complexity.
For such a wizard-oriented system, ColdFusion performs fairly well. Performance is nothing to be desired, but development speed is good. Perhaps ColdFusion's biggest let-down is the price tag - you will certainly need to sit down before you see it. ColdFusion was bought out by Macromedia, and this has served to boost its corporate appeal in places where open-source is still frowned upon.
The main drawback to using ColdFusion is arguably its user-friendliness, which might sound odd at first, but let me clarify. With PHP and Perl, because the languages are so flexible, you have much more control over what happens and why. If something goes wrong in your code, it's normally very easy to track it down and solve the problem, or change your plans and implement a different solution to the same problem. Very often, stock ColdFusion has just one way to solve a problem, and this greatly reduces your control over the solution you make. However, at the very least, you can work using ColdFusion when you are in team with non-technical people.
The biggest advantage to ColdFusion is its IDE and the language it uses, "CFML" (ColdFusion Markup Language) - even junior programmers can learn the system and start making pages quickly. As a result, you will often find ColdFusion in use at very large companies where they use Visual Basic (another easy, but not very powerful or fast language) for offline work.
JSP
Java Servlet Pages has often been considered the "dark horse" in web scripting because at first many thought it would be overkill for the job and yet has managed to get quite a substantial community about it nonetheless. JSP has three key advantages over some of its competitors, which may be why it has done so well:
- It uses Java, a language that already has a large skill set of developers and a massive amount of functionality available. Java is also conducive to scalability as it distributes across multiple computers well.
- Sun, as well as other members of the community, has worked hard to promote the language and tools that support it, which means that JSP has a lot of backing inside larger enterprises.
- It strongly encourages templating of pages for maximum code re-use. Templates for PHP are widely available, but they are a great deal more popular in JSP.
It is a common argument that because JSP is based on Java it scales better than PHP. This is not correct per se in the same way that most other over-generalisations are not correct (yes, I realise that is an over-generalisation too, and hence you are free to enjoy the irony!) - PHP scales perfectly well as long as you write your PHP scripts usi andng the same design patterns you would have used writing your JSPs.
JSP is a popular choice when existing back-end business logic is written in Java also, as this keeps the development team language-homogenous.
From: http://www.hudzilla.org/phpbook/read.php/2_2_5
Thanks to tilldoomsday for the link.
Posted by
Josh
Permanent link
Permanent link
Email Post to a Friend:
Comment Moderaton is ON: All comments will be checked before published.
Comments are free to post. Just keep them clean and on-topic.
59 Comments Published.
Great Article. An even more indepth pass of time and performance metrics would be pretty amazing but also very time consuming. Good job!
Anyway, I'm happy to discuss this more if you want, but I do think you need to do a bit more research.
You have a typo in the second to last paragraph, "usi andng the" should be "using the".
-John
+ CFML can be run on J2EE or even in .NET (MySpace.com) with the ability to share data/variables with those underlining technologies.
I agree mostly with your assessments, except for ColdFusion. I've had experience with ASP, PHP, and ColdFusion and when development time is taken into consideration, ColdFusion licensing costs are not that big of a deal. As well, I find ColdFusion a much richer language. You can create a recordset in 3 lines of code then loop through it in 3 more lines. Compare that to either ASP or PHP. It is easier for novices to pick up and use, but you probably won't hear most advanced users complaining very much either. It runs on top of Java, so you generally get most of the same features. And like PHP, it will run the same on whatever platform you install it on (Windows, Linux, Mac).
mixing up asp and asp.net simply shows that you have nno idea from what you're talking about.
Very one sided
yorrrfff kak kaak
aka it's an article selling php, not an impartial view of the web programming world
Have a nice day
Your information on coldFusion is so far out of date and thoroughly incorrect it is hard to comprehend. You seem to be discussing a version of coldFusion released circa version 4 (we are on version 7). For example, what proprietary IDE are you talking about? ColdFusion Studio hasn't existed for some time. A little research would have been worthwhile.
Obviously you haven't taken a good look at it 3 years. MySpace is running on ColdFusion - first Macromedia's, then NewAtlanta's BlueDragon.NET CFML implementation (switch was due to jdbc bottlenecks with microsoft sql server). That's one insanely trafficked website.
To lump ASP.net and ASP in the same category is silly. ASP.net is as sifferent from asp as it is from pearl or PHP. In fact ASP.net is colser to JSP than it is to ASP.
I have a feeling you are lacking in study in the area of ASP and ASP.NET.
light but good comparison of available languages, but why is Ruby missing?
From a language standpoint, both Java and the MS .NET langs are much more strongly object oriented when compared to PHP or Perl. PHP 5 has made strong inroads towards OO technique, but it is immature and still not to the same level (no proper namespaces, etc...). Perl and PHP performance is also hindered with threading issues when moving beyond trivial projects.
I'd be interested in seeing your assessment of Ruby on Rails.
Digg is pointing alot of these things out.
Cya !
The biggest advantage to ColdFusion is its IDE and the language it uses,
The main drawback to using ColdFusion is arguably its user-friendliness, which might sound odd at first, but let me clarify.
ColdFusion was bought out by Macromedia, and this has served to boost its corporate appeal in places where open-source is still frowned upon.
Perhaps you should read up a bit on CF before you comment on it.
You must not realize what you said about Cold Fusion is mostly crap and you are showing how little you know. Might want to do a little more research and edit that.
Good article. I think you should differentiate ASP from ASP.Net though, as they are certainly very different platforms; .Net shouldn't really be in there at all, as it isn't a scripting language.
I don't think you've ever coded a line of cfm.
There are so many issues with this short statement alone. Let's take the "proprietary IDE." One can only assume you are talking about ColdFusion Studio, which has been dead for about a decade. Nevermind the fact that CF Studio was not a requirement for developing CFML. And do I really need to get into the statement about the programmers? And "used to be popular"? Oh, and you completely negates the fact that there are several non-Adobe owned CFML engines out there.
Your information sounds like it is circa version 4 (and that is being generous). CF is now up to version 7.
Interesting. I would sure like to see a review of Aestiva's HTMLOS compared to these. I can't understand why it isn't more popular.
You can't really claim to have listed out the differences until you've addressed rails (and other ruby solutions) and zope (and other python solutions). All you've done here is describe the fast, messy, and damnably hard to maintain solutions.
Saying that Coldfusion is mainly used by newbies in a wizard-based IDE is a gross misstatement and helps spread
false and negative rumors about the language.
For starters:
-Cold fusion is not a wizard-oriented system, never has been.
-Cold fusion does not require nor have any form of proprietary IDE.
-If you list user-friendliness as its main drawback, you must also in the same breath also, state that it make very complex projects manageable.
-"Very often, stock ColdFusion has just one way to solve a problem" - "With PHP and Perl, because the languages are so flexible, you have much more control over what happens and why." ah, what? I also work with PHP, I see no more control over much of anything of note.
Informative!
I agree that ColdFusion's biggest drawback is inflexibility.
Very abstract article. The titles was promising more ;)
Finally, language crossover. Using CFMX, you can intermix Java and CF code in the same template. Using BlueDragon for .NET, you can combine whatever .NET language you want in your templates. Let's see any of the other languages do that.
Thanks
Man, what's with the CF Bashing? Most of your assumptions are woefully outdated and as others have commented.. just plain wrong. I'd much rather spend a few $$ upfront to get an easy to code environment than pay for extra hours of development throughout the life of the application. If you're developing anything of substance, you'll recoup that initial investment many times over by using CF.
Unfortunately, people will look at this article and think it comes from an "expert", but it looks like you used to be a Perl developer who now uses PHP. That is fine, but you should either do your research or not comment on other scripting languages.
I'd say something in defence of CF here, but Ray Camden has already waded in, I think he, along with the rest of the CF user's who have posted here, have alrady made the point. I willl be burying this article on Digg.
I hate coldfusion. And I have to use it everyday.
And CFDUMP rocks :)
Also, many very large websites run on CF such as MySpace,
Bank of America, and the US Senate to name a few.
JG commented that Perl is not strongly OO oriented when compared to .NET languages. I do not agree with that. That's because Perl is what you want it to be. You can make really cool purely object stuff in Perl. I coded Smalltalk and Java and I love the way Perl implements the object model beginning with version 5.
Holy crap! I've never seen a more whiney group of people commenting on what some guy wrote comparing a group of programming languages. If I wanted to see pointless bickering, I would head over to the Republican vs. Democrat websites and read their slugfests. If you don't like what this guy has written, think his comparisons are unfair, or think he has left out too many languages, then by all means write your own review.
Java/JSP and .Net are the only platforms worth building on. I've seen amazing things built with Perl, but it's just too hard to recruit the developers for a commercial product (Amazon swallows them all).
It will help my clients understand that PHP does rock!
Looks like nobody mentioned lasso... It easily competes with any of the current languages out there.
The book "PHP in a Nutshell" was published by O'Reilly in October 2005. Surely they did the research that this article is accused of skirting. Breathe, people, breathe...
with the introduction of CFMX6 and onward coldfusion servers are essentially java application servers -- at our shop like the speed just fine :)
Are you certain of your facts in general, because I am not.
I like the article although it seems somewhat biased toward php. There is also a spelling error
"PHP scales perfectly well as long as you write your PHP scripts ***usi andng*** the same design patterns you would have used writing your JSPs."
Great breakdown and discussion of the different languages.
I did up a Rosetta Stone for coding languages.
But it's sorely in need of an upgrade to include new languages.
They are truly object-oriented as well :-))
Thank you.
Great article, really!
Easy to read, full of great knowledge. Keep up the great work
Rich forms
XML forms
Dynamic PDF/FlashPaper generation
Integrated reporting
Integrated charting (Flash, JPEG and PNG format)
Event gateways (repond to things like SMS messages, Instant Messages, file activitiy on the server, etc)
Flex 2 integration
Integrated search engine (Verity K2 Server)
EAR/WAR and sourceless deployment
Administration API
Strong encryption
Clustering and instance support
Enterprise database connectivity
etc.
ColdFusion is a proven winner which is why, after 11 years this month, I am still using it.
I don’t even think that JSP technology should be used at all if you just want to create a small web page (unless you’re already a Java programmer), it’s overkill. JSPs should only be used when you have a true need for an enterprise solution. That’s why it’s part of the J2EE (Enterprise Edition) API.
I don't recall CFC's being available in version 5. I could be wrong, though I wouldn't bet on it.
Would be nice to know a bit about the author of this article. Sounds like a kid who just got out of a technical college and did a poor job of researching and obviously is lacking the experience.
friend, very big mistake exists in the text.
ColdFusion is a great language of the (World languages) the source 'font' is very wrong to say than CFML is a loss/bad language.
A follow up artical correcting the erroneousness of what you wrote about Coldfusion seems in order.
Post a Comment