Click to See Complete Forum and Search --> : Advantages of Asp.net


Ben Rogers
04-19-2004, 10:20 PM
Hello all... I was wondering what can ASP.net do that PHP can't? From what I've read, asp.net seems a lot more confusing and harder than PHP, and also I've heard it referred to as "proprietary", which in my experience is a bad thing. Also, it's made by Microsoft, so I have to question myself: Do I want to learn the devil's language? :p

I ask because I've recently been seeing a number of .asp and .aspx extensions is URLs, and I was wondering why it's raising in popularity as well. PHP is easy, flexible, powerful, and extremely useful in my opinion- why wouldn't peple use it?

Just wondering is all.

steelersfan88
04-19-2004, 10:25 PM
why didn't you just private message peofeo, or look at all the links in his siggy ... how many articles does he link to now?

Ben Rogers
04-19-2004, 10:32 PM
Oh yeah, I forgot he's the resident ASP.net nut. Also, I doubt that any site he'd link to would defame PHP and promote ASP.net, that's not really a good thing to do. Plus, I wanted a more public opinion, maybe from someone who's used both languages, and I know he's not into PHP, so he's kind of biased.

PeOfEo
04-19-2004, 10:34 PM
Originally posted by omega
Hello all... I was wondering what can ASP.net do that PHP can't? From what I've read, asp.net seems a lot more confusing and harder than PHP, and also I've heard it referred to as "proprietary", which in my experience is a bad thing. Also, it's made by Microsoft, so I have to question myself: Do I want to learn the devil's language? :p asp.net is easier infact because it has much better language flexability, php can be done in one language, php, asp.net can be done in c#, vb.net, j#, c++.net and many many many more, delphi. It is refered to as proprietary, which conveys it it costs money to use, but infact it does not. Asp.net can be done from any text editor and can be run from several server. Infact now it can be even run from apache and linux with the mono project. Mysql and Msde are too good free data bases that will work with asp.netp
I ask because I've recently been seeing a number of .asp and .aspx extensions is URLs, and I was wondering why it's raising in popularity as well. PHP is easy, flexible, powerful, and extremely useful in my opinion- why wouldn't peple use it?

Just wondering is all. asp.net is also fully object oriented, has a running speed about equal to that of php, asp.net has its own set of controls that allow the user to do event driven programming with very little code. Asp.net is a very easy way to make very powerful and scalable applications, saying asp.net is hard is just down right wrong, a huge misconception, it is very very easy to use and even though it is very easy it does not lack in power. The one downside is you have to wrestle with the server to output valid code, but I can make pages valid xhtml 1.1 with asp.net so it is also a myth that using asp.net will make your pages invalid, it just involves a little more code, you can't realy on the premade stuff if you use a lofty doc type.
edit: I do have articles that do a comparison, and they are written by people who would do either or, asp.net is the newest technology out there and would logically be the most powerful, but the next vers of php is around the courner and should give asp.net a run for its money, but as it stands, asp.net is the easiest IMO because of its event aware controls, new ways of passing data, and language support.

steelersfan88
04-19-2004, 10:37 PM
i see what you mean now that peo replied omega ...
so when are you going to become a book writer peo ... ?

PeOfEo
04-19-2004, 10:43 PM
Originally posted by steelersfan88
i see what you mean now that peo replied omega ...
so when are you going to become a book writer peo ... ? well I already have 1 article done, I hope to write 2 or 3 more in comeing months, because they are easy to do. I can whip an article out in 3 hours, and have my brother who is starting work as an editor at a small textbook publisher to proof read it. Artiel writing is fun, I would like to write one or two as I do this next site for a church, break down my working code on that, like the https login system, elements of the cms, the blog I will have, so on and so fourth.
http://www.sitepoint.com/article/871
http://www.edwardbear.org/serendipity/archives/1178_NET_vs_PHP_again_and_again.html <-- this author is obviously php biased, he flat out says that, but he admits a lot of things asp.net does better. This is a lot of articles out there still do not mention that Asp.net will infact run on linux, but does infact, 1% (big # :p) of asp.net sites are running from linux. When I get a new hd I am going to put suse or gentoo on it and run the mono project for asp.net on it to see it for myself.

Ben Rogers
04-19-2004, 10:45 PM
Yeah. He loves it apparently.

First of all, not trying to be offensive, but I'm going to try to make you defend your points, ok, Peo?

