Application written with Servlets

Discussion in 'Java' started by John, Jan 17, 2007.

  1. John

    John Guest

    Hi all:

    I used to use Java quite a bit but it was a while ago and before J2EE became
    mainstream. A customer presented me with a situation recently where he said
    they have written their entire application using servlets, and I am
    wondering if someone out there can tell me if this is an acceptable
    approach, or would it be better to use EJBs? Please note my EJB experience
    is nil, but I did work with servlets a bit, I am just not sure if servlets
    alone should be used to build a viable solution.

    Thanks.

    John.

    --
    This message sent from Windows Vista Ultimate
    http://mscrmguy.blogspot.com/
     
    John, Jan 17, 2007
    #1
    1. Advertising

  2. John

    Daniel Pitts Guest

    John wrote:
    > Hi all:
    >
    > I used to use Java quite a bit but it was a while ago and before J2EE became
    > mainstream. A customer presented me with a situation recently where he said
    > they have written their entire application using servlets, and I am
    > wondering if someone out there can tell me if this is an acceptable
    > approach, or would it be better to use EJBs? Please note my EJB experience
    > is nil, but I did work with servlets a bit, I am just not sure if servlets
    > alone should be used to build a viable solution.
    >
    > Thanks.
    >
    > John.
    >
    > --
    > This message sent from Windows Vista Ultimate
    > http://mscrmguy.blogspot.com/

    Most of the webapps we create at my work are created without EJBs.

    Generally, Servlets aid in writing applications, but instead
    applications are written as Servlets.

    Many of our apps are created using Spring, Tiles, Hibernate/iBatis,
    JSPs, etc...

    So, yes, it is possible to do things without EJB. EJB's tend to be
    extremely heavyweight from what I hear, but I don't have any real
    experience, so I can't give you any more opinion than that.
     
    Daniel Pitts, Jan 17, 2007
    #2
    1. Advertising

  3. John wrote:
    > I used to use Java quite a bit but it was a while ago and before J2EE
    > became mainstream. A customer presented me with a situation recently
    > where he said they have written their entire application using servlets,
    > and I am wondering if someone out there can tell me if this is an
    > acceptable approach, or would it be better to use EJBs? Please note my
    > EJB experience is nil, but I did work with servlets a bit, I am just not
    > sure if servlets alone should be used to build a viable solution.


    EJB is not a replacement for servlets.

    If you need a web GUI then servlets is a possibility, but
    nowadays I would recommend JSP with JSF and possible
    an AJAX taglib.

    If you have big transactional and scalability requirements,
    then consider putting EJB's behind your web app.

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Jan 20, 2007
    #3
  4. John

    Lew Guest

    Arne Vajhøj wrote:
    > EJB is not a replacement for servlets.
    >
    > If you need a web GUI then servlets is a possibility, but
    > nowadays I would recommend JSP with JSF and possible
    > an AJAX taglib.


    JSP are really servlets, but that aside, there is still a need for a few
    servlets in many Web projects. If you follow the MVC pattern, there is a
    controller servlet (possibly provided by the Struts framework, e.g.), there
    might be a few helper servlets for special purposes.

    > If you have big transactional and scalability requirements,
    > then consider putting EJB's behind your web app.


    EJBs scare me, but Java 6 offers hope to make it easier. But that only has to
    do with the implementation details - they clearly serve a useful architectural
    niche.

    - Lew
     
    Lew, Jan 20, 2007
    #4
  5. Lew wrote:
    > Arne Vajhøj wrote:
    >> EJB is not a replacement for servlets.
    >>
    >> If you need a web GUI then servlets is a possibility, but
    >> nowadays I would recommend JSP with JSF and possible
    >> an AJAX taglib.

    >
    > JSP are really servlets,


    Yes. Implementation wise/internally. Which is very relevant
    for the question about comparing performance og JSP and servlet.
    Not so relevant if the question is about what to write.

    > but that aside, there is still a need for a few
    > servlets in many Web projects. If you follow the MVC pattern, there is a
    > controller servlet (possibly provided by the Struts framework, e.g.),
    > there might be a few helper servlets for special purposes.


    It is rather rare to write those one self now a days.

    JSF comes with a controller servlet as well.

    The only good usage I can see for a user written servlet
    is one for displaying graphics.

    >> If you have big transactional and scalability requirements,
    >> then consider putting EJB's behind your web app.

    >
    > EJBs scare me, but Java 6 offers hope to make it easier. But that only
    > has to do with the implementation details - they clearly serve a useful
    > architectural niche.


    Java 6 does not have anything about EJB.

    Do you mean J2EE (or JEE) 5 ?

    EJB is a rather big niche in J2EE.

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Jan 23, 2007
    #5
  6. John

    Lew Guest

    Arne Vajhøj wrote:
    >> EJBs scare me, but Java 6 offers hope to make it easier. But that only
    >> has to do with the implementation details - they clearly serve a
    >> useful architectural niche.

    >
    > Java 6 does not have anything about EJB.
    >
    > Do you mean J2EE (or JEE) 5 ?


    Uh, right. I tend to lump the two together in my mind. I was referring to the
    elimination of that home/remote interface mechanism and the other streamlining
    that's been done to EJBs in *JEE 5*.

    > EJB is a rather big niche in J2EE.


    Yes, big, useful, and now somewhat less scary.

    - Lew
     
    Lew, Jan 23, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve C. Orr, MCSD
    Replies:
    1
    Views:
    595
    reaway lee
    Aug 24, 2003
  2. Wendy S
    Replies:
    0
    Views:
    808
    Wendy S
    Jul 1, 2003
  3. Phil Hanna
    Replies:
    0
    Views:
    728
    Phil Hanna
    Jul 2, 2003
  4. John C. Bollinger

    Re: servlets - application level object

    John C. Bollinger, Jul 2, 2003, in forum: Java
    Replies:
    2
    Views:
    1,790
    John C. Bollinger
    Jul 2, 2003
  5. KaiWen
    Replies:
    102
    Views:
    2,873
    Jorgen Grahn
    Sep 15, 2011
Loading...

Share This Page