aspose file tools*
The moose likes Other Application Frameworks and the fly likes Spring:How much is sufficient? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring:How much is sufficient?" Watch "Spring:How much is sufficient?" New topic
Author

Spring:How much is sufficient?

Javed G Shaikh
Greenhorn

Joined: Jun 21, 2007
Posts: 3
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?


_/@|/$]-[4}<<br />-----------------------------<br /><a href="http://javshak.blogspot.com" target="_blank" rel="nofollow">http://javshak.blogspot.com</a><br />-----------------------------
Frederic Daoud
author
Ranch Hand

Joined: May 22, 2008
Posts: 71
Absolutely yes, you can use Spring without AOP. Spring is very modular - you can use just the parts that you need.

Frederic Daoud
Author, Stripes...and Java Web Development is Fun Again
Stripes book
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Javed G Shaikh
Greenhorn

Joined: Jun 21, 2007
Posts: 3
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
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

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
Sagar Kale
Ranch Hand

Joined: May 02, 2008
Posts: 188
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.
Tamas Jano
Ranch Hand

Joined: Feb 21, 2007
Posts: 55
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

Joined: May 02, 2008
Posts: 188
thanks Tamas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring:How much is sufficient?
 
Similar Threads