Rahul Dayal Sharma wrote:Hi Ken,
I will check out that book, but i would like to know about the prerequisites for Spring and of course Roo
- Solid Java OO development techniques - interface driven development
- Some knowledge of the concept of reflection and what it does
- A background in Java EE concepts such as transaction management and security
- Understanding of the proxy design pattern - Spring uses dynamic proxies to wrap beans with transaction, security, jmx, and other support
- Helps to have prior use of a model-view-controller patterned web framework such as Struts, but you can learn in in the context of Spring MVC
- Comfort with annotation-driven Spring bean configuration - Spring MVC is annotation-driven, so you'd use annotations such as @RequestMapping, @Controller, etc.
- Some web application server knowledge - how to deploy wars, for example
- Knowledge of a build tool such as Ant or Maven - both of which can be used to put together Spring builds
Spring DBMS support
- Knowledge of JDBC
- Knowledge of a database, such as PostreSQL, Oracle, Sybase, etc...
- Knowledge of how to connect to a database normally (connection settings such as username, password, server, JDBC URL, etc)
- for ORM such as JPA or Hibernate, you'll need to learn how those are programmed, but Spring can make it easier for you
- for JDBC, Spring has a fantastic tool called the JdbcTemplate that simplifies JDBC code to one or two lines plus a handler method - no more try catch code!
The same pattern is true for any technology Spring exposes. It helps to know it, to see examples natively in it, so that you can see how Spring approaches providing those services to you. And the manual for Spring itself - the Spring Framework Reference Guide - is really, really good. One of the best.
Spring Roo won't be as useful to you unless you know the above to some degree. In a way, it's a power tool, one that can make your life easier. Especially if you have a lot of repetitive tasks, or have to create a lot of projects in your organization and want to set some standards, it's great. But it needs some focus by the developers using it, or it will just be a code generation tool.
So, start w/Spring, but as you're learning Spring, try creating projects in Spring Roo that have the features you're researching. For example:
For JMS, go ahead and use jms setup to set up a JMS server inside of your app, then write JUnit integration tests to learn how to post messages and consume answers.
For JDBC, go ahead, set up a simple Roo project, and inject the dataSource into an integration test. Then create a JdbcTemplate instance (it takes the dataSource as a constructor) and play with it.
Hope this helps.