sh0wtym3 Posted August 11, 2009 Share Posted August 11, 2009 I've only been using PHP so far and I love it, but I was wondering if its worth learning a whole new programming language? Are there things that ASP can accomplish that PHP can't? Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/ Share on other sites More sharing options...
KevinM1 Posted August 11, 2009 Share Posted August 11, 2009 I've only been using PHP so far and I love it, but I was wondering if its worth learning a whole new programming language? Are there things that ASP can accomplish that PHP can't? It's not a question of whether one language can do something that another cannot. The question, rather, is if one can do something better than the other. All programming languages have their pros and cons. PHP is no exception. It's how you leverage their pros and minimize those cons that matters. ASP.NET (which is what I'm assuming you're asking about, as there's not much demand for 'classic' ASP) is a decent platform. It has a lot of nice, powerful features built-in, and its close ties to Microsoft's various IDEs make it easy to use. Indeed, one of its benefits is that non-programmers can create fully functioning dynamic pages/sites by drag-and-dropping controls onto the design surface of the IDE and the various configuration wizards. There are drawbacks, too, of course. Given the way ASP.NET works, you have less control over everything. CSS can be a pain in the butt if you like using element ids to apply styles. There's the web.config and machine.config files you need to be aware of. And the ASP.NET page lifecycle can be difficult to grasp at first. As to whether or not it's 'worth' learning another language, of course it is. The more languages under your belt and the more skills you gain, the better your employment opportunities will be. You shouldn't lock yourself into one technology. There's no guarantee that PHP will remain as popular as it is, and there's no guarantee that the PHP of the future will resemble what we have today. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895600 Share on other sites More sharing options...
sh0wtym3 Posted August 11, 2009 Author Share Posted August 11, 2009 Thanks! I think I'll find PHP easier and more useful since I like control. But you made an excellent point in your last paragraph. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895669 Share on other sites More sharing options...
Maq Posted August 11, 2009 Share Posted August 11, 2009 Thanks! I think I'll find PHP easier and more useful since I like control. But you made an excellent point in your last paragraph. Depends on your plans. What do you plan on developing? What are your goals? PHP also has a very easy learning curve. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895674 Share on other sites More sharing options...
Daniel0 Posted August 11, 2009 Share Posted August 11, 2009 PHP also has a very easy learning curve. That's not necessarily a good thing in the grand scheme. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895679 Share on other sites More sharing options...
Maq Posted August 11, 2009 Share Posted August 11, 2009 PHP also has a very easy learning curve. That's not necessarily a good thing in the grand scheme. That's not what I was implying. The OP mentioned that he would find PHP easier, I was just confirming that. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895681 Share on other sites More sharing options...
ober Posted August 11, 2009 Share Posted August 11, 2009 The .NET platform is used by a lot of companies... why, I have no idea. I personally find it bloated and difficult to grasp, but it may come down to Nightslyr's comments about the page lifecycle. It just seems like there are so many hidden parts and pieces to consider. You might as well be developing a piece of desktop software in regards to complexity and whatnot. I've faced ASP several times in my life and it has won almost every match thus far. And I have over 10 languages under my belt. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895776 Share on other sites More sharing options...
KevinM1 Posted August 11, 2009 Share Posted August 11, 2009 With ASP.NET, I've found the following page to be invaluable: http://69.10.233.10/KB/aspnet/ASPNET_Page_Lifecycle.aspx Page_Load() doesn't do what it looks like it should do. I've found that putting my code in Page_Init() and Page_PreRender() is a much better way to go. This is especially true when trying to figure out event handling - events are fired after Page_Load(). Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895796 Share on other sites More sharing options...
waynew Posted August 11, 2009 Share Posted August 11, 2009 Oh man when I seen the heading to this topic I though we were going to war with an asp website or something. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895901 Share on other sites More sharing options...
.josh Posted August 11, 2009 Share Posted August 11, 2009 we ARE. http://www.aspfreaks.com/ bastards MUST GO DOWN. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895905 Share on other sites More sharing options...
Maq Posted August 11, 2009 Share Posted August 11, 2009 Shit, a total of 2 members! Looks like someone got to them first... Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895907 Share on other sites More sharing options...
vineld Posted August 11, 2009 Share Posted August 11, 2009 I think you're asking this question in the wrong forum although I expected a much more fierce discussion If you don't have much programming experience at all then PHP will be easier to learn for most people although you will still need some time before you have learnt enough to produce good code. If you are looking for a professional career then I would advice you to focus on .NET first since there is usually a greater demand and therefore generally pays better. That is if you have to choose one over the other. There more you know the more attractive you will be as long as you somewhat in-depth knowledge. As mentioned already many companies use .NET since it is nonetheless a very powerful language (especially compared to old classic ASP which is still used in some older company systems) that goes well with a lot of company software products. I personally tend to use .NET mostly in my professional work and PHP for personal use. I would say that .NET is not as well suited for (exceptionally) heavy traffic as PHP is but for most websites that is not an issue. The language doesn't matter that much to a good programmer though. Many "real" programmers (Java, C++, Pascal etc.) I know have a decent grasp of web scripting as well. I wouldn't say you have less control in ASP.NET though, it's just that it seems that way in the beginning since it is more structured and fixed in its nature than for example PHP. Once you learn the techniques there is virtually nothing that can't be done in .NET as well. Also, .NET is not really just one language, it's a framework where you can use C#, VB and JScript to mention the most common languages. I prefer C# myself but that's more of a personal preference. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-895966 Share on other sites More sharing options...
nrg_alpha Posted August 12, 2009 Share Posted August 12, 2009 I think you're asking this question in the wrong forum although I expected a much more fierce discussion What forum would be the correct one? And yeah, I was expecting a room filled with cannibalistic people shouting obscenities while hurling chairs, stools and feces at one another... Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-896080 Share on other sites More sharing options...
ober Posted August 12, 2009 Share Posted August 12, 2009 Don't look now, but CV has a little feces in his hair. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-896093 Share on other sites More sharing options...
waynew Posted August 12, 2009 Share Posted August 12, 2009 Cmon guys, this is Sparta, let's kill em all. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-896249 Share on other sites More sharing options...
RichardRotterdam Posted August 12, 2009 Share Posted August 12, 2009 If you are looking for a professional career then I would advice you to focus on .NET first since there is usually a greater demand and therefore generally pays better. That is if you have to choose one over the other. Totally depends on where you are I'd say the demand for PHP and .NET is about the same in the Netherlands. I would say that .NET is not as well suited for (exceptionally) heavy traffic as PHP is but for most websites that is not an issue. On what facts do you base that just curious. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-896282 Share on other sites More sharing options...
vineld Posted August 12, 2009 Share Posted August 12, 2009 If you are looking for a professional career then I would advice you to focus on .NET first since there is usually a greater demand and therefore generally pays better. That is if you have to choose one over the other. Totally depends on where you are I'd say the demand for PHP and .NET is about the same in the Netherlands. I would say that .NET is not as well suited for (exceptionally) heavy traffic as PHP is but for most websites that is not an issue. On what facts do you base that just curious. Yeah, it does probably vary depending on where you live but I assume that .NET developers are much fewer overall? The heavy traffic thing might not be entirely true although .NET sites do in general tend to load slower even if there are exceptions. Most high traffic sites here in Sweden are PHP based. It is easier to implement lighthttpd, Sphinx and other high performance tools. You can read some interesting notes here: http://misfitgeek.com/blog/aspnet/php-versus-asp-net-ndash-windows-versus-linux-ndash-who-rsquo-s-the-fastest/ Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-896346 Share on other sites More sharing options...
KevinM1 Posted August 12, 2009 Share Posted August 12, 2009 The heavy traffic thing might not be entirely true although .NET sites do in general tend to load slower even if there are exceptions. But, can you determine if it's ASP.NET that's causing the slowdown, or a chunky UI and/or db setup, which tend to be more of an issue with page loads? I ask, because the link you gave confirmed my own suspicions that ASP.NET is actually faster than PHP, which isn't surprising if you think about it - it's an issue of compiled vs. interpreted languages. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-896366 Share on other sites More sharing options...
Daniel0 Posted August 12, 2009 Share Posted August 12, 2009 It depends on how you code it. A framework will always have a larger overhead that just plain code. <?php echo 'Hello World'; will for instance always be faster than the simplest ASP.NET hello world thing. Then there is the issue of configuration and hardware. It's difficult just blanket stating that either is the fastest. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-896380 Share on other sites More sharing options...
KevinM1 Posted August 12, 2009 Share Posted August 12, 2009 It depends on how you code it. A framework will always have a larger overhead that just plain code. <?php echo 'Hello World'; will for instance always be faster than the simplest ASP.NET hello world thing. Then there is the issue of configuration and hardware. It's difficult just blanket stating that either is the fastest. That's a good point. Also, now that I think about it more, the tests used in the link tested ASP.NET's background code. ASP.NET doesn't have native loops or file handling - that's all done with the code-behind languages. So, it's not really a PHP vs. ASP.NET battle, but a PHP vs. C#/VB battle. The ASP portion is essentially the server controls, which I'm betting would be slower to render than straight HTML, even if the PHP in question was using a template system, or some other form of OO for output. ASP checks the user agent of the browser currently accessing content, then decides how to best render the controls based on that info. That must incur a pretty hefty cost. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-896434 Share on other sites More sharing options...
vineld Posted August 12, 2009 Share Posted August 12, 2009 I actually think we're all right, it depends on how you measure the speed and what functionality you test. However, it does take more effort to make .NET (whether it be C#, VB or JScript) perform as efficiently as PHP under heavy load. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-896464 Share on other sites More sharing options...
Daniel0 Posted August 12, 2009 Share Posted August 12, 2009 Comparing a framework to a language isn't exactly fair. You can compare ZF or symfony to .NET. You cannot compare PHP to .NET. Quote Link to comment https://forums.phpfreaks.com/topic/169760-php-vs-asp/#findComment-896495 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.