Vivek Thakur

Chaotically Complex

  Home  |   Contact  |   Syndication    |   Login
  105 Posts | 1 Stories | 491 Comments | 65 Trackbacks

News



Archives

ASP.NET Ventures

*******************
Note: view the updated entry below:

http://www.codeasp.net/blogs/vivek_iit/microsoft.net/4/aspnet-vs-php

*******************

posted on Wednesday, July 02, 2008 12:42 AM

Feedback

# re: ASP.NET vs PHP 7/2/2008 6:03 AM Glenn
I totally agree. All of the proponents of PHP that I've ever met support PHP because they have some kind of altruistic beef with Microsoft and/or because they know very little about .NET - never basing their judgements just on the merits of each platform. Few developers really have a deep understanding of .NET, which is an extraordinarily deep and complex platform. Comparing PHP to ASP.NET is like comparing the broadsword to the AK47.

I suppose they both get the job done, but...

# re: ASP.NET vs PHP 7/3/2008 10:39 PM Bob
more faster?

# re: ASP.NET vs PHP 7/3/2008 10:43 PM Bob
I'm working on ASP.Net for a long time now. In a nutshell, whichever technology gives you faster results to satisfy the needs is the one you should go with. For basic/static/simple sites, PHP is great as you can see a millions of sites are using PHP till date. There's nothing wrong with it. The hardware is cheap for those sites, dirt cheap.

On the biased side, I like MS technologies, just like that. ;)

# re: ASP.NET vs PHP 7/16/2008 3:28 PM Souvik Das
I dont think as far as the hrdware is concerned ASP.NET cost less than PHP.Go to any hosting site and see the cost of hosting of an ASP.NET site compared to a PHP site.
I also found PHP sites are fatser than ASP.NET site.

# re: ASP.NET vs PHP 7/17/2008 5:48 AM Vivek Thakur
Simple hosting site prices are not an indicator. The basic hosing price is low just because Windows OS is more costly than Linux.

But here I am talking about medium to big applications, where PHP fails miserably. PHP needs more processing power than ASP.NET when we talk about mide-large size commercial applications. A lot of my clients noticed this cost reduction when the converted from PHP to ASP.NET!

And do a simple test, if the hardware is same then PHP is slower than ASP.NET because PHP is a scripted language unlike compiled ASP.NET applications. It will be slower by default.

# re: ASP.NET vs PHP 8/18/2008 8:18 PM jason baisden

I see what you guys are saying, but why is it that some of the really huge sites are done in php? Aren't FaceBook and MySpace both php? I could be wrong, and please correct me if I am....

I've also seen many banking sites in php as well. Granted Wachovia is one of the few large scale sites that I've seen use ASP .NET. Furthermore, it worked extremely well for them too.



# re: ASP.NET vs PHP 8/18/2008 8:50 PM Vivek Thakur
MySpace was in ColfFusion, but they converted the entire website to ASP.NET because they were facing a lot of issues. With ASP.NET they got good performance improvements and reduced hardware hosting costs by a decent margin (some pages still have .cfm extension but they hit the ASP.NET runtime process).

Facebook is having a lot of issues with PHP: source code leaks, slow site performance and exponentially increasing hard ware costs. PHP was not made to serve such large users, but facebook grew so fast that they never got time to convert it to any other bette platform. Last year Facebooks revenues dipped because of ever increasing hardware needed to support such a huge site. Microsoft has invested in FB and now it is helping them to make it better.

Vivek

# re: ASP.NET vs PHP 9/10/2008 2:06 PM Anz
What about Wikipedia and Youtube or even Google and Yahoo.. none of them are using Asp.Net!!

# re: ASP.NET vs PHP 9/10/2008 2:21 PM Anti-MS
Yahoo runs on HUGE powerful servers, and it doesnt matter what technology giants like yahoo or google will use, they have simply too much server power avail to them!!!

but a big example is MySpace, which experienced 5 times speed gain after switching to ASP.NET!

Google is now planning to have data centres on the sea surface!

# re: ASP.NET vs PHP 9/15/2008 3:11 PM Anz
Okey..server support is a fact..

