• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

General Queries for a Spring Web Application

 
Ranch Hand
Posts: 143
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 73
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ??
 
Bill Gorder
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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. ;)
 
Bill Gorder
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic