Page 1 of 2 12 LastLast
Results 1 to 25 of 34

Thread: PHP vs ASP

  1. #1
    Join Date
    Mar 2004
    Location
    Liverpool, England
    Posts
    5

    PHP vs ASP

    Which language do you prefer to use?

    I prefer PHP, because it can easily interact with a MySQL database and much of the software is GPL.

    Also I find problems finding hosts that support ASP.

  2. #2
    Join Date
    Apr 2004
    Location
    NJ USA
    Posts
    332
    Plenty of hosts support ASP, redhat supports it. But not as many support it as php because windows 2k3 server is expensive. Only people who are sure they are in it for the long run will host on windows servers.

    I use ASP just because thats what I learned. I wasn't really in a big debate with myself as to what to use I just sort of wanted to learn ASP.

  3. #3
    Join Date
    Mar 2004
    Posts
    44
    PHP all the way.

    ASP is just too messy.. to curly braces or colons terminating lines etc..

    I suppose the one advantage of ASP is that you can combine it with VB.. and i emphasise 'one'

  4. #4
    Join Date
    Apr 2004
    Location
    NJ USA
    Posts
    332
    Originally posted by GXD
    and i emphasise 'one'
    I question wether this is going to turn into an ignorant language bashing thread. I'm sure it wasn't started in order to instigate that.

    Advantages:
    Works with MSSQL
    .NET
    Used by most major online application developers

  5. #5
    Join Date
    Mar 2004
    Posts
    44
    Rapid Dr3am asked which language I prefer to use, am I not allowed to give a reason why?

  6. #6
    Join Date
    Apr 2004
    Location
    NJ USA
    Posts
    332
    Of course you can give reasons why, but he didn't ask "why is the other language worse to use?"

    I use ASP, I love it. I have no problem with PHP or the people who use it. But it seems to me like you are subtly trying to instigate some sort of sect between the languages. We don't need "I use PHP. ASP sux!" I've seen too much of that on other forums turn into flaming.

    If, however, you do want to demonstrate the drawbacks of other languages, I suggest you do some research and/or try to understand the language. Your emphasis on one "supposed advantage" leads me to believe that you don't like ASP, which is fine, but as I stated there are other advantages of ASP that are not "supposed".

  7. #7
    I have to agree with phos.

    Both languages have their advantages. However I am personally a fan of PHP.

    This doesn't mean I'm against learning ASP - as I probably will in the future. But I choose to learn C/C++ instead of VB which led me to learning PHP instead of ASP.
    * Best Web Hosting - Submit your host to our directory and become one of our top 10 web hosts.

  8. #8
    Join Date
    Jul 2002
    Location
    UK
    Posts
    2,027
    I can do a little ASP and a great deal of PHP.

    I have to say I _greatly_ prefer php, mainly because i can look at the code and see how it flows, rather than the stupid VB syntax which makes no sense.

    Oh, and it's free and runs on almost anything out there.
    Gone.

  9. #9
    Join Date
    Apr 2004
    Location
    Florida
    Posts
    82
    PHP all the way. I don't know ASP, but PHP is really good.

  10. #10
    PHP, I think it's better for it's simplicity.

  11. #11
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    365
    Originally posted by GXD
    ASP is just too messy..
    Prove it, I bet you cannot… Classis ASP is fading sure, but .NET is here to stay – Written in VB, or C# remember it’s cross platform language…

    Not FREE PHP please End rant.

    I do code in php, asp and .NET, my belief is .NET is the future…

  12. #12
    Join Date
    Nov 2003
    Location
    Online
    Posts
    1,217
    From me its on customer demand. i can do work in both. But if my customer say me that choose your self. I will choose PHP.

  13. #13
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    365
    List box population, in most lang - for a multi search field:

    PHP Code:
    ASP
    Function Tasks_DataSource_BeforeBuildSelect() 
    ' "s_Project" contains the comma delimeter string with the selected values

      if CCGetParam("s_Project", Empty) <>  Empty then
        If Tasks.DataSource.Where <> Empty Then _
          Tasks.DataSource.Where = Tasks.DataSource.Where & " AND "

        Tasks.DataSource.Where = Tasks.DataSource.Where &_
             "task_project_id IN ("&CCGetParam("s_Project", Empty) &")"
      End if

    End Function

    ----------------------------------------

    PHP
    function Tasks_ds_BeforeBuildSelect() {
    global $Tasks;

      $s_Project = CCGetParam("s_Project", ""); 
      if (count($s_Project) > 0 AND is_array($s_Project)) {
        foreach ($s_Project as $key => $value) {
          if ($Projects != "") $Projects = $Projects.",";
          $Projects = $Projects.$value;
        }
        if ($Tasks->ds->Where != "") 
          $Tasks->ds->Where .= " AND ";
        if ($Projects != "") 
          $Tasks->ds->Where .= " tasks.project_id IN (".$Projects .")";
      }
    }

    -----------------------------------------

    Perl
    sub Tasks_ds_BeforeBuildSelect() {

      $s_Project = CCGetParam("s_Project", "");

      if (ref($s_Project) eq "ARRAY") {
        for ($i=0; $i <= $#{$s_Project}; $i++  ) {
          if ($Projects ne "") {
            $Projects .= ",";
          }
          $Projects .= $s_Project->[$i];
        }
      } elsif (length($s_Project)) {
         $Projects = $s_Project;
      }
      
      if ($Tasks->{ds}->{Where} ne "") {
          $Tasks->{ds}->{Where} .= " AND ";
      }
      if ($Projects ne "" ) {
          $Tasks->{ds}->{Where} .= " tasks.project_id IN (".$Projects .")";
      }
    }

    -------------------------------------

    ColdFusion
    <!---Tasks_BeforeBuildSelect --->
      <CFMODULE Template="CCGetParam.cfm" strName="s_Project" outputVar="Projects">
      <!-- "Projects" contains the comma delimeter string with the selected values -->
      <CFIF Projects NEQ "">
        <CFIF strWhere NEQ ""> 
            <CFSET strWhere=strWhere & " AND ">
        </CFIF>
        <CFSET strWhere=strWhere & " tasks.project_id IN (#Projects#)">
      </CFIF>

    -------------------------------------------------

    Java
    //Tasks_BeforeBuildSelect

      String[] s_Project = e.getPage().getHttpGetParams().getParameterValues("s_Project"); 

      if (s_Project != null && s_Project.length > 0 ) {
        StringBuffer projects = new StringBuffer();
        for ( int i = 0; i < s_Project.length; i++ ) {
          if ( projects.length() > 0 ) {
            projects.append(", ");        
          }
          projects.append(s_Project[i]);
        }
        StringBuffer where = null;
        if ( ! StringUtils.isEmpty(e.getCommand().getWhere()) ) {
          where = new StringBuffer(e.getCommand().getWhere()).append(" AND ");
        } else {
          where = new StringBuffer();
        }

        if (projects.length() > 0) {      
          where.append("tasks.project_id IN ("+projects.toString()+")");
          e.getCommand().setWhere(where.toString());
        }
      }
     
    ------------------------------------------

    VB.Net
    '
    Tasks_BeforeBuildSelect

    If IsNothing(System.Web.HttpContext.Current.Request("s_Project")) Then
        CType
    (SelectTableCommand).Where "tasks.project_id IN (" System.Web.HttpContext.Current.Request("s_Project") +")"
        
    CType (SelectTableCommand).Operation "AND"
        
    CType (CountTableCommand).Where "tasks.project_id IN (" System.Web.HttpContext.Current.Request("s_Project") + ")"
        
    CType (CountTableCommand).Operation "AND"
    End If

    -----------------------------------------

    C#
    //Tasks_BeforeBuildSelect

    if(System.Web.HttpContext.Current.Request["s_Project"]!=null)
    {
        ((
    TableCommand)Select).Where "tasks.project_id IN (" System.Web.HttpContext.Current.Request["s_Project"] +")";
        ((
    TableCommand)Select).Operation "AND";
        ((
    TableCommand)Count).Where "tasks.project_id IN (" System.Web.HttpContext.Current.Request["s_Project"] + ")";
        ((
    TableCommand)Count).Operation "AND";

    Cheers
    Last edited by desman; 05-03-2004 at 08:39 AM.

  14. #14
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    365
    Which lang is the hardest to understand in your opinion based on the code I just provided

  15. #15
    Join Date
    Nov 2003
    Location
    Online
    Posts
    1,217
    nice effect desman
    I think no one is hard to understand

  16. #16
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    365
    Originally posted by eglim
    nice effect desman
    I think no one is hard to understand
    Well done

  17. #17
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    365
    Originally posted by eglim
    nice effect desman
    It's actual code... Not an effect


  18. #18
    Join Date
    May 2002
    Location
    UK
    Posts
    2,997
    I've managed to get one of my friends, who is a die hard VB and VB.net fan to start using PHP... and it's taken him a few weeks but seems to love it now.

    PHP is simply orientated for web programming which ASP.net isn't. VB.net is a great all round language for both windows and web and PHP lacks in windows as GTK is messy... no exes? come on please?

    Java is another great all round language and cold fusion is web only, which has a great simple structure but can still do some VERY powerful stuff (especially with the J2EE backend).

    Personally I program the most in PHP and Cold Fusion MX. I used to program a lot of Perl but now tend to only use it for shell scripting or legacy apps. Java I don't really touch and I dabble in ASP and ASP.net occassionally.

    So I prefer PHP much more than any of the others, I suppose because I don't really have to worry about HUGE multi server apps much where Java would be the obvious choice.

  19. #19
    Join Date
    Jul 2001
    Location
    Arizona
    Posts
    148
    Let's first all remember that ASP isn't a language - ASP is a server-side mechanism under which either VBScript or Javascript can run on the web server. Javascript users might find ASP/Javascript easier to code, while those more familiar with Microsoft centric languages certainly feel at home with ASP/VBScript. I personally hate VBScript, but only because I was trained with Unix type languages and feel more comfortable with them.

    To address the question of this thread, I prefer PHP because I believe it's the easist server-side language to learn - and yes, I have used them all in my 10 years on the web. Cold Fusion, though, comes in a real close second.
    Steve - Web Applications Developer
    http://www.sdwebsystems.com

  20. #20
    Join Date
    May 2002
    Location
    UK
    Posts
    2,997
    Originally posted by sdnet
    Let's first all remember that ASP isn't a language - ASP is a server-side mechanism under which either VBScript or Javascript can run on the web server. Javascript users might find ASP/Javascript easier to code, while those more familiar with Microsoft centric languages certainly feel at home with ASP/VBScript. I personally hate VBScript, but only because I was trained with Unix type languages and feel more comfortable with them.
    ASP yes, ASP.net no. ASP.net actually has it's own unique features plus the ability to have any of the .net languages embedded in it. VBScript isn't used in ASP.net, it's fully fledged VB.net

  21. #21
    Join Date
    Jul 2001
    Location
    Arizona
    Posts
    148
    Originally posted by Rich2k
    ASP yes, ASP.net no. ASP.net actually has it's own unique features plus the ability to have any of the .net languages embedded in it. VBScript isn't used in ASP.net, it's fully fledged VB.net
    That is correct, which is why I didn't mention ASP.NET in my original message. It is, however, based upon VBScript, albeit considerably more powerful.
    Steve - Web Applications Developer
    http://www.sdwebsystems.com

  22. #22
    Join Date
    Dec 2002
    Location
    Toronto, Canada
    Posts
    522
    Let's wait a bit until .NET version 2 and PHP 5 come out. These could be real industry shakers...

    I've used Perl, PHP 4, Java and ASP.NET (VB.NET). Never tried Classic ASP. I find PHP great for light-load, non-enterprise applications. Even some business-heavy applications could run very well in PHP, but I wouldn't trust it much beyond that.

    I don't really think that you can compare the .NET framework and Java to PHP, ASP, Perl, etc. The first two are meant for serious, enterprise-level applications. The fact that simpler apps are written in them is great. However, I would be a little cautions of an enterprise-level application written in PHP. PHP, etc. are meant for ligher applications, such as forums, simple accounting systems, server management, etc. Note: that's my opinion.

    For simpler applications, PHP is great. I prefer it over ASP only because of the syntax and because I've worked with it for so long. I prefer it over Perl - I feel that Perl is dying as a language. It's got a lot of features, but it seems that other languages, namely PHP and Python are taking over as the preferred languages for developers.

    For more advanced applications, I think that Java is better, simply because it's been out for so much longer. I still don't think that the .NET platform is ready to handle very heavy loads. Give it a few versions, especially knowing Microsoft with their bug track record.

    Max
    Nokhrin - http://www.nokhrin.com/
    ~ e-commerce application development

  23. #23
    Join Date
    Apr 2004
    Location
    NJ USA
    Posts
    332
    I don't think Microsoft's bug track record will hold back .NET from really capturing heavy programming requirements. I know people who use .NET in their online application development and from what I hear it is just as powerful as Microsoft says it is. They have been developing with it since it came out and the results are amazing. Though I think it will take a while for .NET to have the impact that Java has had on the industry.

  24. #24
    Join Date
    Dec 2002
    Location
    Toronto, Canada
    Posts
    522
    The issue with .NET is that it's still not feature-complete. Once that happens, or at least stabilizes, then .NET might (and probably will) be able to gain market share.

    Max
    Nokhrin - http://www.nokhrin.com/
    ~ e-commerce application development

  25. #25
    php and mysql are free, i vote towards them

Page 1 of 2 12 LastLast

Posting Permissions

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