Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

[Review] J2EE Design and Development

I finished reading Rod Johnson's J2EE Design and Development today. 700 pages took me a little over 2 weeks to knock out. This book is definitely targeted at experienced J2EE developers, which is nice. I tried to do the same with my Struts chapter in Pro JSP and I wish books would do more of it. However, the problem with targeting a more experienced audience is you lose a lot of potential buyers. Rod is definitely one sharp fellow and it shows throughout this book. Either that, or he's just got a lot of experience working with the J2EE stack in his career.

The framework described in this book eventually became Spring - and it's really just a culmination of all the things that Rod has used on his previous projects. In that respect, it's similar to AppFuse, which I created to assist me with my Java webapp projects. Like Spring, AppFuse contains all my learnings and choices over the last couple of years. Just to be clear, I don't mean to imply that AppFuse is anything close to Spring as far as functionality - but I do believe they're similar in their goals. Spring is designed to make J2EE easier, while AppFuse is designed to make project setup and testing easier. Hopefully, when I start using some Spring features in AppFuse, developing with AppFuse will become even simpler.

Back to the book. I found the first few chapters somewhat boring since they covered a lot of the stuff I already knew about J2EE applications. The middle part of the book was on Spring's simplified JDBC approach and it also covered EJBs. I tend to shy away from writing JDBC these days, especially since Hibernate suits my needs so nicely. If I'm working with an existing database and there's a lot of SQL code already, I'll use iBatis. And EJBs, blech - I've never had a need for them. Admittedly, a lot of my projects are small and don't require container-managed transactions. I've also heard rumors of CMT being a part of Spring - so who knows if there's any good argument for EJBs anymore. Anyway, I found the middle part of the book quite boring as well since I don't much care about JDBC or EJB.

The last part of the book, however, peaked my interest. It discussed MVC design, View Technologies (i.e. JSP, Velocity, XSLT, XMLC, PDF) and basically a lot of stuff related to the web tier. In this area, I was most impressed with XMLC, which allows you to write HTML pages - then use Java to manipulate it's contents. Very slick stuff for having a static prototype that also serves as the code for your app. I don't see myself switching from JSP to XMLC, but I dig the option. In the Performance Testing and Tuning chapter - great examples where given and seemingly real-world optimizations where made. This chapter could prove to be a handy reference for enhancing performance with simple caching.

Overall, I thought this was a great book, although a bit heavy on the EJB stuff for me. Now I'm motivated to learn more about Spring. In the process, hopefully I'll figure out how it makes iBatis and Hibernate easier to work with (links are most welcome). Next up is Java Open Source Programming(500 pages), which I expect to take another two weeks to polish off.

Posted in Java at Jan 18 2004, 01:38:52 PM MST 6 Comments
Comments:

CMT is actually pretty easy to implement in any tool that supports interceptors -- Spring has a pretty nice implementation. Actually, I like a lot of what I see in Spring, I am just not sure that it is any less complex than a full J2EE stack, definately better designed, but not sure on the complexity front. Maybe it is better off as you can much more easily simply ignore and not use components you don't need. -Brian

Posted by Brian McCallister on January 18, 2004 at 11:55 PM MST #

Nice to see you dismiss EJB without ever having used them? Seems kind of a strange thing to do.

Posted by Bo on January 19, 2004 at 01:10 AM MST #

Bo - I got into this industry as an HTML developer and started doing Java as a UI developer. I have been on projects where the persistence layer was implemented using EJBs and RowSets - and it was terribly slow. Since I started implementing persistence layers myself, I've used JDBC and Hibernate - and they've both fulfilled my needs.

Posted by Matt Raible on January 19, 2004 at 02:44 AM MST #

Matt - for iBATIS look at the sample JPetStore and for Hibernate look at the sample PetClinic, both in the latest Spring release. Rod has a new book coming out co-authored by Juergen Hoeller about "J2EE without EJB". Sounds like it will be of interest to you since it covers declarative transactions for POJOs using interceptors with Spring. As for "Java Open Source Programming", I think you will be able to finish it in week or so. It's a good book, but definitely more "light weight" than Rod's book.

Posted by Thomas Risberg on January 19, 2004 at 04:39 AM MST #

EJBs have the following pros (IMHO): * Support for declerative security * Support for load-balancing, clustering and transparent failover * Support for nested transactions * Support for remote access (SOAP, CORBA and of course RMI support - depends on the app server however) As you can see EJB makes sense for large scale applications which need cluster support. Applications which use a heavy weight client, e.g. Swing, also benefit from EJB because of the remote access support. Entity beans, however, are indeed questionable. On the other hand modern containers, such as JBoss, provide solutions for the N+1 problem. Entity beans can be seen as a distributed transaction-aware HashMap :-) Of course you can implement all that stuff on your own but in the end you would end with another complex system. Transactional distributed systems _are_ complex. For most applications EJB is a little bit overkill indeed IMHO.

Posted by WoEyE on January 19, 2004 at 10:09 AM MST #

Following up on Thomas, I'd like to point out that make data access easier is an important goal of Spring, particularly in the context of high-level transaction management. There is a generic (unchecked) DataAccessException hierarchy for writing DAO interfaces, decoupling callers from resource-specific exceptions. Spring offers dedicated support for Hibernate and iBATIS, taking care of Session/SqlMap handling and transaction participation (using a ThreadLocal Session underneath); it offers similar support for JDO and plain JDBC. Seamless participation of diverse data access strategies within the same high-level transaction is straightforward. Essentially, Spring's main focus is making *logical* middle tiers as easy to develop and configure as possible, with seamless integration of O/R mapping tools and with the full power of declarative transactions (using pluggable transaction strategies).

Posted by Juergen Hoeller on January 29, 2004 at 09:59 AM MST #

Post a Comment:
  • HTML Syntax: Allowed