Link to home
Start Free TrialLog in
Avatar of rebies
rebies

asked on

PHP vs ASP vs JSP vs ColdFusion vs PERL

Hi everyone.  I've been a web developer for some time and was recently wondering the differences in each of the major server side programming languages.  I've developed PERL and JSP in the past, currently do some PHP and mostly ColdFusion programming.  But overall what are the benefits and or limitations of each language?

--
*PLEASE TRY TO NOT POST BIASED OPINIONS*  *TRY TO BE FAIR AND DONT SAY "PHP IS THE BEST BECAUSE I USE IT"!!!*  Everyone has their own opinions and nobody here is an expert in every server side language!  Also, the one person with the most well-thought out response will be awarded the answer.
--

Primarily, what are the biggest benefits and downfalls of each language?  Is any server-side language more stable than the others?  In general, if I wrote the exact same website in every language, would one of the languages stand out in out-performing and being able to handle a higher load than the others?   (Yes, yes, this last question will depend on what functions you use, what the website does, is there database connectivity and more.  So assume this one website would use database connections, do a fair amount of server side processing, some basic regular expressions, and some file manipulation.)

And yes, I'm simply curious.  I am not being asked to do this comparison and am not trying to pick a new language of preference.  I'm just trying to do my job and know the field the best that I can!
Avatar of rebies
rebies

ASKER

I'll start by saying what I've seen:

------
ColdFusion Benefits - Very easy to use, very simple database support, very good search engine (Verity) that comes bundled with it.  Cold Fusion allows prototypes to be built much easier, cheaper and faster.  Today, if you don't like Macromedia you can install a free Cold Fusion application server by New Atlanta called BlueDragon.  (My CF Experience: 9/10)

ColdFusion Downfalls - Both Macromedia CFMX and New Atlanta's BlueDragon can sometimes be very unstable (yes, personally I've run into many problems on both platforms.)  Macromedia's Cold Fusion is also very expensive!  (My CF Experience: 9/10)
------
PERL Benefits - Great regular expressions, very fast with text manipulation, extremely powerful and stable platform.  Mostly used under unix/linux but with ActivePerl you can install and run on Windows very well too.  It is unique in that PERL can be used for much more than a server-side programming language for websites!  (My PERL Experience: 4/10)

PERL Downfalls - Less and less people use PERL due to the fact that PHP, Cold Fusion, etc are easier to use and people have moved their server-side applications to other platforms.  (My PERL Experience: 4/10)
------
PHP Benefits - Good regular expressions, very fast open-source language.  It has become so popular, is free and open source and thus has the biggest following of any server side language right now.  (My guess anyway)  Also, because of this popularity it is one of the cheaper languages to develop in.   There are a lot of very good PHP developers currently out there, which is more than can be said for most of the other server-side programming languages. (My PHP Experience: 3/10)

PHP Downfalls - Really cumbersome database connections.  Personally I've done one install that took 6 or 7 seconds to make any page view, even if there was no PHP code in it.  Because of this I might venture to say it is not 100% stable, but I will admit that this could be with any program you install and might have nothing to do with PHP. (My PHP Experience: 3/10)
------
ASP / ASP.Net - This is the "cool factor" for medium-sized, Internet based companies.  They think moving to ASP will solve all of their problems.  I don't know if it will or won't and can't comment any further since I have barely worked with ASP.  And this is not a rip on ASP, it is what I have seen but can not comment on myself. (My ASP Experience: 1/10)
------
JSP - Integrates with existing Java and Java classes very well.  This makes it a great solution for many companies.  However, Java is a very slow language because it has been written for portability.  Thus I could only imagine that the average server load that can be handled by JSP is far less than that of the other languages.  But honestly, this is not a fact and only speculation.  (My JSP Experience: 0.2/10)
------

I will also say all languages are harder to write and understand than Cold Fusion is.  However, this makes each of them slightly more powerful than Cold Fusion and slightly better suited for more advanced techniques.