You say that ASP.net can be written in your choice of a language, while PHP can only be written in one. Well, since most of those listed are no easier than PHP, you'd still have to learn one of them, or maybe more than one for full functionality, while with PHP you learn PHP and you're done, and PHP syntax is very, very simple. So that doesn't seem an advantage to me.

You have to wrestle with ASP.net to get it to output valid code? It puts out HTML by itself? That's a major downfall in my eyes- I want to decide what to output, by writing it myself, I don't want ASP.net doing it for me! As for repeating code, I'd only have to write it once with PHP anyways.

As for being prorietary.. Alright, it's not, but neither is PHP, and PHP can also be run on many servers and computers, and is also written in a text editor, so that's a draw.

As for ASP.net being an easy way for powerful and scalable applications, I ask again, what can it do that PHP can't?

PeOfEo
04-19-2004, 10:58 PM
Originally posted by omega
Yeah. He loves it apparently.

First of all, not trying to be offensive, but I'm going to try to make you defend your points, ok, Peo?

You say that ASP.net can be written in your choice of a language, while PHP can only be written in one. Well, since most of those listed are no easier than PHP, you'd still have to learn one of them, or maybe more than one for full functionality, while with PHP you learn PHP and you're done, and PHP syntax is very, very simple. So that doesn't seem an advantage to me. it is a major one because it allows developers to use a language they might already know or a syntax they are more comforatble with. I have used c# and vb.net, I can use both just fine but I am more comfortable with vb.net so I do my working pages with that since I have 2 years more experience in vb

You have to wrestle with ASP.net to get it to output valid code? It puts out HTML by itself? That's a major downfall in my eyes- I want to decide what to output, by writing it myself, I don't want ASP.net doing it for me! As for repeating code, I'd only have to write it once with PHP anyways. I can make my output valid with just as much code as you can in php, I just have to write my asp.net like back in asp.net classic, when I say I have to wrestle with it I mean I can't use all of the new features, but I can do stuff just as capably as you and keep it valid without it being really difficult. The premade stuff like the premade calander, pageing, validators will output javascript without a type attribute, that is what I was talking about in particular.
what can it do that PHP can't? how about output and rss feed with 1 line of code

Dim reader as XmlTextReader = New XmlTextReader(URL to RSS feed)
how about the SOAP and XML webserivces, try that on php, its a butt load more code. Asp.net adaptive mobile controls, event aware controls, I do not see any of that in php. Then asp.net has the same application wide variables that chamioned over php in asp classic, still not in php today. Also being fully OO gives you a lot more room to do what you want to do with inheritance and polymorhpism.

Ben Rogers
04-20-2004, 02:17 AM
I can't shoot those down, unfortunately, largely because I have no idea what any of that is :o. I can see why people more advanced into scripting than I love asp.net, and even though I love it, maybe PHP is a "minor league" scripting language. But it serves it's purpose and I've yet to have any issues with its functionality, and never have I needed more than it offers.

Anyways, my question was answered. If I ever need RSS feeds and the such, I'll look more into asp.net.

PeOfEo
04-20-2004, 02:12 PM
wooo wooo there it goes look look, you missed half of myu point. Asp.net event aware controls make minro scripting projects much easier, they can reduce the ammount of code a whole lot.

Ben Rogers
04-20-2004, 07:04 PM
I know you don't know PHP, so that is an excuse, but most "minor scripting projects" don't take a whole lot of code or a humongous amount of effort.

PeOfEo
04-20-2004, 07:50 PM
Originally posted by omega
I know you don't know PHP, so that is an excuse, but most "minor scripting projects" don't take a whole lot of code or a humongous amount of effort. I am telling you right now it is easier without knowing it because I know for a fact that to use php you do not have your own set of controls that are event aware and you have to resend values to the server based on form actions, which is a pain in the butt and more code then it would be for me to use asp.net. I know it is more code because I have used asp.net without those controls and I have used asp classic and it is essentially doing the same thing.

Ben Rogers
04-20-2004, 09:26 PM
You've lost me...

PeOfEo
04-20-2004, 10:10 PM
to resend a value to the server the value has to be resent to the server, this is done with a form action when you use asp classic or php, asp.net gives you event handlers, like the onclick js attribute that will resend the value rather then using a form action and then having to get the values on the other end, the value is resent automatically and the values are populated into vairables with names that are that of the element names, it saves on a lot of codeing.

Ben Rogers
04-21-2004, 12:50 AM
Yeah... that seems kind of pointless actually... I can't think of a single case of where that'd help... I don't think I understood what you mean by that though

