May 31, 2005

I think I am going to throw up if another person I know comes over to me and tells me how much he or she loves their new PowerBook. I have nothing against Apple hardware and I know they make some really great hardware as well as software. (I happen to love my iPod) This is not because I am a Windows/Linux guy – this is because a lot of people I know are getting on the Apple bandwagon following the herd mentality. I have heard so many comments from people who say that they got a Mac because ‘insert-your-own-book-author-pseudo-thought-leader’ has a Mac. It’s great to explore new things, gadgets, etc. and discover ways to improve your computing environment. I use Windows as my primary desktop with Linux acting as my WebLogic, Tomcat, CVS, and MySQL server. I am very happy with that setup and I know I want to get a Powerbook someday and check it out. I am sure I will be very happy with it but my concerns revolve around all the money I’ve spent on software for my Windows box. Some of the things that I use on a daily basis like IntelliJ IDEA are a non-issue as IDEA runs great on a Mac. And I know I would find comparable replacements for a lot of things I use on a daily basis but I’ve got my environment setup to the point where everything just works. I have nightly automated backups of my desktop, I have Remote desktop working so that I can connect to my home machine from anywhere in the world and many other processes where I am not sure if spending more time and money relearning or repurchasing software will be worth my while. But I am completely open to the possibility and hope to find a nice little PowerBook under the Christmas tree.

Before this starts sounding like a rant about Mac, let me clarify. This is NOT a rant about Macs rather it is rant about people that will blindly follow whatever this other ‘cool’ person is doing without giving it any thought. I don’t doubt that Mac’s are a great choice for majority of the people using them. In fact, I have friends that have been Mac users’ for as long as I can remember. Mykl, the Webmaster at Marquette University has always been a Mac user – ever before OS X. I’ve known Mykl for almost 12 years now and he has never used a Mac because he thought it was cool. In fact, I harassed him relentlessly about his choice at every opportunity. Another friend of mine, Pete has also been a Mac user for as long as I’ve known him. He even lost out on a job at my last place of work because the hiring manager thought he was ‘too passionate’ about his requirement of a Mac. And there are many more like Mykl and Pete. They use Mac’s for the right reason – They don’t use it because they think it makes them look cool by association.

The lack of critical thinking goes beyond hardware choice. I cannot tell you how many emails I get from people I know that start out like, “I’m trying to do this in Hibernate and I can’t get it to work”. Ok – Let’s put the cart before the horse. This is another classic scenario where everyone’s blogging about Hibernate and so I have to use it. People are selecting solutions first and them trying to fit their problem domain around it. In this scenario, the person was trying to leverage a ton of existing stored procedures from an old application that they had acquired. This was before Hibernate 3.x where you couldn’t call stored procedures. You would think that before you select a solution and start development, you would spend a few minutes checking out the documentation website to see if the solution can actually do what is required.

Again, this is NOT a Hibernate rant. The same applies to Spring, AJAX or anything else perceived to be ‘cool’ or new. Now I know the desire to learn something new and there is nothing wrong with that. In fact, I typically will spend countless number of hours and work and home trying out new frameworks, solutions, etc to see if they can offer me an edge. Are these new ‘things’ solving an existing problem in a creative way that is going to simplify my life? And so I play a lot, but I don’t do it in applications that I am getting paid to write. After ‘playing’ with something, I will try and adopt it for my day job if and if only if the value it offers far exceeds the learning curve for the other developers.

The problem is that too many people use all of the latest open-source framework(s) or commercial software without realizing the pitfalls. So when the project fails, who gets the blame? Not the person who chose an inappropriate solution – it’s always the framework or product. Hibernate sucks and so my project failed or Struts sucks, as my application takes too long to load. You get the idea.

What I would like to see is for people to question things a little more. Don’t just assume that because it comes from Apache, it has to be good. People need to start thinking critically, independently and start taking a pragmatic approach to things. Take time and discover for yourself why something is good because you’ll discover something that people pan and ignore may be the best thing since sliced bread in your environment.

Advertisements

Spring in Action

May 30, 2005

Spring in ActionSpring in Action by Craig Walls, Ryan Breidenbach
Paperback: 472 pages
Publisher: Manning Publications (February 11, 2005)
ISBN: 1932394354

To me, the ultimate compliment I can offer a book or an author is that I wish I had written this book. Spring in Action is just an incredibly well written book that does a great job of giving its reader a great introduction to Spring and all the facets that make it such a great framework and container. I wish I had written this book or I wish I could write this well.

