JDBC has simplified database access in Java applications, but a few nagging wrinkles remain—namely, persisting Java objects to relational databases. With this book, you’ll learn how the Spring Framework makes that job incredibly easy with dependency injection, template classes, and object-relational-mapping (ORM).
Through sample code, you’ll discover how Spring streamlines the use of JDBC and ORM tools such as Hibernate, the Java Persistence API (JPA), and Java Data Objects (JDO). If you’re a Java developer familiar with Spring (perhaps through O’Reilly’s Just Spring tutorial) and want to advance your data access skills, this book shows you how.
Learn how to use Spring’s basic and advanced data access tools
Work with Spring’s JdbcTemplate class to separate non-critical code from business code
Eliminate placeholder variables in your queries with the NamedParameterJdbcTemplate class
Use Spring’s template classes to perform batch executions
Operate inserts on database tables without writing any SQL statements
Learn about Spring’s support for Hibernate as an object-relational-mapping tool
Use JPA as a standards-based ORM—alone or with Spring support
Move data from a relational to a non-relational database with JDO
Madhusudhan Konda is an experienced Java consultant working in London, primarily with investment banks and financial organizations. Having worked in enterprise and core Java for the last 12 years, his interests lie in distributed, multi-threaded, n-tier scalable, and extensible architectures. He is experienced in designing and developing high-frequency and low-latency application architectures. He enjoys writing technical papers and is interested in mentoring.
The book mentions that the source code provides for a SQL script to create a database with 3 tables. I only found a script for 1 table (TRADES). What happened to the script for the whole database, not to mention, the script to create the other 2 tables? If the code is incomplete, save the reader some frustration and mention it otherwise it will just turn readers off and undermines the credibility of the author and the integrity of the publisher.
Bottom Line No, I would not recommend this to a friend
Just Spring Data Access by Madhusudhan Konda is a quick overview of how to utilize data access within the Spring framework. The author states that his objective with this book is to provide a direct, no fluff, explanation of how to use Springs framework to interact with JDBC, Hibernate, JPA, and JDO. I do feel that the author has achieved this goal and if you are looking for a book that can quickly introduce to you the basics of working with accessing data using the Spring framework, then this book is for you. The caveat that I have with that statement is the fact that in the 78 pages the author is only able to cover JDBC, Hibernate, JPA, and JDO at a high level and if you are looking for something with depth, then this is not the book for you. Again, if you are looking for a quick introduction to the concepts and are happy to investigate further when you have questions, then this book will provide that quick introduction for you. Personally, that is how I approached this book, since I did not have any background with Spring Data Access and wanted to know more about it. When I started reading this book, I knew that I would not get the depth that I wanted but I did come out of it knowing how to get up and going with a good understanding of what is going on.
I feel that the author did a good job with the sample code that he walks through in order to explain how to setup and work with the different data access protocols. I also enjoyed the fact that he explained that there is a better way of writing your code when dealing with Spring version 3 or later that you should just work with the native APIs of the protocols and allow Spring to handle the dependency injection. I felt that this was good information to have and to understand when creating your own implementation. There was one section in Chapter 5 that I wish the author would have explained or elaborated on in more detail and that was the JDO versus JPA versus Hibernate implementations. Personally, I think this is a critical area for any architect to understand before selecting the implementation that they want to use in their application. The author does provide some information on the pros and cons, but the section is limited to 2 pages and after reading the section I felt like I still had questions. For example, the author states that if you are going to deal with different data source from Relational Data Bases (RDB), object databases, XML, etc., that you will want to use JDO; but then he states that you could use JPA with a change to make it work with non-RDB data source and doesn't say how. I really wanted to know how, therefore I wish that this section provided a bit more depth in it coverage of the topic.
Overall, I think that the author achieved his goal in creating a high level book that will get you up and running with Spring and accessing JDBC, Hibernate, JPA, and JDO type of data sources quickly. So if that is your goal and don't want to spend the time searching around the internet, then this book is for you. On the other hand, if you know that you want to have a more in depth coverage of the topic, then you will want to look else where