CardboardHammer
04-21-2004, 02:55 PM
Using ASP.NET, I can quickly and easily (after a bit of RTFM and practice) create graphics on the fly, without needing to use anything beyond the .NET framework. Can PHP do that?

For example, this code copied out of the page source of one of my live pages (which is itself dynamic) gives me a pie chart graphic based on the parameters supplied:

<IMG SRC="PieChart.aspx?a=-90&s=100&d=29&d=9&d=7&d=16&d=14&d=10&d=7&d=3&d=0&d=1&d=0&d=9&d=21&d=0&d=0&d=0&d=0&d=0">

EDIT: I coded PieChart.aspx myself, which was what I was referring to with "quickly and easily".

Ben Rogers
04-21-2004, 03:46 PM
PHP does have image creating functions, but I don't know the extent of their power, because I don't know how to use them.

Conor
04-21-2004, 04:29 PM
http://us4.php.net/gd

PeOfEo
04-21-2004, 05:06 PM
Originally posted by omega
Yeah... that seems kind of pointless actually... I can't think of a single case of where that'd help... I don't think I understood what you mean by that though If you cannot see the advantage to event aware controls then you obviously do not understand what I mean. The point of an event aware control is to save you from having to pick up the values once again after you resend the values in the form action, it allows you to do the same you can do in the other technologies with less code, it is a time saver, but it still gives you control over what you are doing.. What an event aware control is (said this before but Ill try to say it a bit differently) is a control you have running in your form that you are telling the server is a form it is going to be using and these elements running within this form, "runnning at the server" can use attributes similar to java script event handler that the server will handle which will mean you say execute this script when the buttun is clicked with this event handler and it will resend the page and call the script so you do not have to use a form action to resend the page and then call the script from load of the script. It takes out some extra steps in the middle, so you do not have to code it while it is running behind the scenes.

<asp:button
id="butOK"
text=" OK "
Type="Submit"
OnClick="SubmitBtn_Click"
runat="server"
/>

They submitbtn_click sub will be called when the button is clicked and this will resend the page to the server, a sub in vb about the same as a method would be in java/php/whatever.
For the record asp.net and php both have graphics capabilities and sockets capabilities.

CardboardHammer
04-21-2004, 05:53 PM
Originally posted by RefreshF5
http://us4.php.net/gd

Interesting. I don't do any PHP, which is why I asked. Thanks for the link.

Ben Rogers
04-21-2004, 06:01 PM
Oh lol, i thought that was a rhetorical sarcastic question... anyways, I didn't get what you meant before, but I do know I think.. and yeah, that is a pretty handy feature I guess, being able to use functions real time (sorta). You can easily accomplish a similair effect in php, but not in the same way... still a good feature...

PeOfEo
04-21-2004, 06:12 PM
well yes a form submit button would submit the form and then it would resend the page to the server and call the php script by the form action, I do the same thing in asp.net I just do not have to code it all like you would, it takes a step out of the process. Having elements "running at the server" treats their ids like a variable and allows you to change their attributes very esaily, like
lblheading.text = "this text will now be put into a span with the id lblheading, Span is the output of<asp:label"

Ben Rogers
04-21-2004, 06:21 PM
So are you saying it has capabilities similair to what server side Javascript would be?

PeOfEo
04-21-2004, 06:27 PM
Originally posted by omega
So are you saying it has capabilities similair to what server side Javascript would be? ... um, I have never used server side java script. I am saying that when you code it it is like codeing a vb.net / vb6 application more or less.

Ben Rogers
04-21-2004, 06:33 PM
i don't think server side javascript exists, I was merely asking if it offers that kind of function use... as for vb.net i have no experience with it at all so i can't relate.

Sam
04-21-2004, 06:40 PM
Originally posted by omega
i don't think server side javascript exists
http://developer.netscape.com/docs/manuals/js/server/jsref/

Ben Rogers
04-21-2004, 06:52 PM
No, I meant server side in the way PHP is server side... more stable, not depending on the clients comp or browser.

PeOfEo
04-21-2004, 09:46 PM
Originally posted by omega
No, I meant server side in the way PHP is server side... more stable, not depending on the clients comp or browser. http://developer.netscape.com/docs/manuals/js/server/jsguide/index.html no serverside javascript is its own server side technology, it came about about the same time as cgi, maybe even before, but did not catch on really. But when I was talking about asp.net elements a better comparison would be using elements in visual basic, but i cannot say that and have you understand it if you have never used vb, so just think of java script event handlers sort of. I guess I could say a java gui too, but I am not sure if you have used one of those either... and I do not have much experience with guis made through java.