Poll

Which is best for BBG?

Java Servlet
JSP
PHP
C++
Perl

Author Topic: Java Servlets || JSP || PHP  (Read 2704 times)

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Java Servlets || JSP || PHP
« Reply #25 on: July 09, 2010, 11:45:24 AM »
lol Yup. But the very first phrase in what you quoted is the key point of that argument. ;)
Idiocy - Never underestimate the power of stupid people in large groups.


Offline Harkins

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-2
  • Coder, blogger, entrepreneur.
    • View Profile
    • Push CX - Blog
Re: Java Servlets || JSP || PHP
« Reply #26 on: July 09, 2010, 02:07:23 PM »
Because it sucks at strings and web coding is, I swear, 80% munging strings by volume.

But I gave it my vote because I didn't like that my preferred choices were missing.
PHP's interpreter is written in C... So, it can't be any better at processing strings seeing as how they have to go through an interpretive process and then are dealt with in C afterwards. ;)

False, PHP adds excellent new abstractions for strings on top of C. If that were true, no language could be better than machine code.

Visit #bbg on irc.freenode.net to talk browser games anytime.

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Java Servlets || JSP || PHP
« Reply #27 on: July 09, 2010, 02:24:43 PM »
False, PHP adds excellent new abstractions for strings on top of C. If that were true, no language could be better than machine code.
Were you speaking of something other than in terms of performance? That's how I thought you'd meant it. In that case there is nothing better than machine code. But boy is it a pain to maintain. ;)

My point with C++ was that you got blazing performance (because it's a compiled language which removes the interpretation layer which is a limit to performance of non-compiled languages) but you also have the excessively large base of knowledge that comes with the language. I mean, this language is so popular it takes up 2 of the top 3 spots at TIOBE so, essentially, you can't throw a rock without it skipping off at least 6 C/C++ coders. ;)
Idiocy - Never underestimate the power of stupid people in large groups.


Offline Harkins

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-2
  • Coder, blogger, entrepreneur.
    • View Profile
    • Push CX - Blog
Re: Java Servlets || JSP || PHP
« Reply #28 on: July 09, 2010, 02:48:52 PM »
False, PHP adds excellent new abstractions for strings on top of C. If that were true, no language could be better than machine code.
Were you speaking of something other than in terms of performance? That's how I thought you'd meant it. In that case there is nothing better than machine code. But boy is it a pain to maintain. ;)

Yeah, I was just talking about C++ strings being ugly and awkward.

Visit #bbg on irc.freenode.net to talk browser games anytime.

Offline Nox

  • Level 35
  • **
  • Posts: 738
  • Reputation: +12/-2
    • View Profile
Re: Java Servlets || JSP || PHP
« Reply #29 on: July 09, 2010, 02:54:07 PM »
And yet they're incomparably so much better than C's "strings"....
Meet us at an IRC irc.freenode.net #bbg as well
Enjoy http://spiritbeacon.noxart.cz/ !

Offline dsheroh

  • Level 21
  • *
  • Posts: 235
  • Reputation: +6/-0
  • Perl Vicar
    • View Profile
    • Psi Rangers
Re: Java Servlets || JSP || PHP
« Reply #30 on: July 10, 2010, 06:25:23 AM »
My point with C++ was that you got blazing performance (because it's a compiled language which removes the interpretation layer which is a limit to performance of non-compiled languages)

In principle, absolutely.

In practice, that's really more a matter of who wrote the interpreter vs. who's writing the compiled code.  The interpreter is generally going to be compiled code, after all, and it's probably going to be pretty highly-optimized compiled code at that, since they're generally written and maintained by people who are damn good at what they do and have been given a lot more time and resources to spend on it than the rest of us get for most of our projects, so there are many cases where interpreted languages, despite the interpretation overhead, will perform better than custom-written compiled code doing the same thing.

So, sure, I could write my own string-handling routines in compiled C which do everything that native Perl/PHP/Python/Ruby strings do, but using native strings in Perl/PHP/Python/Ruby would probably run faster anyhow (as well as eating up a lot less development time).

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Java Servlets || JSP || PHP
« Reply #31 on: July 10, 2010, 09:51:23 AM »
In principle, absolutely.

In practice, that's really more a matter of who wrote the interpreter vs. who's writing the compiled code.
No disagreement there. However, you could also write crappy code in the interpreted language as well. Take a developer with equal knowledge of both languages and have him write the same program in both types of application. I would think it very likely that his compiled version would run faster. So, the fact that someone could write a crappy program is irrelevant. With the same amount of knowledge / ability, the compiled language is likely to grant a performance optimization just by its nature. If they know the interpreted language better, then it was my previous advice that they use that one instead.

The interpreter is generally going to be compiled code, after all, and it's probably going to be pretty highly-optimized compiled code at that, since they're generally written and maintained by people who are damn good at what they do and have been given a lot more time and resources to spend on it than the rest of us get for most of our projects, so there are many cases where interpreted languages, despite the interpretation overhead, will perform better than custom-written compiled code doing the same thing.
Again, no argument here. At some level some part of the process is compiled code. Unless there's been a major leap in technology that I'm unaware of. ;)

So, sure, I could write my own string-handling routines in compiled C which do everything that native Perl/PHP/Python/Ruby strings do, but using native strings in Perl/PHP/Python/Ruby would probably run faster anyhow (as well as eating up a lot less development time).
Or, leveraging the fact that C/C++ is one of the most popular languages in the world, you could look and see if someone else has already solved this problem for you. ;) Sure, that's just a quick Google result but I'm certain you could dig up other solutions if you had a specific need in mind. I just did a search for: C++ string handling.

*Edit - Minor grammatical error corrected.
Idiocy - Never underestimate the power of stupid people in large groups.


ST-Mike

  • Guest
Re: Java Servlets || JSP || PHP
« Reply #32 on: July 10, 2010, 10:58:40 AM »
Admins have ignored my deletion request - if you're not going to delete my account then don't have the option there please.
« Last Edit: March 15, 2011, 07:44:47 PM by None »

Offline Delifisek

  • Level 12
  • *
  • Posts: 79
  • Reputation: +1/-1
    • View Profile
Re: Java Servlets || JSP || PHP
« Reply #33 on: July 18, 2010, 03:38:57 AM »
Javascrtipt + Your favorite serverside scripting language...

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal