Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
-none-

-none-

2007-09-01       - By Jeromy Evans

 Back
Hi Hayrol,

I'm currently involved with a a). S2 project that doesn't use any IOC
framework, b). one that uses S2+Guice, c). another with S2+Spring and
other d). with S2+EJB3 (all with JPA/Hibernate3)

a) If you don't use an IOC framework you'll find you have to provide
services to your actions anyway either by injection from your own S2
interceptor, via the servlet context, a service locator or singletons.
For a project of any reasonable size it quickly gets out of hand, but
you can get survive.  You will need to write your own Session-in-view
interceptor for Hibernate if you need that.

b). Guice integrates easily with S2 and is very elegant and simple to
use.  You'll be able to inject dependencies into your actions and use
the basics of AOP.  It's pleasant to use if all you want is @(protected)
You'll need to write your own session-in-view interceptor for Hibernate
if you need that.  It doesn't provide anything else, which is nice in
some regards.  I definitely recommend it over a).

c). Spring integrates easily with S2 and simplifies integration with
most other things you may need (web services, JMS, mail, AOP etc).  It's
a massive time-saver, but if you don't really know what you're doing, or
don't really understand how spring works it's easy to stuff things up or
simply get confused.  Most of the criticism spring receives is because
programmers have used and abused it (ie. they end-up coding in XML
instead of java due to their own/teams poor design and don't understand
spring errors).  Its inevitable you'll have to learn Spring at some
point because it's everywhere and not about to go away.  I definitely
recommend it over a).

d). Although EJB3 is a massive simplification compared to prior
versions, it's not a productivity-focused framework like b. or c..  It
doesn't integrate with S2 at all (eg. can't inject into actions without
providing your own mechanism) and I find it's better to use b. or. c. to
access EJB3 services.  The benefit of EJB3 is that it forces you to
focus on aspects of the architecture that are important for large-scale
projects (such as ensuring services can pooled, distributed, passivated
and a constant focus on transactions and security), but this is
irrelevant for most web projects. I wouldn't recommend it unless you had
a lot of prior experience and a genuine need (eg. consider it if you're
considering distributed transactions).

Hope that's helpful.  I won't ever get into an argument about the
benefit of b). vs. c). vs. d). because they're all useful under certain
circumstances and most Java forums already contain a useless thread on
the topic.

cheers,
Jeromy Evans

Hayrol Reyes Mej?a wrote:
> Ok, thanks guys.
>
> But it's not completely clear for me why to use: Struts2 + Spring2 +
Hibernate3 ... if I can do the same with Struts2 + Hibernate3 avoiding a layer
of possible problems. Maybe it's because I think of a MVC framework that
provide me all the necessary to build the View of the application with JSP the
controler with Actions and Mappings and the interface model with Hibernate
without the need to look away for other solutions parts.
>
> Any way, I'll have to give a look to Spring sections that "rocks" and try it
according to documentations I found.
>
> Best Regards,
>
> Hayrol
>
>
>
>
>> Date: Fri, 31 Aug 2007 22:40:48 -0400> From: musachy@(protected)> To: user
@(protected)> Subject: Re: Struts 2 !!!OK!!! cannot we live without Spring
?> > Plus, if you haven't used Spring, you should give it a try, it rocks,>
except the MVC, IMO (but I'm biased anyway :) )> > musachy> > > > On 8/31/07,
Dave Newton <newton.dave@(protected)> wrote:> > --- Hayrol Reyes Mej?a <hayrolr
@(protected)> wrote:> > > why I have found several documentation, tutorials,> >
> etc, that always include Spring? ... It's supposed> > > that we need to live
with Spring for the rest of> > > the live?> >> > You don't need to use Spring
if you don't want to.> >> > Spring consists of many independent parts; you do
not> > need to use all of it -- the primary use in S2> > applications is
primarily dependency injection, which> > is very simple to set up and maintain.
> >> > I suspect many of us also use it for database access,> > but that's
certainly not required (although it's a> > pretty good idea, in my opinion).> >
> > d.> >> >> > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
-- --> > To unsubscribe, e-mail: user-unsubscribe@(protected)> > For
additional commands, e-mail: user-help@(protected)> >> >> > > -- > "Hey
you! Would you help me to carry the stone?" Pink Floyd> > -- ---- ---- ---- ---
-- ---- ---- ---- ---- ---- ---- ---- ---- -----> To unsubscribe, e-mail: user
-unsubscribe@(protected)> For additional commands, e-mail: user-help
@(protected)>
>>
> __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
> Explore the seven wonders of the world
> http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.484 / Virus Database: 269.13.2/983 - Release Date: 1/09/2007 4
:20 PM
>



-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.