EJB+JSP versus PHP

Discussions

EJB design: EJB+JSP versus PHP

  1. EJB+JSP versus PHP (3 messages)

    What is the advantage of using EJB+JSP for a web ticket selling application instead of using PHP?

    Can Java support more customer hits compare to PHP?
    Is EJB+JSP better than PHP? Why?

    Threaded Messages (3)

  2. EJB+JSP versus PHP[ Go to top ]

    firstly, I think its advantage is that it's devided into some tiers , each tier only centralizes on its own function , and proviers other tiers its interface , if it wants to access other tiers , it can access their interface , without caring of its implementation.

    secondly , codes enforce high efficient and resuable with ejb+jsp .

    thirdly , ejb and jsp can be devided into different servers , which make it very scalable

    etc
  3. EJB+JSP versus PHP[ Go to top ]

    I'm not a PHP expert, so I'll just give you a general advise: compare PHP to JSP. EJB is a completely different technology for doing completely different things. Where you need EJB, you probably can't use PHP anyway. And where you don't really need EJB, my advise is don't use it.

    As for xianbing's comment, I don't think EJB will make your application more efficient. I for one have never seen a project where EJB helped boosting up performance. At best it may not hurt, and even that requires carefull design using read-only transactions, like TheServerSide's (I think there was some article about this somewhere in here... Floyd?). IMO EJB should be used to gain scalability, reusability of components, complex transactional behaviour, and a "presentation independent" design. If you pick EJB in order to boost performance, my bet is you'll be disappointed.

    Gal
  4. EJB+JSP versus PHP[ Go to top ]

    Gal is giving good advice here. His reasons to select EJB over other technology are spot on in my opinion.

    I've used PHP, and I like it a lot. You can get websites up in double quick time using it, and as it's freeware, it doesn't cost much to use either.

    I've also been involved in architecting systems based upon JSP/Servlet/EJB. PHP should be compared to JSP not EJB. As Gal says, EJB is appropriate for those applications where PHP (or JSP alone for that matter) couldn't help e.g. you have an application which uses distributed transactions across multiple databases.

    I don't know what your application is going to look like, nor how its data is supported or the simultaneous users it requires to support, so I can't advise on the suitability of PHP for this task. PHP4 (ZEND) performs well as the script is precompiled on first run. This improves performance significantly. PHP4 is known to scale quiite well, but don't ask me to quantify that statement.