1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

What is better PHP or ASP?????

Discussion in 'Programming' started by keral82, Dec 5, 2005.

  1. #1
    Let us disccous what is better PHP coding or ASP ?????????????
     
    keral82, Dec 5, 2005 IP
  2. execute

    execute Peon

    Messages:
    301
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    PHP is easier to learn than ASP, not better... However ASP.NET is completely different and is said to be an unbelievable great language.
     
    execute, Dec 5, 2005 IP
  3. csmaster2005

    csmaster2005 Peon

    Messages:
    140
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    PHP is much better and runs on both unix and windows, while ASP is really only a windows language.
     
    csmaster2005, Dec 5, 2005 IP
  4. relixx

    relixx Active Member

    Messages:
    946
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    70
    #4
    Classic ASPs syntax is far easier for beginners than PHP, as it's almost like speaking english, eg:

    ASP:
    if strColour = "blue" then
    response.write "The sky is blue"
    else
    response.write "The sky is not blue"
    end if

    PHP:
    if ($strColour = "blue") {
    echo "The sky is blue";
    }
    else
    {
    echo "the sky is not blue";
    }

    Which do you think would be easier for a beginner to learn? That's right, the one without the brackets, semicolons, etc that they're bound to forget, ie, ASP. However, PHP is far more powerful than classic ASP as it was designed to do a lot more :)

    Not so, with chillisoft you can run ASP on a linux box, making it multi-platform :D

    Anyways, we've had this discussion on this forum before, and as far as I'm concerned, PHP is far better than ASP, but ASP is great for "casual" programmers who want to knock out a quick script or two without having to bother studying more complex languages
     
    relixx, Dec 5, 2005 IP
  5. cornelius

    cornelius Peon

    Messages:
    206
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    if you ever programmed C or Java

    PHP will only take few days to pick up
     
    cornelius, Dec 6, 2005 IP
  6. keral82

    keral82 Banned

    Messages:
    781
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #6
    As a website developer what will you prefer
     
    keral82, Dec 6, 2005 IP
  7. relixx

    relixx Active Member

    Messages:
    946
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    70
    #7
    PHP. Without a doubt.
     
    relixx, Dec 6, 2005 IP
  8. keral82

    keral82 Banned

    Messages:
    781
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Why Not Asp?????
     
    keral82, Dec 6, 2005 IP
  9. cornelius

    cornelius Peon

    Messages:
    206
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #9
    because php is easier and has alot of free sample codes
     
    cornelius, Dec 6, 2005 IP
  10. marvinniven

    marvinniven Peon

    Messages:
    442
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Asp also doubles up as a snake but php has only one meaning.
     
    marvinniven, Dec 6, 2005 IP
  11. keral82

    keral82 Banned

    Messages:
    781
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Php has more functionality of asp?
     
    keral82, Dec 6, 2005 IP
  12. cornelius

    cornelius Peon

    Messages:
    206
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #12
    yes and its easier to learn
     
    cornelius, Dec 6, 2005 IP
    riz likes this.
  13. relixx

    relixx Active Member

    Messages:
    946
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    70
    #13
    PHP has more functionality than asp, and runs faster too. PHP5 (the latest version) can handle object-orientated programming too :)

    And ignore Cornelius's insistance that it's easier to learn, as it depends on the situation. For a beginner, ASP is far easier to learn, yet PHP is far easier to learn if you have experience with a programming language that it is based on (C++, etc), as PHP's syntax is the result of an orgy between various older langauges.

    That being said, I'd rather learn PHP and program everything in that, esp as the PHP communities are far larger, so you can get better support through advice and scripts :D
     
    relixx, Dec 6, 2005 IP
  14. execute

    execute Peon

    Messages:
    301
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #14
    ASP:
    if strColour = "blue" then
    response.write "The sky is blue"
    else
    response.write "The sky is not blue"
    end if

    PHP:
    $test = ($strcolour == "blue")? "The Sky is blue": "The sky is not blue";
    echo $test;

    HAH!! OR:

    if($strcolor == "blue") echo "The sky is blue";
    else echo "The Sky is not blue";

    Trust me php is way easier to write; why? Because i bought a book about ASP and couldn't do anything (I didn't understand it, all it talked about was vbscript [back then i didnt know what anything was])! Then i bought a book about PHP and could do it easily.

    WTH man, response.write and set.header or whatever... its annoying, and hard to learn. Echo and simple commands is much better in PHP.
    semi colons won't make it harder... Brackets are in every language.

    Heres the facts:
    PHP is faster, easier to learn, and larger community.
    ASP is harder to learn, slower, but a programmer in ASP would be payed more, since way too many people know PHP.
    ASPX (ASP.NET) is supposedly an unbelievable language, not like ASP, but way better and some even say it will be amazing (i dunno anything about it so don't ask me).

    If you want a quick learn and do some stuff, learn PHP, But its better to learn BOTH, than just 1, and i would recommend learning ASP as it can be more challenging (fun) and may even bring you more opportunities.

    Oh btw: Wth you talkin about? PHP 4 can be OOP as well... not just PHP 5
     
    execute, Dec 6, 2005 IP
  15. relixx

    relixx Active Member

    Messages:
    946
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    70
    #15
    *sighs* You state that PHP is easier because you got a sucky textbook? That's not a logical argument. That's like saying that pork is better tha beef, because the only time you tried to eat beef, it was off. huh? And the dot-notation is hard to remember? Huh? Look, have you ever tried teaching a class before? Have you actually had dealings with people trying to learn coding for the first time? Back in college we were taught ASP (as ASP is still widely used in my country). I remember having a discussion with my classmates about PHP vs ASP. Do you know something? Only those of us who had a "programmers mentality" where we expect to see things like lots of brackets (and punction being used for symbols) and can read them, and could follow the discussion. The people around us just looked at the whiteboard blankly, as all they saw was a "mess" of code with the brackets everywhere. (if I had to show them
    $test = ($strcolour == "blue")? "The Sky is blue": "The sky is not blue";
    echo $test;
    PHP:
    , they'd be lost so quickly, because it looks 'a mess') Yet, they could catch onto ASP easily. Why? because it was so similar to English.

    For example:
    "If the time is 8:30 then it is morning." can be broken down into:
    if [condition] then [action][end statement. in the sentence, this is the fullstop]

    This becomes:

    if intTime = 8:30 then
    strMorning = true
    end if

    Notice now similar they are? This is why ASP is easier for beginners who don't know any coding, there's no "extra crap" (as one of my friends puts it) like brackets and stuff being thrown in. It's all straightfoward. To the first-time coder, PHP syntax looks like a foreign langauge, so it takes longer to pick up.

    And the dot-notation method difficult? what? Sorry, dot-notation is not exactly a higher-grade subject. response.write: It's a response, and you're 'writing' (ie, printing to screen) something. Request.querystring: you're requesting data, from the querystring. OooOOoo, MENSA-level stuff, that is. I think the reason why lots of programmers have difficulty learning ASP is because it's syntax is too straighforward, so it's like a foreign language to them. :p They aren't used to syntax that doesn't resemble the older languages like C, etc.

    Also, in ASP you only need to use brackets when you need to use them, making it easier for beginners because it resembles English more. You learn quickest with things that you are familiar with.

    The OOP capabilities of PHP4 were very basic as they didn't expect the demand to be so great. PHP5 has the new zend 2 engine, so the OOP capabilities are far superior and now on-par with the other languages (java, C#, etc).

    And basically, that's all I'm going to say about which one is easier to learn. I have 2 or 3 years experience helping people with code and trying to teach them coding, so I know what the average, first-time coder can learn quickest, and PHP isn't it.
     
    relixx, Dec 6, 2005 IP
    MattEvers likes this.
  16. kkibak

    kkibak Peon

    Messages:
    1,083
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Anyone played w/asp.net 2.0?
     
    kkibak, Dec 6, 2005 IP
  17. relixx

    relixx Active Member

    Messages:
    946
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    70
    #17
    A friend of mine has, he absolutely loves it, but he says that ASP.NET isn't the easiest langauge to get into *shrugs* I haven't used it myself, so I wouldn't know. He, however, absolutely loves it
     
    relixx, Dec 7, 2005 IP
  18. execute

    execute Peon

    Messages:
    301
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Hmm No not really. Sucky textbook? It was the most expensive and best one in one of the biggest book stores in my city. (Don't make stupid assumptions). Pork sucks (yes i've tried them all). Dot notation is frickin hard to understand. So you're saying you would rather write
    "response.write" than "echo"? Whats wrong with you?
    How many people have you taught buddy, because i sure have taught a lot of people PHP and they find it the easiest language. Trust me, everyone says that PHP is easier to learn. Just cuz you were taught it in ASP so you think its easier doesnt mean its true. "Do you know something?" Are you insulting me?
    if(){ } else { } are very clear, because it contains the if arguement and brackets represent what to do in this situation. ITs much more clearer than

    if bla bla then
    bla bla bla
    end if
    I get confused, where the hell is the else statement and which one is else or if, i cant tell where the test argument is!! I can't tell whether bla bla is the test argument or the action to test from bla bla bla. It may be more similiar to english but you can't tell where to put what.

    I already told you , it doesnt have to be ()? something : somethingelse ;
    that may look confusing to some, and not to others (depends on the person[ DO NOT TRY TO ARGUE THIS]).
    You can do this:
    if(something) something;
    else something;
    This is pretty simple. But this kind of argument is stupid, obviously if statements would be a preference of how one wants to write it. I'm talking about when the coding gets more complex and a little more involved it gets confusing doing

    if
    val == blabla then
    set.header();
    response.write.text.blabla;
    end if

    This is quite confusing to me, EVEN NOW! (as you can see i dont know ASP [i have only seen the code a lot, and although i understand what is going on, some functions are wierd to me, but the syntax is most confusing of all; So i can transalate an ASP to PHP, i just cant write it from my mind], blame the book).

    in php its just:
    if($val == blabla){
    header("Location: ");
    echo "blabla";
    }

    This is much neater, cleaner, and more organized. At first you're right ASP may look easier because it is written in english, however once you know what a bracket is, and where to put the test-argument, its much easier than ASP. Obviously a person that never wrote HTML will find it easy to do ASP, and may find PHP hard at first. But someone who has tried some HTML, and exposed to some javascript (like most people who first learn PHP or ASP), they will find PHP easier. But yea, you're right, in a college where there is some guy that never saw code in his life.... would find ASP easier.

    Sorry for the long post --

    btw: PHP 4 is not primitively OOP... They have classes, and lots of functions and ways to do PHP 5, just takes longer to write. However, its not that different than php 5.

    BTW: ASP.NET is way harder (so my friends say), however they say its much better than PHP (i have no idea why or how).
     
    execute, Dec 7, 2005 IP
  19. kkibak

    kkibak Peon

    Messages:
    1,083
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #19
    my personal experience has been that they are pretty similar in terms of difficulty. for me some aspects of php are a little more straightfoward even though the syntax is messier. however i also find the asp.net code to be more organized/easier to read. anyway this is just at the beginner level and based on my own personal experience.
     
    kkibak, Dec 7, 2005 IP
  20. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Being the most expensive doesn't make it a good book. I don't know if it is actually good or not, but I do know from my own experience that at least 1 in every 5 computer-whatever books are written by people who don't actually know their subject very well.
    Dot notation is also in C, C++, JavaScript, and many others. If this simple bit of syntax trips you up then you're in a world of trouble.
    I would actually prefer response.write. I'm of the opinion that the namespace should not be polluted (as PHP does with its 10,000+ functions that are all in the global namespace). I also prefer more meaningful statements over short statements.
    Personally I think both languages are equally difficult to learn (unless you've had past experience in one form or the other). The real difficulty of programming is the logic; you need to be able to think in a certain way. If a mere change in syntax is enough to confuse any of you then you probably should pick a different profession.
     
    FeelLikeANut, Dec 7, 2005 IP