--- Rick Schumeyer wrote:
> So if I understand correctly, if I plan to use S2, I
> will also need to swap out some part of S2 with some

> part of Spring (and deal with a Spring learning 
> curve)?  

No; there's no swapping or anything.

You don't *need* to use Spring, but you are
over-complicating the trivial use-cases of Spring,
like injecting a service object.

<digression>
Just as an example using name-based autowiring, say I
have an S2 Action that logs in a user. I create an S2
configuration which might look like:

<action name="login" class="user.LoginAction">
  <result name="input" type="tiles">
    /user/login.page
  </result>
  <result name="success" type="redirect-action">
    home
  </result>
</action>

Inside my Action I have a property for the user
service implementation:

private IUserService _userService; // plus get/set

My Spring config consists of a single line (plus the
DOCTYPE etc.)

<bean name="userService"
class="user.TestUserService"/>

That's it; I'm done.
</digression>

If you don't want to use Spring, you don't need to,
but for things like this there's (almost!) no learning
curve, and it's hugely useful.

> And some people are using Spring MVC with S2?  

Maybe, but probably as a migration.

> But S2 is also an MVC framework?

Yeah. You could run S1 in parallel with S2 too. You
could probably run most any framework along with it,
doesn't mean you should or would want to.

> (And I haven't even asked about things like tiles
and
> hibernate yet!)

Tiles support is encapsulated within the Tiles plugin.
I'm not sure about the current state of Tiles 2;
things seemed to have stabilized a bit. I've had no
problems so far.

Spring's built-in Hibernate functionality is another
reason that using Spring is a good idea, but that's
separate from S2.

> I don't hope to start a flame war, but I suspect
> it's stuff like this that causes people to throw up 
> their hands and use Ruby on Rails despite its 
> reputation for scalability problems.

And RoR is a great solution for a certain set of
problems, particularly when a full-stack J2EE
implementation is clearly overkill, which is a pretty
big application space.

Not everybody has that choice, and JEE covers a lot of
functionality that is already built-in to a lot of
environments that simply doesn't exist in the RoR
world (and RoR has a host of issues of its own, enough
to make me almost give up on it for all but pretty
simple usecases).

> In order to move forward, if I start developing
> something with S2, can I add the Spring DI stuff 
> later (without breaking my code) or do I need to 
> start off with Spring?

You don't ever need to use Spring if you don't want
to. 

I suspect that most developers would be able, and
prefer, to use functionality like the above simplistic
example (it makes testing a *dream*) right off the
bat, though.

> And to push my luck with one more...if I need to be
> using parts of Spring anyway...why not just use 
> Spring?  Why bother with S2?

I suspect it's largely a matter of preference, and
much of the functionality is similar. Having done
fairly extensive development with both, I know I
prefer S2, but YMMV.

d.



 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

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

Reply via email to