SitePoint Sponsor

User Tag List

Page 8 of 8 FirstFirst ... 45678
Results 176 to 190 of 190
  1. #176
    SitePoint Guru BerislavLopac's Avatar
    Join Date
    Sep 2004
    Location
    Zagreb, Croatia
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Snaily
    PHP is not a "web development framework", its a language that was built with the web in mind.
    Veeeeery wrong.

    For example, Struts is a Web development framework, implemented in Java and using Java for its internal development. Ruby on Rails is a Web development framework, implemented in Ruby and using Ruby for its internal development. Whitebeam is a Web development framework, implemented in C (or C++, I'm not sure) and using Javascript for its internal development.

    And PHP is a Web development framework, implemented in C and using a custom syntax for its internal development. PHP was not originally intended as a language -- just a syntax for scripts within the framework. After Zend took it over it gets turning more and more into a language, but it's still far from being one. It's similar to Microsoft's VBA, even though Joel thought a bit more about its design than Rasmus, Andi and Zeev did about PHP's -- nobody will ever go to compare VBA scripts with anything else, we'd just compare the speed and effect of, say, Excel Macros to a similar environment.

  2. #177
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh well I think calling php not a language is kind of uncool lol

    ot: this year's most stupid topic so far imho
    see also http://www.deftcode.com/archives/eve..._war_ever.html

  3. #178
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And PHP is a Web development framework
    This would explain...why Zend is now...developing a framework. You either are saying something stupid or using the phrase "web development framework" very loosely.
    Code:
    while ((line = reader.readLine()) != null) {
          contents += line;
        }
    This is inefficent....do this:
    Code:
    StringBuilder builder = new StringBuilder();
    String line;
        while ((line = reader.readLine()) != null) {
             builder.append(line);
        }
    Note: If you are using java < 1.5 you have to use "StringBuffer". Also you could do it faster in Java by not using the BufferedReader and just dealing with the InputStream directly, but that would involve writing a few helper methods.
    Last edited by Snaily; Mar 8, 2006 at 13:48.

  4. #179
    SitePoint Guru BerislavLopac's Avatar
    Join Date
    Sep 2004
    Location
    Zagreb, Croatia
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Snaily
    This would explain...why Zend is now...developing a framework.
    I'll give you a few reasons why they're doing it:

    1. They don't really understand what PHP is. They've inherited it as a framework and worked to make it a language, which they mostly succeeded but it's still a framework in the foundation.
    2. They want to have an OOP framework, so they're building it on top of another one.
    3. They think they need a "one framework to bring them all" because it's such a hype right now.

  5. #180
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Re: The perl vs java code.
    Once I got on a linux box to actually run the code I realized....a few things about this. First this is a poor example to test the languages in string processing. But anyways, I was able to get the java read code to run faster, but the best I could do without using non-standard techiques is 2-3x slower. The may reason for this is that whenever you need to construct a string in java from say a byte array, you must make a copy of the byte array. Given the size of the array this sucks up a much of clock cycles. So this ends up being a particular weakness for java, but this weakness doesn't extend to all string processing in java (for example the substring() method doesn't copy the char array). Anyhow countless benchmarks show Perl/Java with very close performance with regard to string processing.

    Also the code I posted offers no advantage because the file that is writen has no new line characters, if it did using a string builder etc would be faster.

  6. #181
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. They don't really understand what PHP is.
    Yes the people that created PHP don't really understand what PHP is.....!??!
    They've inherited it as a framework and worked to make it a language, which they mostly succeeded but it's still a framework in the foundation.
    PHP started out as a collection of perl scripts to do common web tasks...this is hardly a "web development framework". All the major scripting languages were created with some strength in mind...but have evolved much beyond their initial reason d'etre. PHP has been a general purpose scripting language for sometime now.

  7. #182
    SitePoint Addict Trent Reimer's Avatar
    Join Date
    Sep 2005
    Location
    Canada
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Snaily
    Anyhow countless benchmarks show Perl/Java with very close performance with regard to string processing.
    I imagine that's especially true for anything one would do in a real-world web application where you generally don't want to set off a bunch of resource intensive procedures

  8. #183
    SitePoint Addict Trent Reimer's Avatar
    Join Date
    Sep 2005
    Location
    Canada
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When PHP started people still thought of sites as a collection of pages. Remember when we thought a state of the art site was a collection of pages with common includes for the header and footer? Oh man. PHP was such a big step up from server side includes.

    As was stated, all these languages/platforms evolve. I'll add my vote that it's time for PHP to have a standard framework.

  9. #184
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > PHP has been a general purpose scripting language for sometime now.

    PHP is not a general purpose scripting language, in the sense that Python et al are general purpose scripting langauges; PHP is a scripting language for the web, that and nothing more.

    That isn't a weakness, but that's PHPs one real strength to humanity. That is what it does, it does nothing more, nothing less and I wouldn't have it any other way.

    > And PHP is a Web development framework, implemented in C and using a custom syntax for its
    > internal development.

    That is a poor excuse of a reason to suggest that PHP as a technology, is nothing but a framework; Your scrapping the bottom of the barrel here...

  10. #185
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP is not a general purpose scripting language, in the sense that Python et al are general purpose scripting langauges
    Oh interesting...what does PHP lack that excludes it from the set of "general purpose scripting languages"?
    PHP is a scripting language for the web, that and nothing more.
    Is this a joke? Or maybe Its just my imagination that CLI has been enabled in PHP by default since 4.3.0? Oh those pitiful souls who mistakely use PHP on the command line...god have mercy on them!

  11. #186
    SitePoint Guru 33degrees's Avatar
    Join Date
    May 2005
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dr Livingston
    PHP is not a general purpose scripting language, in the sense that Python et al are general purpose scripting langauges; PHP is a scripting language for the web, that and nothing more.
    Well, PHP may have been intended as a web oriented scripting language, but that doesn't mean it can't be used a general scripting language either. I'd be curious to know what features or lack thereof make PHP a poor choice for general scripting tasks?

  12. #187
    SitePoint Guru BerislavLopac's Avatar
    Join Date
    Sep 2004
    Location
    Zagreb, Croatia
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Snaily
    PHP has been a general purpose scripting language for sometime now.
    This is true. PHP is a scripting language. But PHP is Web development framework. No, not that PHP, the other PHP...

    Aw crap. We have two different things going by the same name...

  13. #188
    SitePoint Addict
    Join Date
    Aug 2003
    Location
    Toronto
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stereofrog
    ot: this year's most stupid topic so far imho
    full ack. There is a nearly 0% content in this thread. Hopefully no one impressionable is following it. Oh, and that was a great link -- I hadn't seen that one before but it is dead on. (I can't believe I actually posted into this thread, lol)

  14. #189
    SitePoint Addict
    Join Date
    May 2005
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dr Livingston
    > PHP has been a general purpose scripting language for sometime now.

    PHP is not a general purpose scripting language, in the sense that Python et al are general purpose scripting langauges; PHP is a scripting language for the web, that and nothing more.
    Why not? What scripting task that you'd use python or perl for can PHP not perform? No, it doesn't do very well when it comes to long-lived processes (daemons), but I'm hard-pressed to find any logical reason why you wouldn't use PHP as a general purpose scripting language if you're familiar with it.

  15. #190
    SitePoint Guru dagfinn's Avatar
    Join Date
    Jan 2004
    Location
    Oslo, Norway
    Posts
    894
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jayboots
    full ack. There is a nearly 0% content in this thread. Hopefully no one impressionable is following it. Oh, and that was a great link -- I hadn't seen that one before but it is dead on. (I can't believe I actually posted into this thread, lol)
    The thread would better if the words "stupid", "silly" and "nonsense" weren't used so much. And the ones who use those words would gain credibility if they abstained from them.

    Anyone who wants to tell me how stupid it is of me to say that, go ahead.

    EDIT: I might be inclined to agree that this thread is stupid, though.
    Dagfinn Reiersøl
    PHP in Action / Blog / Twitter
    "Making the impossible possible, the possible easy,
    and the easy elegant"
    -- Moshe Feldenkrais


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
  •