Results 1 to 7 of 7

Thread: ASP/PHP/MySQL

  1. #1
    DR
    DR is online now
    on ye old ship HEXUS DR's Avatar
    Join Date
    Jul 2003
    Location
    HEXUS HQ, Elstree
    Posts
    13,411
    Thanks
    1,058
    Thanked
    831 times in 372 posts

    ASP/PHP/MySQL

    What is the difference between

    - Function
    - Classes

    What purpose do they have?

    What is the core differences between the structure of PHP and ASP? I know what they are I want to know the differences.. I know one is Win one is Linux, one costs, ones free

  2. #2
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    ASP and ASP.NET are very different, that's worth noting.

    as for ASP and PHP, really they're very similar, it's just the syntax that varies - PHP uses its own programming language, ASP gives an option of VBscript or JScript.

    the syntactical differences are few. PHP uses <? ?> for sectiosn of code inside HTML, ASP uses <% %>. other than that, they really are pretty much the same thing.

    as for where they run, you can get ASP on Linux in soe shape or form (mod_asp for apache, or Chilisoft ASP), just as PHP will run on most OSes (windows, unix, beos, whatever).

  3. #3
    dgr
    dgr is offline
    Senior Member
    Join Date
    Jul 2003
    Posts
    621
    Thanks
    0
    Thanked
    0 times in 0 posts
    have to say though, php is a lot easier and nicer to code than vbscript in asp.

    functions are chunks of code that you call with arguements. applicable for pretty much any language.
    classes are only really applicable for OOP languages, e.g. java, c++ (hiss), python...

    php doesn't have OOP at all in php4, wait for a stable version of php5.

    dgr
    dothan 745 @ 2.4ghz | 2gb Corsair XMS (2-3-3-6) | dual raptors (raid0) | ATI 9700pro | CM201 | dual lg 1810

  4. #4
    only the finest beef
    Join Date
    Nov 2003
    Posts
    1,175
    Thanks
    4
    Thanked
    0 times in 0 posts
    http://java.sun.com/docs/books/tutorial/java/concepts/

    Don't know if that helps with understanding the class, functions(a.k.a. methods) thing.

  5. #5
    Senior Member
    Join Date
    Jul 2003
    Location
    ZA ✈ UK
    Posts
    622
    Thanks
    0
    Thanked
    0 times in 0 posts
    Of course, I could be way way off (Yet again), but, as I understand it, classes are effectively the objects in OOP. Each class exposes properties and methods - you can retrieve and set properties (Effectively settings for the class) and call methods (Basically functions that do stuff, sometimes using data from the properties).

    At least, this is what .NET has taught me.

  6. #6
    HEXUS.net Webmaster
    Join Date
    Jul 2003
    Location
    UK
    Posts
    3,108
    Thanks
    1
    Thanked
    0 times in 0 posts
    php4 does have OOP

  7. #7
    Senior Member Shad's Avatar
    Join Date
    Jul 2003
    Location
    In front
    Posts
    2,773
    Thanks
    22
    Thanked
    40 times in 24 posts
    Functions are blocks of code which return data. Subroutines are the same but do not return data, so are fairly limited. Both can accept parameters usually by reference or by value.

    For example, you might have a function which contained all of the code necessary to format a given date. You would pass the function the date as a parameter, and the function would return your formated result.

    Classes are all of the functions/sub-routines (i.e. methods) and parameters (i.e. properties) that relate to a specific task. For example, you may have a class defined which handles all of your database stuff. You would set the connection string etc. as propetries and then call a method which opened a connection, and so on.

    PHP and ASP are of course very different. There are few ASP coders who use JScript, so I think it's safe to say that ASP is syntactically VERY different from PHP, which is of course a C-like language. VBScript is actually object orientated because you can define and write your own classes. It's not brilliant, but it can be done.

    My pizza is getting cold
    Simon


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •