SitePoint Sponsor

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 25 of 53
  1. #1
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What do you make of this article?

    http://weblogs.asp.net/bleroy/articles/193608.aspx

    I'm interested in the opinions of some of the regular gurus on here.

    And a comment by another developer on another board:

    php is a quick and dirty scripting language that has no enterprise functionaltiy, meaning that for larger multitiered applications etc is is ****. Much like asp.
    Obviously I disagree, wondered how you can argue against this to somebody who is obviously stuck in a particular mindset.

  2. #2
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php is a quick and dirty scripting language that has no enterprise functionaltiy,
    In the wrong hands, but this could be said for every other langauge as well. Not the time at the moment to read your link, but I will

  3. #3
    SitePoint Guru OfficeOfTheLaw's Avatar
    Join Date
    Apr 2004
    Location
    Quincy
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, i think that the article does draw someinaccurate conclusions at times, and consideres supressing errors with the @ symbol as "very elegant error handling". My jonest opinion is that the author is not as experienced to know the dirty details of the language to make an accurate comparison.

    However, I do agree with him that Java is more suited to enterprise development, and here's why. Having done only a scant amount of J2EE work, I have been able to fairly see that serverside Java can do quite a bit of heavy lifting, not to mention there are several (EJB, Struts, etc.) mature frameworks, pre-existing classes, etc to choose from. PHP is getting there, but it still doesn't quite meet the same raw power that java has (however, with more extensions like Marcus' SPL, more PEAR packages, etc... IT IS GETTING there).

    As for php being a dirty scripting language, that's just rubbish. I am sure there are people who believe python is some dirty scripting language too. Honestly, I had the exact view of php when I started coding it, largely because my exposure to PHP consisted of millions of lines of code like:

    PHP Code:

    <?
    $db 
    = @mysql_pconnect(...);
    @
    mysql_select_db(...);
    ?>
    <form action=<?= $PHP_SELF?> method="POST">
     <? 
          
    for ($i 0$i 20$i++)  
                {
                 
    printf("<label for=foo%d>foo: </label>"$i);
                 
    ?>
                  <input type="text" name="<? echo 'foo' $i?>"/>
                  <?
                 
    }
               
    $query "SELECT * FROM entries";
               
    ?>
          <p>Entries:</p>
          <?
            $result 
    = @mysql_query($query);    
            while(
    $row mysql_fetch_array($result))
                  {
                   
    $num_entries++;
                   }
             
    ?>
            <p>There are <? echo $num_entries ' entries stored.'?></p>
       </form>
    Seeing that, I'd think it was pretty nasty too.

    James Carr, Software Engineer


    assertEquals(newXPJob, you.ask(officeOfTheLaw));

  4. #4
    SitePoint Evangelist jplush76's Avatar
    Join Date
    Nov 2003
    Location
    Los Angeles, CA
    Posts
    460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    our application is used by half of the fortune 500 companies written entirely in php with heavy dhtml. To say php can't be used in the enterprise environment is ridiculous.
    My-Bic - Easiest AJAX/PHP Framework Around
    Now Debug PHP scripts with Firebug!

  5. #5
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heh, quite amusing.
    Seem to be too many technology fanatics about atm, wether it be PHP vs ASP.NET vs Java, or IE vs Firefox, Windows vs Linux.

    They seem to write alot of hot-air content of questionable value to anyone.

  6. #6
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by OfficeOfTheLaw
    Well, i think that the article does draw someinaccurate conclusions at times, and consideres supressing errors with the @ symbol as "very elegant error handling". My jonest opinion is that the author is not as experienced to know the dirty details of the language to make an accurate comparison.

    However, I do agree with him that Java is more suited to enterprise development, and here's why. Having done only a scant amount of J2EE work, I have been able to fairly see that serverside Java can do quite a bit of heavy lifting, not to mention there are several (EJB, Struts, etc.) mature frameworks, pre-existing classes, etc to choose from. PHP is getting there, but it still doesn't quite meet the same raw power that java has (however, with more extensions like Marcus' SPL, more PEAR packages, etc... IT IS GETTING there).

    As for php being a dirty scripting language, that's just rubbish. I am sure there are people who believe python is some dirty scripting language too. Honestly, I had the exact view of php when I started coding it, largely because my exposure to PHP consisted of millions of lines of code like:

    PHP Code:

    <?
    $db 
    = @mysql_pconnect(...);
    @
    mysql_select_db(...);
    ?>
    <form action=<?= $PHP_SELF?> method="POST">
     <? 
          
    for ($i 0$i 20$i++)  
                {
                 
    printf("<label for=foo%d>foo: </label>"$i);
                 
    ?>
                  <input type="text" name="<? echo 'foo' $i?>"/>
                  <?
                 
    }
               
    $query "SELECT * FROM entries";
               
    ?>
          <p>Entries:</p>
          <?
            $result 
    = @mysql_query($query);    
            while(
    $row mysql_fetch_array($result))
                  {
                   
    $num_entries++;
                   }
             
    ?>
            <p>There are <? echo $num_entries ' entries stored.'?></p>
       </form>
    Seeing that, I'd think it was pretty nasty too.

    I'm pretty much in agreement with this, that PHP is certainly getting there, and with PHP5 has taken some great strides.

    I also think that calling it "a dirty scripting language" is total rubbish, and is more of an evaluation of how it is often implemented by those who know no better, rather than the language itself. Likewise, I'm sure there is some pretty "dirty" ASP.NET based code out there too.

  7. #7
    SitePoint Guru OfficeOfTheLaw's Avatar
    Join Date
    Apr 2004
    Location
    Quincy
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Luke Redpath
    I'm sure there is some pretty "dirty" ASP.NET based code out there too.
    More so than PHP... especially if written in VBSCRIPT!!! All too often in my consulting adventures have I ran into an "enterprise solution" written in VBScript with the powerful Access Database powering it (yes... using Microsoft Jet Engine for heavy database lifting).

    Read and weep folks, read and weep:

    Code:
    Dim pobjMtoSend ' mailer object
    Dim sTemp
    sTemp = ""
    Dim sEMsg, sUN
    Dim pintCount, pintIndex, pintRecCount, pintU, pintCount2, pintLen, pintWhere
    pintIndex = 0
        ' here are the arrays that actually hold the "response" data
    Dim sAucID(), sAucTitle(), sAucSum(), sAucTime(), sAucCitySt(), sAucPH(), sAucDate(), sCNam(), sFldr(), sUNAr(), sPWAr(), sPubIDAr(), sHoLAr(), sEMAr(), sV(), sCities(), sStates(), sAucLinks(), sAccountType(), sAffName(), sAffType(), sAffURL(), sHomeLink(), sStreet1()
    Dim sEMLsts(), sSlr()   ' email lists used on user sign up
        ' these store values for a single salebill page
    Dim sAID, sATitle, sASum, sAPrev, sATime, sStreet, sCitySt, sZ, sAPH, sADate, sCOName, sSaleB, sAuctioneer, sStLic1
    Dim sAContactEM, sSBConEM, sStLic, sLogo, sPicStr, sLnk, sType, sTxtDirections, sComm, sCommPlacement, sCata, sCity, sState, sIsMaster, sType2, sType3, sType4, sType5
    Dim sH, sBody, sPW, sFld, sPID, sShow, sHPPics, sMSG, sEML, sM, sAStreet, sACity, sAState, sAZip, sAPhone, strBBMsg, strBMsg
    Dim sPics() 
    Dim sAucPhoneNum, sAucStreet, sAucCity, sAucState, sAucZip, sQ, sAns, sO, sOld
    Dim sChc, sLCom, sSeller, pintTemp, sAccountTypeDesignation, pintTotalCount
    
    .... SNIP (repeat for about 80 more lines with various other variables) ...
    
    Sub AlterDB()
    
    Set conCur = Server.CreateObject("ADODB.Connection")
    
    conCur.Open (sConStr)
    conCur.Execute (sSQL)
    conCur.Close
    
    Set conCur = Nothing
    
    End Sub
    Sub getImages()
        sSQL = "SELECT dbo.xlaAIGimages.imagefile, dbo.xlaAIGcategories.catname  FROM dbo.xlaAIGimages INNER JOIN dbo.xlaAIGcategories ON dbo.xlaAIGimages.categoryid = dbo.xlaAIGcategories.categoryid WHERE (dbo.xlaAIGimages.source = '"& sADate &"') AND (dbo.xlaAIGcategories.catname = '" & sAID &"')"
        Call MakCon
        data = rstCur.GetRows(100,0)
        Call DestroyCon
        For i=0 to UBound(data)
            strImage = "<a href='/absoluteig/gallery/" & data(1,0) & "/" & data(0,i) & "' target =' _blank' style='margin: 10px;' ><img src='/absoluteig/gallery/" & data(1,0) & "/tn/tn" & data(0,i) & "' style='border: none;'></a>"
            response.write(strImage)
        Next
    End Sub
    
    ... Snip (just wanted to give an example of the subs.. there are 90 of them, that one is the best coded of them) ...
    
     Do While pintCount <= pintRecCount
    
            If Not InStr(1, LCase(rstCur("SALEBILL")), LCase(sSrchItem) & " ") = 0 Or Not InStr(1, LCase(rstCur("SALEBILL")), LCase(sSrchItem) & "s") = 0 Or Not InStr(1, LCase(rstCur("SALEBILL")), LCase(sSrchItem) & ",") = 0 Or Not InStr(1, LCase(rstCur("SALEBILL")), LCase(sSrchItem) & ";") = 0 Or Not InStr(1, LCase(rstCur("SALEBILL")), LCase(sSrchItem) & ".") = 0 Or Mid(LCase(rstCur("SALEBILL")), 1, Len(Trim(sSrchItem)) + 1) = Trim(LCase(sSrchItem) & " ") Or (Mid(LCase(rstCur("SALEBILL")), 1, Len(Trim(sSrchItem))) = Trim(LCase(sSrchItem)) And Len(Trim(rstCur("SALEBILL"))) = Len(Trim(sSrchItem))) Then
    
                ReDim Preserve sAucID(pintIndex)
                ReDim Preserve sAucTitle(pintIndex)
                ReDim Preserve sAucSum(pintIndex)
                ReDim Preserve sAucTime(pintIndex)
                ReDim Preserve sAucCitySt(pintIndex)
                ReDim Preserve sAucPH(pintIndex)
                ReDim Preserve sAucDate(pintIndex)
                ReDim Preserve sCNam(pintIndex)
                ReDim Preserve sFldr(pintIndex)
                ReDim Preserve sPubIDAr(pintIndex)
                ReDim Preserve sHomeLink(pintIndex)
    
                sAucID(pintIndex) = rstCur("UID")
                sAucTitle(pintIndex) = rstCur("TITLE")
                sAucSum(pintIndex) = rstCur("AUCSUM")
                sAucTime(pintIndex) = rstCur("ATIME")
                sAucCitySt(pintIndex) = rstCur("CITY") & ", " & rstCur("STATE")
                sAucPH(pintIndex) = rstCur("PHONEINFO")
                sAucDate(pintIndex) = rstCur("AUCDATE")
    
                pintIndex = pintIndex + 1
    
                pintU = UBound(sAucID)
    
                sGo = "y"
    
            End If
    
            If Not rstCur.EOF = True Then
                rstCur.MoveNext
            End If
    
            pintCount = pintCount + 1
    
        Loop
    Until getting to work with some professionally written C# code some time back, THIS was my impression of ASP in particular. Dirty... ugly... and completely ridiculous.

    James Carr, Software Engineer


    assertEquals(newXPJob, you.ask(officeOfTheLaw));

  8. #8
    SitePoint Addict
    Join Date
    May 2003
    Location
    The Netherlands
    Posts
    391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jplush76
    our application is used by half of the fortune 500 companies ...
    With all due respect, that seems like many to me ...

  9. #9
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How pathetic. I had similar comments about another article bashing PHP recently. The guy may not like Oracle becaue he's Microsoft, but making himself look ignorant by spouting a bunch of "PHP Sucks" aphorisms was not too clever. I mean, he starting whining about all the posts and closed his blog. Again, pathetic.

    In some ways the PHP community has become more mature and self-assured than the technologies designed by big corporations. I rarely/never hear the core PHP guys post like this. They seem to be more interested in finding ways to WITH Java/.NET/etc. And when a good ideas are implemented in other languages they are debated from every side and if they are a good fit they get added to PHP. The big corporations do the same kind of borrowing (e.g. .NET itself) but PR spin it like they invented it.
    Christopher

  10. #10
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    Bucharest
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool

    ASP .NET IS TOO Expensive:
    -> Software (OS + optional Visual Studio)
    -> Good Developers

    JAVA IS TOO Expensive:
    -> Good Developers
    -> Hardware

    I said good developers because php has a high learning curve (def: a line on a graph representing data) and if you take a look at the general php forum you will find a lot of future php devlopers. At the end is quite easy to hire a php guy for installing tons of php open source applications (phpBB, osCommerce and so on), or to make some contact forms that sends emails.

    For JAVA or ASP .NET you will need a developer that knows the difference between 0 and false, or that knows what is an abstract class.

    That`s one of the reason that PHP has 60% on netcraft.

    In PHP 5 we have a lot of OOP improvments and it runs faster than JAVA that`s the reason why guys like Oracle show some interest for PHP.

  11. #11
    SitePoint Guru OfficeOfTheLaw's Avatar
    Join Date
    Apr 2004
    Location
    Quincy
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fastwork
    In PHP 5 we have a lot of OOP improvments and it runs faster than JAVA that`s the reason why guys like Oracle show some interest for PHP.
    Huh? Since when did PHP run faster than Java (I am assuming you are speaking of compiled servlets)?

    However, I do find development time to sometimes be faster, due to the fact you don't have to go through the continuous rebuild cycle with PHP that you do with Java.

    That, and I have found that the learning curve for JSP and/or J2EE is ALOT steeper than PHP.

    But altogether, it's all about choosing the right tool for the job.

    James Carr, Software Engineer


    assertEquals(newXPJob, you.ask(officeOfTheLaw));

  12. #12
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They'll learn with experience, people are absent minded when it comes to unfamiliar technologies. Why can't people learn there is "no better technology"; the correct term is the "most appropriate technology". What makes Bertrand's entry unique is that it doesn't appear to give fallacious information (Ignoring the cache comment), which makes it an enjoyable read, unlike the drivel posted by some.

  13. #13
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arborint
    How pathetic. I had similar comments about another article bashing PHP recently. The guy may not like Oracle becaue he's Microsoft, but making himself look ignorant by spouting a bunch of "PHP Sucks" aphorisms was not too clever. I mean, he starting whining about all the posts and closed his blog. Again, pathetic.
    I did absent mindly dismiss these comments , but I think we can look past that.

    Edit:


    PS what app is that jplush76?

  14. #14
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What makes Bertrand's entry unique is that it doesn't appear to give fallacious information (Ignoring the cache comment), which makes it an enjoyable read, unlike the drivel posted by some.
    Starting from

    "This is true of PHP, but not of ASP.NET, where the code can, but should not be in the HTML markup. "

    and rolling through

    "Open-source opportunity. Sure, if that's important to you. If consistency and accountability are more important, then I guess that's a different story."

    it sure reads like drivel to me.

    The original article certainly has an Oracle slant, but is otherwise pretty evenhanded as opposed to the Bertrand's rant. I guess that's what makes Bertrand's rant so ... ordinary.
    Christopher

  15. #15
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Arborint,

    I see the flaws in Bertrand's entry coming down to opinion and lack of experience in PHP; however he also raises a lot of valid points. PHP does not strictly separate or influence people to separate code, and the point I assume Bertrand to be making is that ASP.NET provides some basic constructs to do so, with frameworks such as Wact this is just as achievable.

    Cross-platform applicability. Sure, if that's really paramount to you, choose J2EE at least for the moment...
    Open-source opportunity. Sure, if that's important to you. If consistency and accountability are more important, then I guess that's a different story.
    The above statement is silly, and doesnít really make sense. As I mentioned above use what technology is suitable, PHP is still undermined, yet thatís simply down to arrogance and misinformation. Itís difficult to keep a balance, as Iím sure Iím yet to see an article that doesnít favour a technology. Thatís why I overlook various pieces of information throughout articles and conclude with my own assumptions.

  16. #16
    SitePoint Evangelist ghurtado's Avatar
    Join Date
    Sep 2003
    Location
    Wixom, Michigan
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs down

    This guy (the writer) has absolutely no experience regarding PHP, or has never been able to use it in a reasonable manner, by separating concerns and following the OOP guidelines that most on these forums do.

    He goes on to claim:
    So whereas PHP follows the flow of the page and inserts dynamic text in some places, ASP.NET separates the code from the declarative markup and has a much richer page lifecycle. Most important, in ASP.NET, the execution flow is distinct from the markup's flow.
    This difference is absolutely fundamental and differentiates a platform that encourages spaghetti code from one that encourages good design and separation of concerns.
    I have been writing PHP applications for over 5 years, and almost from the very start I realized that including all the PHP code in the same page that contains the HTML wasn't a very good idea. It takes any PHP novice about a half a website to come to this conclusion, and in my case, I simply went and built a basic framework to help me with templating. This is all when I didn't know that much about PHP, and I suspect many people have done the same thing. Even if you don't feel inclined to write a template engine, there are literally hundreds of them out there ready for common use.

    To claim that the concept of templating is unique to ASP is about as baseless a statement as I needed before deciding I wasn't interested in reading the rest of the article.
    Garcia

  17. #17
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP does not strictly separate or influence people to separate code
    The question then becomes: is it the language's job to "separate or influence people to separate" or is it the programmer's? Who's idea separation is the one we consider perfect?

    PHP does not, in my experience, inhibit separation. It does allow programmers to make make a choice on the degree of separation. Everything from an all-in-one transaction script to strict, layered MVC are possible (and regularly implemented) in PHP.
    Christopher

  18. #18
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    naperville
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He does bring a good point about the incredibly inconsistent functions (the majority of them), and of elsser importance (to me, at least) the lack of heirarchial classes as a primary library, but what to do? Changing that would destroy backwards compatability. I guess I'll keep coidng with php.net open in one window for paramater-order lookups.

  19. #19
    SitePoint Evangelist ghurtado's Avatar
    Join Date
    Sep 2003
    Location
    Wixom, Michigan
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Inconsistenly named functions, while I do agree that they can be an annoyance, stopped being a problem for me as soon as an IDE with auto-complete.

    The SPL (standard PHP library) is precisely the kind of library that you mention, and it will not break backwards compatibility since its usage is optional.
    Garcia

  20. #20
    SitePoint Guru
    Join Date
    Dec 2003
    Location
    oz
    Posts
    819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Luke Redpath
    Obviously I disagree, wondered how you can argue against this to somebody who is obviously stuck in a particular mindset.
    Haha ... they both were. However, the original poster on how php is great and asp.net isn't was far too blatantly biased.The poster of the rebuttle was pretty specific in the points he was dealing with, and answered them accurately. Even tho the rebuttlist(?) was biased, he was biased for good reason - most php is spaghetti. And while you can seperate logic from display and code in a cleaner OOP manner, PHP doesn't encourage it.

    I sometimes see examples of PHP used in enterprise apps, and as I said above, it can be used as long as you are aware of every detail (templating, etc), but almost no one knows about all of these things (which .Net has built into it) - and you shouldn't even have to know about all these details when developing some simple web pages.

    P.S ... a great framework would be awesome for PHP. But I won't hold my breath. By the time we have a few of the components, M$ will be so far ahead, it wont be funny

  21. #21
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    Bucharest
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A question: what is the definition of an enterprise application? Some examples?

  22. #22
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    enterprise application, noun
    1. The types of application that Sun and Microsoft say you cannot build in PHP.
    2. The form you fill out to get a job at a big company or on the crew in Star Trek.
    Christopher

  23. #23
    SitePoint Guru
    Join Date
    Dec 2003
    Location
    oz
    Posts
    819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fastwork
    A question: what is the definition of an enterprise application? Some examples?
    Google gives this definition, but I consider it to be anything beyond a small site..

  24. #24
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Luke Redpath

    I also think that calling it "a dirty scripting language" is total rubbish, and is more of an evaluation of how it is often implemented by those who know no better, rather than the language itself.
    I think the (good) programming language is something that has some kind of conception or idea behind it. PHP actually, was never designed, it's still just a wrapper around the bunch of C functions, not a "language".

  25. #25
    SitePoint Guru
    Join Date
    Oct 2001
    Posts
    656
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Face it, PHP is dirty. There has been virtually zero upfront design and everything has been hacked together.

    Still, it works great and that's why I like it


Bookmarks

Posting Permissions

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