The php, asp, html conundrum

Discussion in 'Software' started by playerofgames, Feb 18, 2006.

  1. playerofgames

    playerofgames Private E-2

    As I understand things, it goes as follows:

    1. Web pages can be written in the usual html (or varaiations of, i.e. xtml), or in asp, or in php; all of which are scripting languages.

    2. However, the usual html is not siutable for being able to produce scripts that will process things like form-data (in a html form-page), hence the need for php or asp scripts (usually held on the hosts server) and a reference code/tag on the html form page. Correct me if I'm wrong here...

    Seeing as asp or php can be used for both creating/editing web pages and for writing processing-scripts (which presumably can process form-data in asp/php pages, as well as html one's), why are popular web editors still oriented towards html? Why do we still have html at all..?
     
  2. Kodo

    Kodo SNATCHSQUATCH

    The final output of any page is typically HTML which is rendered by the browser. So why do we have html? well, it's not going away quite yet and infact, XHTML is the newest variant of it.

    scripting allows you (like you said ) to perform a function(s), either server side or client side. Unless the script is processing something that won't be sent to a browser, then the result is html or xhtml. Think of (X)HTML as the presentation/formatting language and the scripting languages as the workhorse languages.
     
  3. playerofgames

    playerofgames Private E-2

    I see, I think... So the final output rendered by the browser would be a html page even if the page was php or asp? This I didn't know... But won't browsers also reneder php/asp pages? Or is there something I'm completely missing here?

    regards
     
  4. goldfish

    goldfish Lt. Sushi.DC

    PHP pages are, in fact, just scripts. They will generate a document to send to the browser which will be in XHTML. So if you browse to something.php, what you are actually viewing is not the php script but the result of the script.

    All PHP or ASP pages really do is tell the server to do things, and one of those things happens to be send stuff to the browser that requested it.

    As a very common example of PHP or ASP, you might have a browser request a bit of information by submitting data to a script (say, through a form). The script will take that data, use it to look up more data through the means of a database and then send the information gathered from the database back to the browser that asked for it.

    And that is exactly how Google works (though they don't use ASP OR PHP, they use their own technology). You send some data off, it does some things with it and sends you back a result.
     
  5. playerofgames

    playerofgames Private E-2

    I'm glad you've cleared that up. This is what I originally thought, that asp/php were simply processing scripts that present the results 'as a page viewed on the browser'; or xhtml page.
    My confusion came or comes from the generic term or phrase 'php/asp page' which is used all the time. So then I started thinking that you could use php or asp to create actual web pages, just as you would use html.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds