C# Vs PHP

Status
Not open for further replies.

dukesx

New member
i have been using visual studio for a long time and have been developing simple web pages using it but it seems C# isnt that convenient when it comes to complex skinning and adding complex functionalities like ajax loading to it. i want to ask for an advice that should i continue over C# and compromise over advanced things or should i practice PHP ?
 

Peter

Member
C# is a general-purpose langauge. PHP is more designed to be used on web servers, which is probably why you find many things related to web development easier in PHP. Personally I would use PHP even if it was more difficult than C# simply because it's open source.
 

smalpierre

New member
Peter said:
C# is a general-purpose langauge. PHP is more designed to be used on web servers, which is probably why you find many things related to web development easier in PHP. Personally I would use PHP even if it was more difficult than C# simply because it's open source.

While it IS a general purpose language, ASP.NET whether coded in C# or vb.net is specifically for web applications - its the replacement for classic ASP. During the bank days, I coded classic ASP in vbs and jScript (not javascript, but close enough). I far prefer that to .NET

1. the .NET languages are not really compiled - they are "compiled" (really transpiled like SASS or HAML) into MSIL which is then in turn INTERPRETED just like any other script language by the RTL. So there's really no performance gain to be had since you're not creating machine code.

2. .NET makes simple things difficult - just like Java. Too much trixey non-standard methods of doing things - not enough getting things done.

3. Only recently has microsoft released open source asp.net runtime for Linux, good luck finding a shared host that actually has it. No runtime, no worky! You could always get Windows hosting on IIS, but it's expensive, slow, and generally just sucks. You'll also lose MySql probably - I'm assuming most MS servers are going to run MS Sql Server - which isn't TERRIBLE, but it's not all that great either. At least it isn't Oracle :D

Learn PHP - it's easy, it works well, it's fast, scalable, it works well with MySql, it's open source, and you'll find no shortage of examples, people to help out, servers that are set up to run it - and run it efficiently ...

If you want a good IDE that won't cost anything - Netbeans for PHP (I used it for years). When you get better at it and want to spend $100 on a better IDE there's PHPStorm. Both work with VCS and can run preprocessors like SASS and HAML, both have debuggers that hook into the browser so you can do variable watches - try THAT with an overgrown text editor :)

The PHP syntax is a lot like C languages, so it's not like you'll have to learn everything all over again ... and the documentation is pretty solid - although some of the examples are a bit obtuse at times.

.NET sucks for web development, almost as much as Java.


strokerace said:
dukesx said:
But isnt PHP a little too complex , especially after migration from C# ?

PHP is 1000 times easier then C#. I know PHP, but think C# is complex.

Asp.NET whether in C# or VB.NET is a clusterfork. I can't think of one single reason I'd use it over PHP. I'd build sites with C++ or Object Pascal before I'd use .NET. If .NET and Java were the last web programming languages available, I'd consider doing something more fun for a living - like working at a sewage treatment plant or something.
 
smalpierre said:
Peter said:
C# is a general-purpose langauge. PHP is more designed to be used on web servers, which is probably why you find many things related to web development easier in PHP. Personally I would use PHP even if it was more difficult than C# simply because it's open source.

While it IS a general purpose language, ASP.NET whether coded in C# or vb.net is specifically for web applications - its the replacement for classic ASP. During the bank days, I coded classic ASP in vbs and jScript (not javascript, but close enough). I far prefer that to .NET

1. the .NET languages are not really compiled - they are "compiled" (really transpiled like SASS or HAML) into MSIL which is then in turn INTERPRETED just like any other script language by the RTL. So there's really no performance gain to be had since you're not creating machine code.

2. .NET makes simple things difficult - just like Java. Too much trixey non-standard methods of doing things - not enough getting things done.

3. Only recently has microsoft released open source asp.net runtime for Linux, good luck finding a shared host that actually has it. No runtime, no worky! You could always get Windows hosting on IIS, but it's expensive, slow, and generally just sucks. You'll also lose MySql probably - I'm assuming most MS servers are going to run MS Sql Server - which isn't TERRIBLE, but it's not all that great either. At least it isn't Oracle :D

Learn PHP - it's easy, it works well, it's fast, scalable, it works well with MySql, it's open source, and you'll find no shortage of examples, people to help out, servers that are set up to run it - and run it efficiently ...

If you want a good IDE that won't cost anything - Netbeans for PHP (I used it for years). When you get better at it and want to spend $100 on a better IDE there's PHPStorm. Both work with VCS and can run preprocessors like SASS and HAML, both have debuggers that hook into the browser so you can do variable watches - try THAT with an overgrown text editor :)

The PHP syntax is a lot like C languages, so it's not like you'll have to learn everything all over again ... and the documentation is pretty solid - although some of the examples are a bit obtuse at times.

.NET sucks for web development, almost as much as Java.


strokerace said:
dukesx said:
But isnt PHP a little too complex , especially after migration from C# ?

PHP is 1000 times easier then C#. I know PHP, but think C# is complex.

Asp.NET whether in C# or VB.NET is a clusterfork. I can't think of one single reason I'd use it over PHP. I'd build sites with C++ or Object Pascal before I'd use .NET. If .NET and Java were the last web programming languages available, I'd consider doing something more fun for a living - like working at a sewage treatment plant or something.


Ok, I think I may have used the wrong syntax, Its may not have been .asp, but something else. It is 3 letter. I was certain is ASP. as someone once converted my site files into it. It was a bit different then PHP, And from what I understood, it had nothing to do with .NET or VB.
 

smalpierre

New member
asp is Active Server Pages. It's done almost identically to PHP, only the language is different - since it's Microsoft, you have to use Microsofts scripting languages - vb, or jscript

.net is a different animal. C# was made for .NET, and visual basic was brought in because there were a LOT of people using Visual Basic 6, and writing ASP sites in VBS - the scripting version. I'm pretty sure that VB always needed a runtime, so IT wasn't truly compiled either - but I could be mistaken it's been a long time. I'm pretty sure that you needed a runtime, but it was available on all MS computers so nobody noticed it like you do with Java where it's got to be installed. Anyway - no pointers, no DMA - not a language I used a whole lot.

There were a bunch of legacy apps in VB at the bank though so sometimes I had to do what I had to do ...


I actually still have a backup of an old site done in classic ASP - I lost the database for it somewhere along the line, but I could rebuild it out of the code - it was a sql server database.


https://en.wikipedia.org/wiki/Active_Server_Pages
 

ghasemeng

New member
I always say to my friends that please dont disturb yourself with language comparison!
both php and asp.net are good and can do same things.
if you are expert in .net framework, so you have to use asp.net!because it is very similar to c# and you can easily be expert in asp.net too.
but if you want use a cross-platform and open source language for server side you have to use php or jsp.
please specify your field always first!
because all programming languages are good and each one have a special applications...
best regards
 

riddict

New member
If your need can be covered by the current programming language than that's it, why bother change your coding language?
Unless, if you have something in mind and can be realized by using certain language, than that leave you no choice right?
But, as far as I know, PHP is the first choice of language for processing your web application from server side, Ajax in the other hand is a client side code.
 

CHT

New member
I request for this topic to be closed, as C# is not a programming language for web stuff. The one that can be used for web development is ASP or ASP.NET.
C# is for "desktop" applications, which technically require you running a file instead of opening a link.
 
Status
Not open for further replies.