but please check this article

http://msdn.microsoft.com/en-us/magazine/cc163463.aspx

to see the scalability about usual Asp.Net web form sites.

If u need scalability like MySpace and all,, u have to do asynchronous kind of advanced programming and that will definitely increase the application cost..

Also there is a comment from Anti-MS community that "Orkut is the only bug of Google and its in Asp.Net."

Between am a .Net developer and not anti-ms ;)


# re: ASP.NET vs PHP 9/18/2008 1:04 AM bitpshr
"ASP.NET being object oriented is more "organized" and maintainable than scripted PHP. Besides being fully compiled, ASP.NET platform offers loads of pure OO features like inheritance, polymorphism, overloading etc. Newer versions of PHP support OOP but its very limited compared to ASP.NET."

.Net is a FRAMEWORK, not a language. therefore the above point is only half true, and still debatable at that :-)

The OO features of the PHP are indeed less robust than C# (the language most often used with ASP.NET - at least among the devs i know) or Java for instance. However, the basic concepts are incorporated into the language - as much as can be done with a dynamically typed language. Having said that, PHP itself doesnt promote unorganized or hard to maintain code... Thats the developers problem. In fact, anyone working on a large project is using a framework if the are in thier right mind - whether that be something home rolled or one of the publically available ones (ie. Cake, Symfony, CodeIgniter, etc..). If youre going to compare you really need to compare ASP.NET to PHP in combination with a framework.

In terms of scaleability in most cases this has little to do with the language, but rather how the application was developed. Its entirely possible to make an unscalable .Net app jsut as it is entirely Possible to make a robust PHP application.

As for some of the examples in the comments:

Actually MySpace had issues because it was developed POORLY, not because it ran under ColdFusion. <exaggeration>Not to mention any time the project lead changed the language changed</exaggeration> so so there were some components written in CF, some in PHP, and some in .NET (while FuseBox was used as a cross language framework). I know this because I had a buddy that worked at the firm that actually maintained the application.

In terms of FB... They actually use their own custom version of PHP and have a team devoted to revising the PHP internals (the C/C++ core) as needed, so thats not really that good of a comparison. (although you would think if anything, it would be better than the stock version of php - who knows!?)

Also, Yahoo is using PHP for Delicious, and i beleive Yahoo Answers. In fact for Delicious they are using the Symfony framework.

In terms of google - its mostly Python.


# re: ASP.NET vs PHP 10/15/2008 6:49 AM just_wondering
I'd like to ask a (slightly) different question:

When it comes to money that *you* (as a developer) can make - which one is better: PHP 5 or ASP.NET 3.5 ?

After all, most of professional developers still work for money, not for fun..
-=*=-


# re: ASP.NET vs PHP 11/15/2008 5:42 PM alex
please compare maximum count user in site php and asp.net?
which one support maximum user online ?


# re: ASP.NET vs PHP 11/16/2008 12:32 PM Kyle
COST:

-> ASP.NET would be hair-pulling to write in a text editor, that's why Visual Studio is so popular. With that comes costs. Visual Studio does have their free express version, which limits your options (custom functions aren't available) and slows down the experience.
-> PHP is very easy to use in Notepad. It's inserted directly in your HTML documents, reads from top to bottom, and functions are read just like in English.

-> PHP welcomes the user to use MySQL (Free) and provides functions to make it easy.
->ASP.NET on the other hand pretty much guarantees more cost because MS-SQL isn't free, neither are their alternatives.

-------------------------------------------------------------------

EFFICIENCY:

-> When you want error-handling, or any functionality, you need an actual language like C# for ASP.NET.
-> PHP has it's own error-handling and library of functions.

-> Microsoft is either trying to make their fanbase as dumb as possible by relying on drag and drop in Visual Studio, or they realized ASP.NET is brutal without a graphics-rich IDE. Either of those is a huge downfall in my opinion.

-> PHP supports both procedural and OO programming.
-> ASP.NET forces the user to use OO.

