aspose file tools*
The moose likes Other Application Frameworks and the fly likes Spring/Struts/EJB? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring/Struts/EJB?" Watch "Spring/Struts/EJB?" New topic
Author

Spring/Struts/EJB?

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Hi Guys,

In my opinion Spring = EJB3.0 + Struts. Am I rught guys??

What the future is going to say?? Any predictions guys??
[ April 14, 2007: Message edited by: Bear Bibeault ]

SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Craig Walls
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
Originally posted by Jothi Shankar Kumar Sankararaj:
In my opinion Spring = EJB3.0 + Struts. Am I rught guys??


That's one way of looking at it...not entirely accurate, but certainly not invalid.

At it's very core, Spring is a dependency injection container. For a moment, forget everything else that Spring does...at it's core, its purpose is to wire application objects together in a loosely-coupled way using dependency injection.

Then, on top of that Spring offers AOP support. AOP is also a mechanism for loose-coupling, but different from DI. Where DI decouples your application objects from each other, AOP decouples functional concerns from the objects that they are applied to. (Logging and security are common examples here).

Then, on top of AOP, Spring offers declarative transactions (similar to EJB). And Spring Security uses AOP for declarative security. And Spring Modules Caching uses AOP for declarative caching.

Then there's a host of other frameworks and APIs built on top of the core Spring container. This includes Spring MVC for web apps, Spring remoting for turning POJOs into remote objects, Spring's data access abstractions for removing the boilerplate code from data access, etc, etc, etc.

There's also a rich client framework, a contract-first web services framework, support for JMS, support for JMX, and a ton of other stuff. Spring even has stuff to integrate with EJBs.

So, yes, there are portions of Spring that resemble and offer similar (or in some cases, superior) features as Struts and EJB 3. But to say that Spring == EJB 3 + Struts, is shortchanging Spring quite a bit.

The really cool thing is that although Spring does a lot of different things, you don't have to use them all. Spring's very modularized, allowing you to use the bits you need and ignore the rest.


Spring in Action - Unleash POJO power in your applications!
Modular Java - Discover the secret weapon to modularity on the Java platform!
XDoclet in Action - Your complete guide to code generation with XDoclet.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Thanks Craig for the clarification. The book Spring in Action is a good one for a beginner?? I'm right now working on jsp/servlet/struts technologies and I want to build a career in either EJB or Spring and I wanted to land in a good one before I could start delving in these two technologies! So which one do you suggest keeping in mind the job market and demand for people with Spring or EJB skills??

Thanks in advance!
Hendy Setyo Mulyo
Ranch Hand

Joined: Dec 01, 2004
Posts: 219

my suggestion is: Spring would be a good investment since a lot of job offers demanding Spring nowadays, while EJB (2.0) is stale and people will start using EJB 3


Hendy Setyo Mulyo
SCJP 1.4 (95%), SCWCD 1.4 (94%)
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

One more information I want to know is that what about the implementation of security in Spring framework??
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Any good books guys you can suggest for a beginner in spring. A book that has everything in place along with the IDE needed to work in Spring.
Craig Walls
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
Originally posted by Jothi Shankar Kumar Sankararaj:
Thanks Craig for the clarification. The book Spring in Action is a good one for a beginner??


I think it's pretty good! But, of course, I'm biased.

Even so, I don't mind plugging the other Spring books. For beginners, I think that Rob Harrop's "Pro Spring" is pretty good. And Matt Raible's "Spring Live" ain't too shabby, either.

So which one do you suggest keeping in mind the job market and demand for people with Spring or EJB skills??


Again, I'm Spring-biased, so my first response is to recommend Spring.

But truthfully, if you have the time to do so, I recommend that you learn both Spring and EJB 3, as both will be very marketable skills. And if you have both skills, then you're that much more dangerous in the marketplace.
Craig Walls
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
Originally posted by Jothi Shankar Kumar Sankararaj:
One more information I want to know is that what about the implementation of security in Spring framework??


Spring Security (formerly known as Acegi Security) uses a mix of aspects and servlet filters for security. Aspects are used to secure method invocations, while servlet filters are used to secure web requests.

Spring Security's scope covers everything from authentication to authorization to ACLs. And the nice thing about it is that it is based on interfaces and dependency injection. Therefore, it's highly pluggable and very flexible.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Thanks Craig for all your valuable ideas and suggestions!
Riyaz Abdul Kareem
Greenhorn

Joined: Apr 23, 2007
Posts: 11
Yes Craig...

i certainly agree on your views like this one.

The really cool thing is that although Spring does a lot of different things, you don't have to use them all. Spring's very modularized, allowing you to use the bits you need and ignore the rest.

Please tell us more on DI...
Thanks in advance
riyaz
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Craig,

All your posts were really helpful and now I'm going to head towards learning Spring. I did not work in EJB before though I have extensive experience using jsp/servlets. When I was considering to learn EJB 2.1 to actually prepare for the SCBCD examination, I came to know that EJB 3.0 is ready, so I decided to skip SCBCD and better give SCWCD. Now when I wanted to advance my skills in the J2EE arena, I thought to myself which server side business component will I go for. So I got this in mind as I read in many places these words "...nowadays many companies are moving towards lightweight frameworks like Spring..." So I started to explore what it is all about and now I realize that Spring is the equivalent of EJB and perhaps more. So I decided to first master Spring as I will be shortly required to work on it. Maybe later in the future go for EJB 3.0 depending on its reception in the J2EE industry.

Once again thanks Craig for all your valuable ideas!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Craig,

Do you know any good practical Spring books for beginners that helps in learning Spring using Eclipse IDE??
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Any help guys regarding the best books that I can go for (Spring with an IDE) keeping in mind a beginner???
Riyaz Abdul Kareem
Greenhorn

Joined: Apr 23, 2007
Posts: 11
Hi Jothi

if you are interested to start spring framework. Then you
just look into this link

http://www.geocities.com/riyazkarim/index.html

click on the link that says
Spring Framework Application Links :

start learning...


IDE can be eclipse 3.1.2 and myeclipse with tomcat 5.0.
Also download spring2.0.jar and i will send the link for the Jar's
very soon.

Thanks
Riyaz

Inspired spring framework learning from craig walls.

Craig
thanks for your support and ideas on spring.
Alex Belisle Turcot
Ranch Hand

Joined: Apr 26, 2005
Posts: 516
I got Spring in Action and its perfect. I recommend this book without hesitation. This book is my first dance with spring.

I would strongly recommend you start by the 3rd part "Spring in the web layer" though. Coming from JSP/Servlet, I found that to be a lot easier. This will give you a quick idea of how Spring MVC compares to struts.

However, if you just don't care about the web part, jump in from chapter1. The spring modules are very independent and can be used as you wish.

I'm far from mastering Spring, I'm just a simple dude with the book

(I understand though that the AOP and IoC are the basis of spring, so the book's order makes sense, but I believe is not the easiest path for most of people...)

Also, www.springframework.com offers a good Spring MVC quick start called "Spring MVC Step by Step"

bye,
Alex
[ May 25, 2007: Message edited by: Alex Turcot ]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Thanks Guys. I'm going to get myself a copy of Spring in Action.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring/Struts/EJB?
 
Similar Threads
Spring Module Usage
Struts,Spring,Hibernate in the industry.
which technology to learn
Web Application Framework in the FUTURE ..
Spring?