I will also say that each language has it's benefits and downfalls and from what I've seen each one can be used to develop and deploy practically any application.
Avatar of rebies

ASKER

Also, please post your experience with each language so that we can know how much to read into what you might say about each language:

1 - You can identify the code
2 -
3 - You've worked with in the past on a project, but are not well versed in it
4 -
5 - You can develop in the language moderately well
6 -
7 - You have done at least a year of work primarily on this language
8 -
9 - You have done years of work with this language, you are an expert, but not a top-notch guru
10 - You know every detail about the language and probably helped develop it
ASKER CERTIFIED SOLUTION
Avatar of stockcowboy
stockcowboy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rebies

ASKER

stockcowboy:

Nice concise overview of each one.  Can you explain this comment a bit further about ColdFusion?

>> Didn't scale as well as the other languages (when i used it in the past)

Would CF crash under higher loads?  Would it slow down to a crawl?  Or what exactly are you meaning when you say "Didn't scale as well"?  Were you clustering CF at the time or just running it on one server?  And because you said "before java intragration" I assume this means you were running CF 4.5 or 5.0?   (Funny, because I've personally found CF to be far less stable after the java integration)
I use php and have for a few years now. Its strongest bonus IMO is that it is free! Downs development costs to a minimum. Also, it is easy to setup and can run on a huge number of os. It works with many webservers and supports mySQL 'natively'.
As far as the language itself is concerned, it is quite C-like which makes it easy to learn it given you already know C (not c++ as like most scripting languages it is not really object oriented)

ASP I have only tested for a short time. It supports COM very well (well, no wonder, it is a MS technology) and therefore allows usage of (maybe existing code). Same goes for ASP.NET in a way...
Both technologies are more object oriented and focus on using classes whereas php provides c-style functions for all its apis.

JSP, ColdFusion and Perl I have never used.
JSP provides a java-like syntax, the rest I didn't try as they they don't provide a syntax 'similiar' to a language I already knew. (Using a web language resembling a language I knew was my top priority)
Also, IIRC the all have more requirements concerning your OS, webserver, database .... OR/AND require more 3rd party $ software than php (did for me).
Avatar of Zyloch
Based on my experience:

PHP
------------------
I would rate myself a 6.5 according to rebies' scale. It's free of course, and faster than a lot of other free server-side languages. Putting aside installation aside, it's pretty easy to connect to MySQL so that's a big plus to a lot of people, especially since a lot of free web hosts (keeping with the free theme here), have mysql on them.

However, PHP is getting a little out of date with Apache 2 (well, not exactly PHP but the third party stuff that basically make up PHP and its advanced features that you would probably need sometime)


ASP
----------------------------
I've checked it out and I'm willing to bet that Daij-Djan is mostly right with its COM support. Don't know much about it but I'm really betting that it has some pretty good support with special things that Microsoft made. I've heard of postbacks, not sure how to use them, but they sound pretty good

JSP
----------------------------
Almost no idea. It looks pretty difficult with all that Java, but this site is made with it, so it can't be that bad

ColdFusion
----------------------------
I'm poor, but the tag syntax maybe makes it easier for HTML developers? Dunno, don't take my word on this one. All I know is it costs money and I got none.

Perl
----------------------------
Now this is a language I really like. I once used it to build something that'll automatically power my character up in a RPG (ok, it's kinda unethical, but who'll know?)

Well, since we're talking about web sites though and not standalone Perl programs, I amazingly haven't programmed in CGI too much. I became a bit lazy after reading 19 chapters in my Perl book and CGI was 20-22, but I have some experience. Like everyone says, Perl has great regex support, it was developed for it (of course, Practical Extraction and Reporting Language). Many languages now have support for regex, but Perl will always be #1 in it.

Avatar of rebies

ASKER

>> ColdFusion
>> ----------------------------
>> I'm poor, but the tag syntax maybe makes it easier for HTML
>> developers? Dunno, don't take my word on this one. All I know
>> is it costs money and I got none.

Yes, this is why I started developing Cold Fusion 4 years ago.  It is the tag syntax of CF that makes it so easy for HTML developers to learn it.  Also, the tags that Cold Fusion provides makes it extremely easy to do advanced things.  In my opinion what takes 4 lines of code in a lot of languages only takes one line of code in CF.  But with that advanced, simple functionality you lose a bit of control and can't do everything exactly the way you want to.  (Like PHP or PERL from my experience)

Also, as for the money thing I agree completely!  I was really looking to migrate away from ColdFusion up until a few months ago because the costs really are really prohibitive.  Unfortunately CF is what I know and thus I was "stuck" with ColdFusion unless I wanted to really learn another language and take the time to migrate all of my applications.  This was not a good situation to be stuck in.   Fortunately, like I said earlier, New Atlanta now has a ColdFusion engine named BlueDragon that is free to use and that has made a big difference.  I'm still working with it and like it a lot.  Unfortunately I'm still haveing some stability issues and might consider migrating to PHP and MySQL in the future if BlueDragon does not stand up to the competition.

>> Many languages now have support for regex, but Perl will always be #1 in it.

Agreed.  I would say the same thing.
I used CF for 3-4 years - I have a few popular custom tags on cf's site. Up until version 4.5.   I was the development manager for a dot com back in 2000 that used it - we had 10 CF servers behind a hardware load balancer.  We'd routinely have to reboot the servers every 1-2 weeks back then.  Since I haven't used it since then (4.5) I can say if its better now personally - but if your saying its worse that sucks then...  In terms of requests per second - asp.net can handle alot more requests per second.   In my current business my single (but large) asp.net server handles more requests then all 10 CF servers back in 2000 - and I think i've only rebooted it once in 6 months - and that was for a config change.  PHP and mysql are great though - very solid too and a lot of built in functions like your used to in CF - and moving your apps from cf to it could be a pain.  But its worth your time to do your next small "from scratch" app.

The PHP has one of the best web sites for learning it too.

http://www.php.net/manual/en/
The clear up some confusion, ASP.NET is also free. If you download ASP.NET Web Matrix (free, http://www.asp.net), it comes with a very light-weight server called Cassini which can run ASP.NET locally. I developed with PHP for about 2 months before switching to ASP.NET which I've been using for the last 10 months. I am much more productive with ASP.NET than I ever could be with PHP, but that's just my opinion. PHP syntax is more like C while ASP.NET syntax is either C#, which is comparable to Java/C++ or you can use Visual Basic .NET. It really depends on what type of server you're targeting. If your production server is running a UNIX/Linux variant, I would go with PHP, but if the server is running Windows NT/2000/2003 Server, I would definitely look into ASP.NET. One of the biggest advantages with ASP.NET is the underlying .NET Frameworks which makes dealing with files, string manipulation, regular expressions, databases, and XML, among other things, very easy. One closing note, do not use any ASP prejudices against ASP.NET. ASP and ASP.NET are completely different in operation, performance, and coding styles.
All in all, the point is to do what you know, to find a language you feel like learning or is easy for you, learn it, program in it, and if you find something that can only be done in another language, curse yourself to kingdom come and then pay someone to do it for you =)
yup!
hehe - yip
Avatar of rebies

ASKER

Thanks guys.  Very informative information and professional.  Because I said "Also, the one person with the most well-thought out response will be awarded the answer.", I had to pick one person here.  Stockcowboy gets the accepted answer as his overview was the most concise and was able to cover every language in question.

Andrew
Avatar of rebies

ASKER

I would like to point out that I was so pleased with this topic and all that everyone had to share that I opened a topic about comparing different databases:

Title: Microsoft SQL vs MySQL vs Oracle vs PostgreSQL
https://www.experts-exchange.com/questions/21200353/Microsoft-SQL-vs-MySQL-vs-Oracle-vs-PostgreSQL.html

For anyone who finds this thread useful in the future you might be interested.  Also - anyone who participated in this thread, I would encourage you to share in the new topic if you have related experience!!

Andrew