-> PHP has several built-in functions for text editing, password encrypting, database connectivity. These are single line functions where most consist of one word followed by parenthesis.
-> ASP.NET doesn't have a rich list of functions like that.

-> PHP is save, upload, view. It doesn't need to compile partial files and libraries. Keeping things simple and fast is usually best.

-> PHP is open source, so you can take from and give back to them by using their user-contributed classes and functions, and submitting your own. PHP also updates versions frequently.
-> ASP.NET is Microsoft. You use their stuff, or no stuff.

# re: ASP.NET vs PHP 1/1/2009 12:17 AM Jorge
So many of you are very immature when it comes to these two technologies. PHP and ASP.NET are in fact powerful technologies with in it self. They both have a way to produce very powerful applications. It is not the language that will do the trick it is how you build this application. With good planning and resources you will be able to build what ever you want with either one. There is no use to argue on a subject that has no ending. ASP.NET has a framework. PHP has a huge library. with a little research you can find what you are looking for on each technology. I am still finding my self working with both on different applications, due to the cost issue not because one runs faster than the other. One is commercially distributed and the other is open source that, to me, is the only big difference between these two.


Kyle-- You have it all wrong, error handling is as robust as you will like it to be, that is completely on you. Both have good capabilities for this.

You have to admit that the MS IDE is the best on the market. but the reason for the IDE is because there are other types of applications that can be built with MS not just asp.net. This is why they ahve express editions to focus on the technology of interest and learn. PHP has their own IDE as well and they are powerful just at teh ASP.NET.

ASP.NET Support procedural programming just like PHP all you have to do is know how to write it. Do you know how to write procedural code Kyle?

Kyle, php is very powerful with their functions, but doesnt that contradicts your second point of making asp.net developers dumb. Why not give me the opportunity to write my own encryption algorithm like the .NET framework does?

Kyle, php is very good at that I know exactly what you mean, but did you know that ASP.NET does the same with a virtual folder on IIS?

Kyle, that is awesome from PHP I agree, but guess what asp.net has a community too and they are all willing to share it is called www.codeplex.com and www.asp.net. they might now be as robust as php, but the idea is there and people do share.



# re: ASP.NET vs PHP 1/22/2009 3:12 PM Vali Dumitru
1. ASP.NET being object oriented is more "organized" and maintainable than scripted PHP. Besides being fully compiled, ASP.NET platform offers loads of pure OO features like inheritance, polymorphism, overloading etc. Newer versions of PHP support OOP but its very limited compared to ASP.NET.

4. PHP is more hackable than ASP.NET.

5. PHP promotes messy code and has poor error handling capabilites.

7. ASP.NET offers different methods to store session data.

8. ASP.NET is more scalable than PHP.

10. ASP.NET will cost less in terms of hardware to support and scale an application.

These points are totally false.

1. PHP can do all that. PHP 5 offers a great support for OO programming, and DOES have inheritance, polymorphism and all the other OO concepts.

4. No it is not. And that depends on the programmer, btw, and on its knowledge.

5. It provides great error handling, and has integrated exception support. Again, a matter of whether the programmer knows how to program and do it well, not a language problem. Messy code can be written in any language, just name it. That doesn't mean everyone is doing it.

7. PHP offers that as well. You can easily define your own method of storing session data (handlers), and it will be used automatically.

8. Again, a problem of specific programmers, who don't actually plan an application or web site before coding it.

10. How can you even say that? For PHP all you need is a 486 computer with linux on it, which, by the way, is free. As for ASP, only the license for Windows costs at least $75. If we add the price for the hardware that is needed to run it, we can easily add $150. Now tell me, how is that less than free?

# re: ASP.NET vs PHP 1/23/2009 9:23 PM Mike
PHP is a scripting language that can be compiled. It won the scripting development platform war over asp because Microsoft pulled the plug on asp with .Net.

You can go through great hurdles to avoid the Microsoft world, and many huge companies do this - like Google and Yahoo.

For the rest of the planet, working with an entire development platform like .Net, that integrates seamlessly with 90% of the world's computers and therefore day to day office-type applications makes .Net a much more practical language. Try building a .php app with MySQL that integrates into your corporate infrastructure to pass data between various existing systems, almost invariably built on Windows. It can be done, yes, but it's ridiculous.

