• 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

Spring:How much is sufficient?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've recently started reading about Spring and wanted to know if it can be used without the AOP features (I could not grasp the concepts of AOP on my first attempt)? Are there is disadvantages of going this route?
 
author
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Absolutely yes, you can use Spring without AOP. Spring is very modular - you can use just the parts that you need.
 
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
Exactly. But you can still use AOP, without you having to know AOP. What I mean by that is some of the services are added via AOP underneath the covers. Things like Transactions are added via using Spring AOP, and you don't even need to know AOP to configure transactions in Spring.

But to help you understand AOP, I wanted to type the concepts and definitions for you and see if my explanations help clarify them. I am going to use them in terms of Spring AOP. AOP has many implementations and they can go a bit further.

1) JoinPoint - The is the one place where Spring AOP is a subset of a full blown AOP. In Spring AOP, a Joinpoint is any method in your application's code where you want "other" code to be run/injected.

2) Advice is the "other" code that you want to be run/injected into your application code. It is code that isn't written in your clean application code, but separated out into its own method in its own class. Things like transaction handling, exception handling, logging, security code.

3) Aspect is the class that holds the advice method.

4) Pointcut. Because the advice code is separated from your application code, you need to tell AOP how to know which methods in your application code you want to run/inject you advice code. So in order to "hook" them up, you use a special expression language that can define which application methods (joinpoints) you want to (advice with code). Using this expression language you create a Pointcut that defines that hook.

You use AOP to write advice code like say security code, so that in your application code you don't have security check code in almost every method.

Hth

Mark
 
Javed G Shaikh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Frederic : Thanks!
Mark : I liked your short & precise explanation on Spring AOP. I do plan to read more on AOP. Can you suggest some good reference book for it?
 
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

Javed G Shaikh wrote:Frederic : Thanks!
Mark : I liked your short & precise explanation on Spring AOP. I do plan to read more on AOP. Can you suggest some good reference book for it?



Tough, the Spring in Action from Manning and Pro Spring from Apress publishing are the two best books in my opinion.

Mark
 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also have recently learned spring.

I have learned Core Spring (IOC), Spring JDBC, Spring MVC, Spring AOP, Transactions, Integration with hibernate,struts,tiles. I also read little bit about Spring Security but don't know much on spring security.

The question I have is, is it enough for me to write on my resume that I know Spring.
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you test yourself with a hello world application spring style and succeed you have a pretty good reason to put spring into your CV.

Just do a simple test. Think of a very simple application that has one or 2 screens that reads/write from/to a database and want to do something with it. Build it and after succeeding think of a real life scenario and if you feel confident that you can handle it definitely put the skills in.

The test should give you an idea on how deep your understanding of the concepts really is and how easily you find your way through the implementation (eg. Spring) to make it work.

If you say even for the hello world app that using Spring is overkill, change the task. For ex: take the hello text from a dictionary table giving the locale. Even further, have a user object that when creates the session has to set a language and based on that get the texts from the dictionary etc...evolve it towards a full blown user profile management app and you will see how spring eliminates boilerplate code and when you managed all that and said...that was easy...you're DEFINITELY ready.

Good Luck!

As for AOP...Spring in Action explains it very nicely with good examples...I am recommending it too.
Also a good reading is: http://en.wikipedia.org/wiki/Aspect_Oriented_Programming

 
Sagar Kale
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Tamas
 
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic