Server Side Languages

Programming, for all ages and all languages.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Server Side Languages

Post by AJ »

Hi,

I was recently asked by a friend about Server-Side languages. They are planning to do evening-classes in web design and have been looking at PHP / ASP.NET. Although this will just be a hobby for them initially, they may consider a change of career if they like it.

So my question is not really "which is better" (no flame wars, please). It's more "Which web design technology is more of an industry standard? / which is more likely to lead to work in web design?". Would it just be best to learn both so that one technology could be used where the other falls down? Not being in the industry myself and only having ASP.NET knowlege, I really have very little idea what path to recommend.

I'm aware that people get very emotive about which technology to use and don't want them to select the wrong path simply because they have spoken to an ASP.NET / PHP zealot!

Thanks for your objective answers!
Adam
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Server Side Languages

Post by pcmattman »

It really depends on the server software in use (ie, how much your friend is willing to pay ;) ), as much as it depends on comfort in the languages themselves.

For instance, if you're working on Windows (perhaps with Sharepoint or just a stock web server, this is not cheap) the best choice would be ASP .NET. It's probably more of a Windows world industry standard, at least for those who are working with Windows servers (whether voluntarily or involuntarily). Knowing ASP .NET will probably bring in more career opportunities.

PHP will work on most systems with a half-decent HTTP server (Apache seems to be the most popular choice) - this means it's cheap. It's also extremely easy to learn, and the documentation for each function is second-to-none (close to the MSDN, I'd say). PHP can also bring in career opportunities, but I wouldn't call it an industry standard when comparing to ASP .NET (others with more knowledge in the field might beg to differ).

ASP .NET:
  • High standard of documentation and easy to find out how to do something
  • Used widely in the industry where Windows servers are at work (IIS etc...)
  • Allows code-behind modules in C# or VB, allowing a little more flexibility (at a performance cost)
PHP:
  • Each function is documented - you can literally Google a PHP function and get a result instantly (and some match POSIX's definition too). There are also hundreds of tutorials out there to do just about anything
  • Practically any half-decent web host will provide PHP, and it's free (Apache + PHP on a local machine gives a very cheap system to play with while learning)
  • Open source (as if that actually matters)
I've totally oversimplified this, but I hope the main idea still comes across right. Others will correct/fill in the gaps later.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Server Side Languages

Post by Combuster »

Googlism says:
php developers (156 million hits) are 3x as wanted as ASP developers (50 million hits), and half those times, they mention PHP too (22 million hits). Correcting for that makes 134 million for PHP versus 28 million for ASP, which differs by about a factor 5. Which matches my personal observations that I rarely see ASP positions, compared to PHP.

So you can add the "PHP is more popular" as an argument.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
MasterLee
Member
Member
Posts: 90
Joined: Fri Mar 13, 2009 8:51 am

Re: Server Side Languages

Post by MasterLee »

Combuster wrote:Googlism says:
php developers (156 million hits) are 3x as wanted as ASP developers (50 million hits), and half those times, they mention PHP too (22 million hits). Correcting for that makes 134 million for PHP versus 28 million for ASP, which differs by about a factor 5. Which matches my personal observations that I rarely see ASP positions, compared to PHP.
There are 132 Million hits when you search for 'JSP developers'.
50₰
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Server Side Languages

Post by Owen »

If you'd ever worked with JSP, you'd understand why: Nobody likes it ;)

I regularly see businesses running their sites on ASP.net, PHP and Java (Among others!). It really seems to just depend on the business; pick whichever you feel most comfortable with.

I'd evangelize Django though, but failing that, PHP is never a bad choice.
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: Server Side Languages

Post by AndrewAPrice »

pcmattman wrote:Allows code-behind modules in C# or VB, allowing a little more flexibility (at a performance cost)
How are you so sure? As far as I know ASP.Net JITs pages into a cache and stores it in native machine code on the server the first time a page is requested, PHP requires a 3rd part solution (phc, or Roadsend).

In saying that, PHP is the server-side language I'm most familiar with and would choose.

If you want raw speed, you could write your webpages in pure C, C++, or any other compiled language. Though for security reasons many servers don't allow this so it's not a popular choice.
My OS is Perception.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Server Side Languages

Post by AJ »

Thanks for the replies and for throwing DJango/JSP in to the mix! I'm still not certain which way to suggest but will point them towards this thread. I realise that some Googling and asking around is also in order.

As for the open-sourceness of PHP - that doesn't really matter although the cost considerations of ASP.NET may do. Of course with getting started, the bundled IIS is probably sufficient, but it would possibly be a problem if the site then has to be uploaded to a provider who's going to charge a lot more. I've just had a look at my own basic 1&1 package, which includes PHP as standard, but you have to pay a fair bit more for ASP.NET.

Cheers,
Adam
MasterLee
Member
Member
Posts: 90
Joined: Fri Mar 13, 2009 8:51 am

Re: Server Side Languages

Post by MasterLee »

JSP is loved by the General Management ;)

