I
On Tue, Oct 14, 2008 at 2:35 PM, Martin Gainty <[EMAIL PROTECTED]> wrote:

> would be nice if we could start at the top of Pikes Peak to look down on the 
> Spring vs EJB debate
> Spring promotes the use of Factories and EJB doesnt

Well, the both use DI to inject things, so maybe I'm missing that
value of the Factories to which you speak.

> Spring works well with all ORM methodologies including Hibernate and iBatis

Yes, that is Spring's awesome strength... super flexible. +1 for
Spring there, and I've been the biggest supporter of iBATIS for years
(still am.) However, if your company is decided on using ORM and you
are going to use JPA, whatever is underneath doesn't matter 'too' much
- hibernate/toplink,etc. I don't see it a big deal using JBoss or
Glassfish in that case and just 'go'.

> EJB supports implementation of Local vs Remote access for stateful and 
> stateless beans
> latest version of EJB supports Annotations to implement interfaces
> more salient points?

Yea, that's what is nice now, is setting up any kind of EJB is super
easy. Also, if you are using a JEE container you get some other things
out of the box like JMS as well without having to use third party jars
to handle things.

>
> with regards to MVC who wins and for what reasons?

Not sure what you mean there.. you mean MVC in regard to web apps? In
that case, you can use anything you want. (I haven't used Seam and it
seems overly complicated. I prefer simple Stripes for my web front
ends. )

> is this as simple as EJB is good ?
> and Spring is bad ?

I don't think it's an either/or. I think they are BOTH good. However,
here's my personal preference at this stage... (and this can change
next week:) - if I need a simple CRUD app that is all self contained
and isn't going to be a corporate behemoth...I'd use Rails. If it's
going to be a large corporate application I currently lean towards JEE
(EJB3).

In my short endeavor with Spring/JPA/Tomcat, I  found setting up
Spring to work with JPA and Tomcat to be a pain. .. .had issues with
the load time weaving and looking at the docs and googling on the
setup for Tomcat was confusing. Plus I had to start looking over a
Spring book - all for what gain? The only main benefit I found was
that it was easier to test my Spring pojos. With Spring/Tomcat, I also
had to start importing all kinds of different jars into my application
lib and tomcat lib (aspectj jars, spring jars, etc.) Overall it was
just more of a pain to me getting started. Again, I'm by no means
against a Spring/JPA/Tomcat or Resin solution. I just disagree that
things are now easier' with Spring vs using JEE5 (granted this used to
not be the case.

For those bashing JEE and EJB3 (not saying you are) do take a look at
even the simple example I posted. Look at how little configuration
there is. I'm not saying learning the spring setup is super hard...
but I (and others) have had issues trying to get it to work with
Tomcat. Sure it can work, but I was up and running in less time with
EJB3 on JBoss (and I had the same experience with Glassfish also.) And
yes, I am aware there will be some container specific files I'll need
to modify (ie pool sizes, etc. But I don't find that too big a deal..
even on Tomcat or Resin there are files you could tweak.)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to