SitePoint Sponsor

User Tag List

Results 1 to 22 of 22
  1. #1
    SitePoint Addict meka2003's Avatar
    Join Date
    Dec 2004
    Location
    temecula
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is PHP better than .JSP?

    Hello,

    I am having a new site programmed.. it will be a networking site for professionals. However, I am clue less with the whole PHP vs .JSP thing..

    I hear .jsp is faster than .php? when it comes to huge databases sucha s friendster.. Please give me advice. I am a designer and not a programmer

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Database size should have nothing to do with the server-side language you choose. The basic breakdown is that PHP is easier to learn but a little harder to maintain than JSP, and JSP has more of a learning curve but is preferred by more for larger web apps. Don't take what I just said as an absolute though: you can build a big site with PHP or a small site with JSP, and you can write great PHP code or horrible Java code. Take a look at both and use the one you're more comfortable with.

  3. #3
    SitePoint Guru
    Join Date
    Jul 2004
    Location
    Raleigh, NC
    Posts
    783
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by meka2003
    Is PHP better than .JSP?
    i'd say yes:

    http://www.tiobe.com/tpci.htm
    TIOBE Programming Community Index for January 2005
    January Headline: PHP awarded programming language of 2004

  4. #4
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is gonna be a long thread............

    I would say if you aren't a programmer, go with PHP because you don't have to work with different applications server, JNI etc.

  5. #5
    SitePoint Addict meka2003's Avatar
    Join Date
    Dec 2004
    Location
    temecula
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not a programmer.. Im actually hiring people to do it.. but uhh, its going to be a big site with lot of users.

  6. #6
    Non-Member coo_t2's Avatar
    Join Date
    Feb 2003
    Location
    Dog Street
    Posts
    1,819
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    <ignore me>
    Use Lisp!
    </ignore me>

    --ed

  7. #7

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by coo_t2
    <ignore me>
    Use Lisp!
    </ignore me>

    --ed
    Did somebody just say something?


  8. #8
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Quote Originally Posted by meka2003
    I am not a programmer.. Im actually hiring people to do it..
    Then you'd want to know that as far as I know, JSP programmers are expensive & PHP programmers are cheap, price wise ofcourse. Its b'coz there are many PHP programmers & you'll find someone to do your job for less money, while JSP programmers are a bit less(I'm talking about freelance programmers, not those employed by companies) & they won't come cheap(price wise). Also, JSP hosting is a tad bit expensive than PHP hosting.

    Quote Originally Posted by meka2003
    its going to be a big site with lot of users.
    No problem with it. Take a look at SitePoint forums. Its done in PHP & has got thousands of users.


    Its just the way you write code. So if your programmer write code efficiently, then your site will be able to handle the load smoothly but if (s)he writes patchy code, I can only sympathise.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  9. #9
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by meka2003
    Hello,

    I am having a new site programmed.. it will be a networking site for professionals. However, I am clue less with the whole PHP vs .JSP thing..

    I hear .jsp is faster than .php? when it comes to huge databases sucha s friendster.. Please give me advice. I am a designer and not a programmer
    But Friendster has given up Java for PHP .
    I found the link when looking for some studies that would compare both objectively, seems difficult to find though at least I found this real world case

    http://troutgirl.com/blog/index.php?..._goes_PHP.html

    "As most of you probably know, I've spent the last six months working at Friendster. I have not managed to release any code in that entire time. Finally on Friday we launched a platform rearchitecture based on loose-coupling, web standards, and a move from JSP (via Tomcat) to PHP."

    ...

    "1) We had not one but TWO guys here who had written bestselling JSP books. Not that this necessarily means they're great Java devs, but I actually think our guys were as good as any team.

    2) We tried rewriting the site in Java twice, using MVC and all available best practices. It actually got slower. Anyway, what does MVC have to do with speed or scalability? I thought it was a design cleanliness and maintainability thing.

    3) We tried different app servers, different JVMs, different machines."

  10. #10
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OH I wasnt going to get involved here but ya sucked me in.....

    The first thing you need to look at is your programming company / contractors ... not the language! As Vinnie said there are good and bad in BOTH!

    Bad PHP, Bad Java .... doesnt matter just BAD code!

    As far as expense .... Java programmers MAY be a tad more expensive but there are more and more everyday so that may be changing. As far as hosting costing more ... nonsense Java enabled servers are at about the same level of pricing as PHP enabled ones .... AT THE LEVEL you are talking about ... we arent talking about the $3.99 a month cheapy hosting here! My dedicated boxes are Resin powered Java and they are within pennies of a non Java dedicated!

    As far as BIG sites running java ...... there's a LONG list there:

    ebay.com, ebaymotors.com, half.com, UPS.com, petsmart.com, fedex.com, prudential.com (have a friend that works there), mastercard.com, visa.com and I could go on all day long ..... we EVEN have someone here whos name I WONT mention who just left ebay and knows exactly how well it can work with Java .... if he wants to chime in and "out himself" Ill let him do that!

    The big "up front" question here is scalability AND the underlying engines to make this site work ...... when using Java I would do some searching and reading to find that "special" servlet engine (you all know who I LOVE) ... with PHP Im sure the underlying engines, optimizers etc will be a big concern!

    Lastly I can COMPLETELY understand Friendster moving from JSP if they were using Tomcat .... there arent many enterprise level apps that you will see running on it! Usually when apps get that big you will see Websphere, JRun, Resin or a Java enabled Oracle server.... but thats My opinion!

  11. #11
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dc dalton
    OH I wasnt going to get involved here but ya sucked me in.....

    Lastly I can COMPLETELY understand Friendster moving from JSP if they were using Tomcat .... there arent many enterprise level apps that you will see running on it! Usually when apps get that big you will see Websphere, JRun, Resin or a Java enabled Oracle server.... but thats My opinion!
    They said they have tried to change the server also, I don't know if they tried Resin or not though. Still this is not out of my experiecne because I had being involved in managing some Java Projects which cost $$$$$$ for some big corporates and the Editors consultants who also cost $$$$$$ (I won't name the firm for decency ) weren't able to do really good jobs and there's a bunch of people who had testified on forum in France the same kind of experiences, worst the most prestigious professional magazine in France wanted to publish a benchmark on all these servers well the results were so bad that he was astonishingly forbidden to do so by the big editors from IBM, BEA and SUN. He published the article by saying he was forbidden to do so
    I precise it was about J2EE not only JSP and servlet. There is in fact a known polemic about the EJBs I even saw book's titles like "Bitter EJBs" and lately I heard SUN has endorsed PHP so do they realise something

    Now in corporates it's difficult to change once an investment is made and even if the performance is not really there they won't switch for PHP because PHP will continue to have a "toy-language" reputation for long.

  12. #12
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah I did see that and I know there are some REAL PIGS out there as far as servers BUT, I have found the main problem is usually the container NOT Java itself.. I know the Oracle and Websphere server are just SLOW memory HOG pieces of junk! I mean painfully slow! SO theres a lot more to the whole thing than just Java as opposed to PHP!

  13. #13
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by dc dalton
    Usually when apps get that big you will see Websphere, JRun, Resin or a Java enabled Oracle server.... but thats My opinion!
    Off Topic:

    I think Tomcat does a better job than JRun in my experience, having used various versions of both over the last 3-4 years. JRun's biggest strength to me is its braindead easy setup.

  14. #14
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I really think it is what your application is going to be used for. If you are implementing a large enterprise system then I would go with JSP. I have found that with Struts it is very easy to deploy a rather large system that uses MVC and I am still trying to learn how to do it all in PHP.

    If your needs are for a small, lightweight system then PHP would probably be your best bet. It's easy to install, easy to program in, and effective.

  15. #15
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Quote Originally Posted by dc dalton
    Lastly I can COMPLETELY understand Friendster moving from JSP if they were using Tomcat .... there arent many enterprise level apps that you will see running on it! Usually when apps get that big you will see Websphere, JRun, Resin or a Java enabled Oracle server.... but thats My opinion!
    Quote Originally Posted by vgarcia
    I think Tomcat does a better job than JRun in my experience, having used various versions of both over the last 3-4 years.
    Tomcat is ok for a medium-size/weight JSP/Servlet only application but when you are deploying something heavy-weight along with EJB, then you do need to move to some heavyweights like WebSphere etc. I've used Weblogic for EJB & I can say that its a pain in the a**.
    However I've heard that Oracle Web App server does a great job & so does JBoss, haven't used any of them btw.

    Quote Originally Posted by vgarcia
    JRun's biggest strength to me is its braindead easy setup.
    I'd say that its integration with IIS is what I like & its damn easy to manage!!
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  16. #16
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by asp_funda
    I'd say that its integration with IIS is what I like & its damn easy to manage!!
    Off Topic:

    True, Tomcat+IIS is like pulling teeth comparet to Tomcat+Apache or JRun+IIS

  17. #17
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Off Topic:


    Quote Originally Posted by vgarcia
    True, Tomcat+IIS is like pulling teeth comparet to Tomcat+Apache or JRun+IIS
    Yes, Tomcat+IIS is a nightmare, but some brave dudes do it. A nice guy here in the Java forum pointed me to a good tutorial on doing it, though I never got around to do it.
    BTW, you know of any good guide on integrating Tomcat with Apache on both Linux/Unix & on Windows?
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  18. #18
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    Off Topic:

    I think Tomcat does a better job than JRun in my experience, having used various versions of both over the last 3-4 years. JRun's biggest strength to me is its braindead easy setup.
    Ill agree with that. A trained chimp can use it but yes it is PAINFULLY freaking slow! One of my friends from where I used to teach is on the JRun development team ... and we HAD to use it at the school .... he got so sick of hearing us complain he would just nod his head and say "I KNOW, I KNOW IT SUCKS" .. really funny cause he is an amazing guy .... (freaking smart too) ... and he gets frustrated with it!

  19. #19
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by asp_funda
    Yes, Tomcat+IIS is a nightmare, but some brave dudes do it. A nice guy here in the Java forum pointed me to a good tutorial on doing it, though I never got around to do it.
    Off Topic:

    I have to set Tomcat+IIS up next week at work

    Quote Originally Posted by asp_funda
    BTW, you know of any good guide on integrating Tomcat with Apache on both Linux/Unix & on Windows?
    http://www.sitepoint.com/article/qui...-guide-windows is a great one for Windows. As far as Linux goes, the integration is pretty much the same thing, use mod_jk and follow the instructions.

  20. #20
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Off Topic:


    Quote Originally Posted by vgarcia
    I have to set Tomcat+IIS up next week at work
    I can only sympathise!!! want the link to the guide that I got?
    Here's the thread that I started over an year ago, at http://www.sitepoint.com/forums/showthread.php?t=147159 & Blane Warrene was the nice guy who gave me that link.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  21. #21
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Off Topic:


    Quote Originally Posted by vgarcia
    http://www.sitepoint.com/article/qui...-guide-windows is a great one for Windows. As far as Linux goes, the integration is pretty much the same thing, use mod_jk and follow the instructions.
    Also, if Tomcat is integrated with Apache, I'd like Apache to be main server & Tomcat just for getting/parsing/sending the JSP stuff, so I can use mod_rewrite etc. with Apache. Does that article cover that??
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  22. #22
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Quote Originally Posted by dc dalton
    One of my friends from where I used to teach is on the JRun development team ... and we HAD to use it at the school .... he got so sick of hearing us complain he would just nod his head and say "I KNOW, I KNOW IT SUCKS" .. really funny cause he is an amazing guy .... (freaking smart too) ... and he gets frustrated with it!
    Well, if you see it, almost all of Macromedia Applications like Flash, Dreamweaver, JRun, etc. are slow on a good PC with a 2Ghz Processor & a 512MB RAM, if there are some other applications open or if 2 of theirs is open. Yet they don't stop ranting that how their products make your work complete fast. I mean if they'd just increase the performance & speed of the applications rather than adding new features in the next release, it would sell pretty damn fast!!!
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!


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
  •