DJango is an Python Framework. But an more general web server interface for python would be WSGI. Also you could use perl and mason that is what amazon does.

By the way i hope that Pedrigree support for python will raise and support at least the wsgiref modul some day.
50₰
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Server Side Languages

Post by Owen »

Raw WSGI is like programming a raw CGI: About as much fun as gouging one's eyeballs out ;)
nedbrek
Member
Member
Posts: 44
Joined: Tue Dec 15, 2009 6:36 pm

Re: Server Side Languages

Post by nedbrek »

You know a bit of programming is bad when an OSDev'er says it's bad. We program in raw asm to the bare metal!

(And yes, I have written raw CGI...)
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Server Side Languages

Post by Brynet-Inc »

nedbrek wrote:(And yes, I have written raw CGI...)
It's not a language.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
MasterLee
Member
Member
Posts: 90
Joined: Fri Mar 13, 2009 8:51 am

Re: Server Side Languages

Post by MasterLee »

Using CGI and Assembler would be an option too ;)

Or use TNTNET and C++
50₰
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: Server Side Languages

Post by earlz »

Ok, I am quite experienced in both languages. I have been working in ASP.Net(C#) for over 6 months now in my job. I've been using PHP for websites for god knows how long... (though I don't work on websites that much so I know them about equally). Personally, I prefer PHP as it's more "free form".. Sure it's a bit hackish around the edges, but it's trivial to get most stuff working, and the page lifecycle and strictness of ASP.Net might be good at times, but it seems to get in my way a lot more than it should..

Ok now my unbiased opinion of the two.

ASP.Net has 26918 hits for stackoverflow(for the tag) and PHP has 25365 hits. So they are about equal in programmer popularity.

ASP.Net has the pro of being able to develop in just about any language, including Ruby and Python and others and still remaining fairly constant in speed. ASP.Net can also run on *nix OSs because it runs on Mono(it works well too. We do it for a commercial application at work).

Now for PHP.
PHP is supported on almost every free and commercial host out there. Knowing PHP means you can manage just about every PHP application out there(minus framework weirdness), unlike in ASP.Net where you never know what language your up against. PHP is very simple to get started. Making a hello world is a simple as a line of code on all platforms. PHP is much more freeform. You don't like how PHP is rendering the page? Well thats your own fault, and thus you can change it without being considered it being considered inappropriate. You always know exactly whats going on.

</unbiased>

I would compare the two somewhat similar to "theoretical-portable assembly" vs. C++ where assembly is actually HTML... PHP is much closer to the HTML than ASP.Net...

Everything is possible without hacking in PHP. The same can not be said in ASP.Net (unless you count custom protocol handlers as non-hacking)
User avatar
gravaera
Member
Member
Posts: 737
Joined: Tue Jun 02, 2009 4:35 pm
Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.

Re: Server Side Languages

Post by gravaera »

Brynet-Inc wrote:
nedbrek wrote:(And yes, I have written raw CGI...)
It's not a language.
I found this to be particularly funny, probably because I'm very tired after doing tonnes of UNI assignments, and knowing that I have much more to do for tomorrow.

Anyway: I can only offer a biased "PHP is easy to use and widely installed and supported."

The reason I say it's a biased statement on my part is that I've never learned any SS langs other than PHP, anyway.
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
nedbrek
Member
Member
Posts: 44
Joined: Tue Dec 15, 2009 6:36 pm

Re: Server Side Languages

Post by nedbrek »

Brynet-Inc wrote:
nedbrek wrote:(And yes, I have written raw CGI...)
It's not a language.
Ok, technically I was writing Perl which wrote the raw CGI responses...
Post Reply