PHP is extremely effective for web sites, has huge amounts of freely available code, and has such an enormous community supporting it that it is no danger of disappearing and will continue to be at the forefront of web development strategy.

As for earning capacity, generally .Net developers are going to earn more but I say this only because - in general - .Net developers' skillsets are wider ranged than just pure web programming. And I live in the U.S. and have no idea what other locales are like. But I would guess that as with anything your salary will increase with your skill, and if you just go to Craigslist and look at Internet jobs you will probably see more PHP options available on any given day in any given area.

Any argument about speed is almost pointless considering the endless amount of variables that affect an applications performance. Ultimately, it depends on the code and the hardware more than the engine. I have seen ColdFusion sites that run lights out, jsp sites that were painfully slow, etc.

# re: ASP.NET vs PHP 1/29/2009 5:03 AM dxael8se
1. true its more organized but php 5 can also be written in OOP.

2. true

3. probably true.

4. this is one of the reasons why i havent used php but this is going to change.

5. true

6. true but no big deal you can do the same with php.

7. same as above

8. not sure what you mean...i think it all depends on the developer or the designer of the application.

9. false

10. false

# re: ASP.NET vs PHP 2/17/2009 6:36 PM Abhilash
Jumping into a never ending topic is nice. Im an ASP.NET developer & dont know PHP. Im an MSFT fanboy, but doesnt hate linux/php.

Its only your personal opinion to choose from a dozen of programming languages. I came to .NET world, because I love M$FT . Its my pleasure learning .NET.

If you ak me what is there not in ASP.NET? I'll say, It has everything. It all depends on how you learn, understand and use ASP codes.

Programming is all about passion, atleast I believe. Choose a language that fits you. No matter which languageyou are using, always try to write good & professional codes.

Happy Coding.

# re: ASP.NET vs PHP 2/25/2009 4:41 AM Tun M Hein
I'm totally agree with you. some of PHP guys said Asp.net is bad. But they have never used Asp.net before. They r very funny guys they are saying bad that they don't know totally.

# re: ASP.NET vs PHP 2/25/2009 3:09 PM ONUR AKAM
onu said(onu who is aperson who has a punto bun not right place) php forever

# re: ASP.NET vs PHP 3/10/2009 12:49 AM Maarek
PHP5 has framework programming, so it's all about budget and what you using to create your program ASP or PHP, learn them both and find out what works best.

ASP does work in apache2, but only on IE browsers. Further configuration will need to get the .NET 2.0 to work w/ all browers from an apache2 server.

for me, it's a budget issue, so I'm all for PHP5 right now.



# re: ASP.NET vs PHP 3/26/2009 8:56 PM Anwar Isead
E-book Asp.net VS PHP

# re: ASP.NET vs PHP 4/12/2009 7:44 PM HAGA
Well, I think that main problem with PHP geeks is, that .NET is too hard to learn for them. So they code their websites in PHP on dozens of freehostings and don't see clear advantages of ASP.NET. It's easy, it's much faster, it's more like desktop application programming, it has built-in AJAX, and it uses fully-object oriented languages with strongly typed variables. A language that lets you to retype variable AT RUNTIME is no language, but.... brick-box, maybe? Just tell me, if you want to make website with database and standart CRUD (create, retrieve, update, delete), how long will it take to you in PHP? 2 hours, maybe? And how long in ASP.NET? 10 minutes with SqlDataSource, 30 minutes with BLL, DAL and ObjectDataSource.

And by the way, there ARE asp.net freehostings. aspone.cz, for example.

# re: ASP.NET vs PHP 5/1/2009 12:07 AM Adam
Everything on this page is typical MS attitude. I think that one of the languages may be better for one thing or another but both obviously work fine as they are both widely used. If someone who is new to the programming world would read this they would feel like ASP is god and PHP is assembly. I happen to be a Linux C++ programmer so I have a big preference but that doesn't make me think Windows is complete crap just because I happen to program in a POSIX compliant OS.

