Archived

This topic is now archived and is closed to further replies.

H0bbes

C# Vs PHP

Recommended Posts

H0bbes    127
I like to know how is the better language to do a web page. C# is more easy to programming(in my opinion), but i don''t know if c# is more slowly when page is run. Or if is better to programming with PHP because is free and is more faster when tunning. what you advise me? I like to know is someone else can help me. Thamk you.

Share this post


Link to post
Share on other sites
H0bbes    127
quote:
Original post by Tommy Carlier
2. PHP is faster than ASP.NET.



Do you know +/- the diferrence os speed between (PHP and ASP.NET)

And tnhak you to help me

Share this post


Link to post
Share on other sites
eleusive    300
Actually, you can get ASP.net for free. Do a google search for "web matrix". It is a WYSIWYG(What you see is what you get) IDE that supports database operations, c# and vb(as well as some other languages) integration for free.

Share this post


Link to post
Share on other sites
Ardaxus    122
Seriously guys, at least know something about the topic before giving a definitive answer

ASP.Net is most definitely free. What is not free, is Microsoft''s IDE for .Net development, Visual Studio.Net. But you don''t need that. As the last poster said, look for webmatrix. you can find it at www.asp.net.

Additionally, PHP is an interpreted language (I think?) and anything written for the .Net framework, i.e. ASP.Net and C#, is fully compiled. I think you''ll find that as a result, an ASP.Net website will most definitely run faster than a PHP website. Of course, a very badly written ASP.Net website could well run slower than a very efficiently written PHP website.

If you''re anti-Microsoft, then you still don''t have an issue because C# was released as an open specification and a full open-source implementation of the .Net framework is available (although under continual development). It is called Mono, and you can get it here.

Snowman | Ardaxus | Nathan

Share this post


Link to post
Share on other sites
Fidelio66    164
quote:
Original post by H0bbes
quote:
Original post by Tommy Carlier
2. PHP is faster than ASP.NET.



Do you know +/- the diferrence os speed between (PHP and ASP.NET)

And tnhak you to help me




Usually people (especially beginners) choose something out of the blue that sounds cool, and defend it any way they can. How exactly an interpreted scripting language can be faster than (JIT-)compiled C# programs remains to be seen.

By the way, only beginners choose tools purely based on what is ''fastest''. Like with anything, speed depends much more on your design and programming skills than on the tools used.

Share this post


Link to post
Share on other sites
Matei    190
PHP can also be compiled with some extra tools, but yes, ASP.NET code will always be compiled and not interpreted.

Unless you're going to be having tens of thousands of hits per second or doing huge computations in each page, it probably won't be noticeable anyway.

[edited by - Matei on May 25, 2004 8:30:03 AM]

Share this post


Link to post
Share on other sites
Tommy Carlier    142
Interpreted languages can be faster than compiled/jitted languages: depends on both the interpreter and the compiler.

The speed of PHP/ASP.NET depends on the speed of the underlying webserver. I don''t know if you can run ASP.NET on webservers other than IIS. I do know that IIS is not the fastest webserver. Apache running on Windows is a lot faster than IIS. Apache running on Unix/Linux is even faster.

BTW: I''m not anti-Microsoft, and I don''t even use PHP. At work, I make C#-programs (rich client/server: Windows Forms-client + ASP.NET/IIS-server).


tommy online: http://users.pandora.be/tommycarlier

Share this post


