aspose file tools*
The moose likes Spring and the fly likes General Queries for a Spring Web Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "General Queries for a Spring Web Application" Watch "General Queries for a Spring Web Application" New topic
Author

General Queries for a Spring Web Application

Vaibhav G Garg
Ranch Hand

Joined: Sep 23, 2011
Posts: 140
I am new to Spring and J2EE Development. I have the following queries regarding Spring and J2EE dev. Please provide your inputs:


i. Where do we put the business logic in a Spring application?

ii. Can we use EJBs in a Spring application?

iii. Is it good to use EJBs in a Spring application or does Spring provide any alternative to this?
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7


i. Where do we put the business logic in a Spring application? This is no different then any other application you may write. Typically the business logic lives in the service layer, how you want to organize your classes and packages in the service layer is entirely up to you, there are a couple different patterns for package structure out there and googling around will demonstrate them.

ii. Can we use EJBs in a Spring application? Yes.

iii. Is it good to use EJBs in a Spring application or does Spring provide any alternative to this? I would argue just because you can does not mean you should. I have never encountered a need to use EJB's in my Spring applications and I have worked on some pretty large applications. To the second point, Spring was right from its inception considered an alternative to EJB's, so I guess the answer is yes.


[How To Ask Questions][Read before you PM me]
Ashish Agre
Ranch Hand

Joined: Jan 22, 2011
Posts: 73

i am also :
Vaibhav G Garg wrote:I am new to Spring and J2EE Development. I have the following queries regarding Spring and J2EE dev. Please provide your inputs:


i. Where do we put the business logic in a Spring application?

ii. Can we use EJBs in a Spring application?

iii. Is it good to use EJBs in a Spring application or does Spring provide any alternative to this?


And what will be the BEST IDE many people use Eclipse what about Netbeans ??


| B.E IT | SCJP 6.0 98 % |
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

I use STS which is built on Eclipse. The advantage is STS is a project maintained by the Spring folks so you usually see better Spring support. That being said I know a lot of people that swear by IntelliJ. I have never had the chance to get used to a new IDE but if I were to use something else that is probably what I would try. But once again IDE's are just tools and you can write a Spring application in notepad if you wanted to, it comes down to personal preference.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

I own all three and prefer IntelliJ IDEA for my Spring development. Spring is built into IDEA, meaning there aren't separate plugins. And I find many more benefits of IDEA over STS or Eclipse. I have already spent a good 6 months just trying to fix Eclipse problems that on fixing my code that I never have in IDEA.

That isn't to say that I never use STS, as a matter of fact, I have to use it a lot. I teach the Core Spring class, so the IDE for that class is STS. ;)


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

Hey Mark do you think the community edition of IDEA is worthwhile or would I have to shell out the $ to give it a real test run? I have been meaning to give it a whirl I hear lots of good things
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Bill Gorder wrote:Hey Mark do you think the community edition of IDEA is worthwhile or would I have to shell out the $ to give it a real test run? I have been meaning to give it a whirl I hear lots of good things


They should give you a 30 day free trial of the full edition without having to pay. The community edition is missing a lot of framework support, so you wouldn't have any Spring support, just like brown bag vanilla Eclipse wouldn't have it.

Here is the big reason why to me IDEA is much much cheaper than a free Eclipse. TIME. I have spent a good 6 months fixing Eclipse, at a rate of $150 an hour, that is 150K I spent on Eclipse. Compared to IntelliJ, well, I am sure I spent some time somewhere trying to get something to work in IDEA, but very very rare that it might add up to a couple of days. So for $300 I find IDEA the best investment ever.

Mark

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: General Queries for a Spring Web Application