I also have a lot of respect for the Linux business model. They are not anticompetitive in any way. They just want to play a long and they provide their OS for FREE. MS is the one who constantly refuses to work with any other company to define industry standards, there are a million examples but look at the web based vector libraries. Microsoft has one standard, everyone else has another. Why? Because it creates a barrier to entry into MS's market share. Why play nice, when we can have a monopoly and then act inefficiently.

# re: ASP.NET vs PHP 5/3/2009 3:19 PM PHP TEAM
"re: ASP.NET vs PHP 9/10/2008 2:06 PM Anz
What about Wikipedia and Youtube or even Google and Yahoo.. none of them are using Asp.Net!! "


you noobs are psycho

Wikipedia and yahoo use php
Google and youtube use python



and

php5 is 8 times faster than asp.net
php5 is highly secured language
php is platform independent
php5's Framework Class Library is 5 time bugger than asp.net
and about stability
php is 500,000 times more popular than asp.net


in short asp.net sucks



any body wants say some thing?
mail me co.laminder {at} gmail



ps: you guys are truly loooosers with very limited future


# re: ASP.NET vs PHP 5/17/2009 1:26 AM A-freeman
for me as a programmer, the important point is to write codes fast and easily. I have written many db connections in php without any trouble but .NET bores me to death with that long funny connection string. and many other examples. dot net = a messy jungle of huge abilities.

for people as a user, there is no difference between asp.net or php except that they will see the run time error of asp.net pages sometimes. this is because of the many details and factors in .net programming.

for providers, each technology which is more interested and used by programmers is in top of of their support list. that is php

for site owners, i don't know. if they are not expert, they may prefer each of technologies, but if they are, they will engage themselves in discussions like that: php or asp.net ... what does realy .NET wants to do? Globalization by Microsoft

the popularity factor is easiness to use and understand.





# re: ASP.NET vs PHP 5/17/2009 8:06 AM Rob
I've spent 5 years working on commercial applications in PHP (from small to large corporates) and the past 4 with C# ASP.Net (on high profile sites) and this is what I've noticed from my own experience with both

PHP
* Simpler and quicker to learn
* Faster to deploy for smaller sites
* Loosely typed, easier to develop smaller applications with.
* Generally quicker to make simpler changes to existing apps/sites

ASP.NET
* More complex to learn
* Superior Development Environment
* .Net Framework contains a lot of plumbing for all sorts of functionality
* Closer to traditional O.O Programming model
* More time-consuming for smaller changes to applications

I think PHP is great for smaller to medium size applications (dont get me wrong, there are some awesome large apps in php), however feel that ASP.Net provides a more robust programming model for larger more complex software apps. Combine that with the best IDE on the market (that can actually speed up development quite a lot)

Conclusion:
While either language can achieve the same results (I know this because I have done it in both PHP and ASP.Net), wouldn't you choose the most appropriate language for the task at hand.

PHP - Simpler applications, or Established Open Source Apps (Like CMS, ECommerce, etc)

ASP.Net - Custom Web and Desktop applications with lots of functionality, complex workflow etc




# re: ASP.NET vs PHP 6/1/2009 3:50 AM buurtnerd
I bet my php code is more secure and OO than any ASP code out there. ASP makes some fundamental mistakes when it comes to controls. It tries to hide essential technologies from you presenting you with a uniform language; this is an awful mistake. You should use PHP, Perl or Python and use a proper MVC framework instead of relying on the twisted logic of ASP: controls even encapsulate CSS and promote inline styling... I did not even mention viewstate... I mean... how can you miss this? how can you not realize that ASP is just missing the point? There is a reason why Microsoft has some issues getting a grip on the web; they are just not that good in creating technologies that blend seamlessly with other technologies. They try to shield developers too much from other essential parts of webtechnology.

# re: ASP.NET vs PHP 6/3/2009 9:56 PM myles
PHP + CakePHP = Rapid Development and Maintainable Code