The authors have really done a great job in explaining every little detail about Spring where you really get the feeling that you really know Spring after reading this book. Unlike code-specific books, this book doesn’t overwhelm you with code. Don’t get me wrong – there is more that enough code in the book and a snippet of code typically follows after detailed explanation of a particular concept. Spring Live on the other hand takes a code driven approach where you learn Spring by actually writing code. I also happen to love Spring Live but I prefer Spring in Action as I want to really understand what is going on under the covers and all the concepts rather than just learning how to write Spring code. I’m vastly oversimplifying Spring Live as it is also a pretty nice book, but I hope you get the analogy I am trying to make here.

Spring in Action starts off with an introduction to Spring, beans and the bean factory. Having used Spring for more than a year, I assumed I really knew all the ins and outs of wiring beans and I learned quite a lot in the first 3 chapters. I really love the writing style and the humor sprinkled in throughout the book makes this a really easy read. I’ve already re-read this book several times and I just re-read it again while flying from Miami to Chicago, thanks to the 2 hour early arrival. The writing just flows and the explanations are clear as the book moves from AOP to Data Access, Transactions.

I also wanted to make an explicit comment about the chapter on Spring’s AOP framework. This chapter does a great job in explaining Spring’s AOP framework and where appropriate, points out differences with AspectJ and other AOP frameworks. Having used AspectJ and AspectWerz before, I found it very easy to pick up the AOP framework in Spring. Besides, when you can use The Simpsons in a programming exercise, it can’t be that bad, right?

If you are looking for a great Spring book, do yourself a favor and pick up Spring in Action. You will not be disappointed. There are quite a few Spring titles out there and there are good and bad among them. There is a typical rush to the market from the book publishers and there are a lot of average-to-poor books out there. If you really want to learn and use Spring, pick up this book now.

Spring, Spring in action

Going back to JavaOne

May 26, 2005

It’s been 4-year since my last annual pilgrimage to JavaOne. The last JavaOne I attended was in 2001 and I was very disappointed with the lack of technical content at the conference. The technical sessions had been turned into marketing fluff sessions with sales droids doing ‘technical’ presentation. After that, I skipped JavaOne and ended up attending BEA’s eWorld and No-Fluff-Just-Stuff sessions to get the really technical stuff I am looking for.

So it’s been 4-years and I figure it’s time to check out JavaOne again and see if things have gotten any better. I’m really excited with the breath of topics in the early session guide – Just hoping they live up to expectations. Besides, it’s really hard to complain when you get to spend a week in San Francisco .-)

Advanced SiteMesh

May 24, 2005

Advanced SiteMesh by Sunil Patil — Developing a web application with a consistent look and feel isn’t easy, especially if parts of the site use different underlying technologies. But as Sunil Patil shows, SiteMesh offers a solution, with servlet filters called “decorators” that apply your appearance late in the game.

Write a Web service in 15 lines of code with JAX-RPC 2.0 Early Access: A key aim of JAX-RPC 2.0 (JSR 224) is to simplify Java Web service development. Currently in early draft review stage in the JCP, an early access JAX-RPC 2.0 reference implementation is available from the Java Web services community site on java.net. This article provides a brief preview of writing a JAX-RPC 2.0-based Web service with that reference implementation, and highlights how Java annotations simplify Web service development

http://www.artima.com/lejava/articles/threeminutesP.html

Parallel task execution in J2EE using the Work Manager specification by Dmitri Maximovich — As it stands, the J2EE specification provides no easy way to initiate the execution of parallel tasks. JSR 237, the Work Manager for Application Servers specification, changes this. In this article, Dmitri Maximovich introduces the specification, and provides an example of how to use it. His code runs on the current beta of WebLogic Server 9.0.

Setting up a Secure Subversion Server by Dru Lavigne — You’ve finally persuaded your users to stop emailing documents back and forth when they need to collaborate, but you’ve had to recover three overridden versions on the shared network drive this week. Dru Lavigne has an answer; this month’s FreeBSD Basics column demonstrates how to allow users to collaborate on documents with safe and secure version control provided by Subversion.

Wire Hibernate Transactions in Spring by Binildas Christudas — The proper handling of transactions across multiple data stores, supporting multiple application flows, is the kind of heavy lifting J2EE servers were built for. But what if you’re using the lighter-weight Spring framework? Binildas C. A. shows how you can wire Spring and Hibernate together to achieve the transaction support you desire.

Five Things I Love About Spring by Bruce A. Tate — For hardcore enterprise development, Bruce Tate turns to Spring, the topic of his latest collaboration, Spring: A Developer’s Notebook. In this article, Bruce describes five reasons why he is hooked on Spring.