Link to post
Share on other sites
VizOne    598
I use ASP.NET for some time now and would never go back to php for several reasons:
- a compiled language supports compile time error checking
- ASP.NET is way easier to debug than php
- C# is typesafe
- true object oriented programming.
- you actually build web-applications rather than scripting some spaghetti-code (and don't tell me that php does NOT encourage/enforce a "debatable" coding style).
- separating code from layout is much easier (code-behind)

Of course, ASP.NET has some flaws for example:
- only one form per page can be runat="Server"
- ASP.NET needs a compatible server/webspace, those are not that common yet
- as the IIS stops ASP.NET application after a while, it sometimes takes a while to restart the application. Check gentlestorm.de, it might take some time before the first page appears, due to the fact that it is not visited regularly and thus stopped by the server. You will notice however, that from the second click on the page will be fast.

Still something about speed: as most bigger websites use databases, the speed of the language used does not matter that much. The database access will always take longer than interpreting the page. However, the overall serverload for interpreted websites might be larger than that for non-interpreted.

Regards,
Andre Loker

[edited by - VizOne on May 25, 2004 9:58:27 AM]

Share this post


Link to post
Share on other sites
igni ferroque    415
I'm assuming you're planning on a relatively small site (since you didn't provide any information about what exactly you web page will do), and for that I suggest PHP. The basic design principle -- adding blocks of dynamic content to plain HTML files -- makes for simple straightforward development. PHP also has a large and diverse user base, and it's included with most ISP hosting plans.

As VizOne pointed out, PHP isn't well-suited for large applications. Most relatively large projects (message boards, online storefronts, etc.) that I have seen are a big mess of really ugly code. They're still pretty fast, but extending/tweaking them is a pain in the ass. If you plan what you're doing carefully enough that will never be an issue.

[edited by - igni ferroque on May 25, 2004 5:12:05 PM]

Share this post


Link to post
Share on other sites
Imperil    100
quote:
Original post by Tommy Carlier
I have no programming experience with PHP, but I do know this:
1. PHP is free, ASP.NET is not free.
2. PHP is faster than ASP.NET.


tommy online: http://users.pandora.be/tommycarlier


[edited by - Tommy Carlier on May 25, 2004 5:47:00 AM]



lol worst post ever.

1.) ASP.NET is COMPLETELY free and runs on Windows and *nix Os's with many different web server solutions.

2.) I can't believe someone actually posted this, I've never seen it before.

ASP.NET/C# is the fastest web solution to date right now. In MANY cases (that you can look up if you'd like) the C#/ASP.NET applications run up to 29 times faster depending on the application. PHP applications running faster have to be one of the most uninformed things I've read... I mean do you serously think that PHP runs at 97% of the performance of C++?

Also PHP doesn't nearly have the featureset of using the .NET framework and C#.


[edited by - imperil on May 25, 2004 5:17:08 PM]

Share this post


Link to post
Share on other sites
afterburn    124
quote:
Original post by Tommy Carlier
I have no programming experience with PHP, but I do know this:
1. PHP is free, ASP.NET is not free.
2. PHP is faster than ASP.NET.


tommy online: http://users.pandora.be/tommycarlier


[edited by - Tommy Carlier on May 25, 2004 5:47:00 AM]


How is asp.net not free? The framework is downloadable from MSDN or windows update.

PHP is not faster than C# as C# compiles using JIT. after the JIT its almost as fast as C/C++.

Share this post


Link to post
Share on other sites
afterburn    124
VisOne :

that is a configuration in IIS6 it does not stop in IIS5. Runs until the app closes. IIS 6 can also schedule process recycles exact times or page hits.

Share this post


Link to post
Share on other sites
VizOne    598
quote:
Original post by afterburn
VisOne :

that is a configuration in IIS6 it does not stop in IIS5. Runs until the app closes. IIS 6 can also schedule process recycles exact times or page hits.


Oh, thx, nice to know!

Regards,
Andre Loker

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
On what systems (OS / webserver ) can i run asp.net ?
Are those free as well ?

Share this post


Link to post
Share on other sites
Puzzler183    540
I used to use ASP, and it was nowhere near powerful enough for what I needed. Now I use PHP. I won''t switch to ASP.NET because PHP has yet to fail to do what I need it to. It supports everything I need (image generation, XML parsing, XSLT serverside, etc.) and the speed difference doesn''t matter. Not to mention, if I need .NET, there is an interface for it. About it being harder to debug, well maybe if you are awesome retarded you might have some trouble.

Share this post


Link to post
Share on other sites