# re: ASP.NET vs PHP 6/29/2009 3:52 AM Prabhat Kumar
When I hear things like .NET/Java hide things, I really feel the people really do not look at the technology platform from business prospective, rather they look at it from technology/work satisfaction related issues. I am in this industry for over 12 years now, working on different technology and have the following observations to make about the above discussion.

1. A compiler based language who resolves the references during build is always better bet so is the case with Java and .NET
2. A technology needs to have a pre-thought and well defined specification which results into a robust out put, this I donot find the case with PHP.
3. There are open source library every where, but do we have a system which takes the ownership of it's performance, consistency and reliability
4. I know people in PHP developer community, Who keep switching framework like Smarty, CakePHP etc over and over based on their experience with the release of every single product. Not necessary it's a technology issue, but a Confidence issue definitely yes




# re: ASP.NET vs PHP 7/29/2009 6:22 AM baburaj
Is it good to study PHP than ASP.Net

# re: ASP.NET vs PHP 7/29/2009 6:23 AM baburaj
thank you

# re: ASP.NET vs PHP 7/29/2009 10:12 PM aglan
wow the war will never end, well i guess every one talk here must have been used both in case up "PHP is hackable"? just answer me y? php u write ur own code ok so if u made a bad code it will be hackable donot jsut say php is hackable lol what u mean anyway.
for RAD development in PHP u can use frameworks like codeigniter or zend for developing interfaces u can use Bluevoda for making insert,update... in DB u can use php generator for mysql ;) i think both have same tools but for me .
1- PHP is faster than asp.net
2- guess what asp.net is harder to learn than php u need to learn vp or C# in php it's just PHP
3- hackable guys up just note it depends on ur code unless u use a framework with bugs
4- answer this qs also y google map,youtube,wiki... all php why???? donot tell me no time to change even u tube they can change it if they wanna will do the system backup db then install it.
5- to be honest for work ppl ask for asp.net developers y it's drag and drop fast... u may develop a program without typing anyyy code "dono how come ur a programmer ;)" u can make ur little brother do ur work ;)
6- a war will never end but for asp.net developer if u didn't try php try it it's fast clean u can use tools up for RAD development and there are alot of tools and cms u can use even if u donot wanan type a code.
7-PHP just need more support or a stronger ide specially for mysql as i know this is what makes it hard, for development in asp.net u just drag and drop the table ,php no even if u use php generator for mysql tool.
anyway see what makes u do ur work professionaly and fast and not hackable lol, programming langauges is just like a pen u can write an article a war start or make a great book last 4 ever or... so it depends on what u type"program" not the pen.
GoodBye

# re: ASP.NET vs PHP 8/6/2009 8:05 AM Vivek thakur
Finally here are some interesting test results:

http://misfitgeek.com/blog/aspnet/php-versus-asp-net-ndash-windows-versus-linux-ndash-who-rsquo-s-the-fastest/


# re: ASP.NET vs PHP 8/12/2009 1:41 PM Drasko
For php developers that hv never used asp.net:
1.viewstate can be turned off and if you are using it data in view state are much more compressed than when u keep ur page state in any other form
2.you dont have to use controls but simple html if you prefer
If you really want to build complex company intranets (ERPs and so) it will take you so much time to make it trough php.
YouTube is a simple website, any language can run it.

# re: ASP.NET vs PHP 8/19/2009 2:16 PM Eric
I'd say about half the people here say the PHP or ASP.NET is superior because that's what they use. What's my gripe?

I really don't like that just in-time (JIT) compilation that goes on in asp.net web applications. It's silly. Who wants to wait 10 seconds for your page to start running. I also don't like how .net web apps are all done up for you and things like event validation, session state, and view state don't work well in a load balanced environment.

In php I don't like how sometimes you have to put double brackets around things and most of the time I have no freaking idea why. Someone above wrote that php is loosely typed. They're nuts. It's error messages are very poor written and most editors are not very useful.



# re: ASP.NET vs PHP 10/7/2009 9:36 AM mxyzplk
yes I believe php sites is faster than asp.net web... But I believe to build a complex website is good with .net well... I'm still learning using asp.net

# re: ASP.NET vs PHP 10/11/2009 10:59 PM gantumur
asp.net is good

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: