Spike

drfloob.com

About

My name is AJ, and I'm a web developer and software engineer out of Southern California.

If you're interested in hiring me, take a look at my portfolio and send me an email

JavaServer Pages - Hans Bergsten

From my Amazon review of an amazing book on a crappy technology.

This is one of the best technical books I have read. Bergsten wrote an in-depth, exhaustive tour of JavaServer Pages and the MANY related technologies, and it never once put me to sleep. It actually kept me up a few nights, but I'm a nerd like that.

For those of you new to web development, this book takes a slow and gentle approach to teaching you JSP. You will not only learn how to setup an environment and use JSP to build simple to moderately complex web applications; Bergsten filled his book with more best practices, pitfalls, supporting information, and general wisdom than I could have possibly hoped for. Taking his words to heart will set you well on your way to being a more solid, knowledgeable developer than most developers I've ever met.

For experienced developers, this book is a very fast read with a flowing style. Bergsten attacks every concept from a handful angles to ensure complete coverage of the subject matter, so if you understand his meaning quickly, you can generally fly right by. I enjoyed reading this book so much though that I rarely found myself flying over anything. The appendices are very useful as a reference, and if you're anything like myself, your copy will be filled with dog ears and highlighter.

In general, I don't hold high opinions for recent technical books. They are, in my experience, mostly superficial and lack any measure of depth. This book has set the bar as far as I'm concerned, being packed with content and wisdom without reading like an encyclopedia. Having said that, it's not without its faults.

To begin with, nobody should be fooled into thinking that using any of the JSP technology stack is NOT programming, and Bergsten tried to fool the reader far too many times. Using JSP, JSTL, and building tag libraries with either method is very much programming, and should be thought of as such. I think it does a disservice to reassure non-programmers that they don't have to learn Java or programming in general to work with JSP. That is how horrible code gets written, folks. Suffice it to say, if you're new to programming, accept that you're learning to program and absorb what you can!

In the later chapters, Bergsten's treatment of MVC was a bit off on a number of points. Views (the V in MVC [Model View Controller]) are defined as having direct access to Model objects, which creates a "template" with a lot more power and responsibility than the spirit of MVC denotes, if not eschewing the definition entirely. However, this idea of MVC fits very well with the power-hungry nature of JSP as a templating language, so I understand why it was stated that way. Just be aware, Bergsten / JSP's definition of MVC is not the same MVC you're likely to find in common MVC frameworks today. Also, the few MVC examples used bits of Struts, and I wished they wouldn't have. MVC is not that difficult; an extra page of code could have done a lot to illustrate and demystify the concept.

Another issue, albeit a small one, is that the editor appears to have taken a nap between pages 100 and 200. The code and spelling issues are slight, but there are a mess of them. (Cue Muphry's Law)

Finally, having said all that: I don't recommend this book. I have come to believe that JSP is a very confused technology, and should be avoided if you have a choice in the matter. Learn a nice framework like Rails, Cake, Django, CodeIgniter, Pylons, etc. instead, and save yourself a few hundred headaches and finger cramps. If you HAVE TO learn JSP as I did, then this is definitely a great book that will significantly help you on your way.

Even though I have such a strong distaste for JSP, I still give this book 5 stars. It was incredibly written and compiled. If I am ever in the position to write a tome on some technology, I will plan to model it after this book. It is that good (in my humble opinion).