Introduction
It doesnt take a rocket scientist to notice the recent serious decline in the publishing of computer books, to say nothing of computer magazines. I enjoy reading books about software and visit the nearby Barnes and Noble at least twice a month. During the last three years the number of bookcases dedicated to computer books has shrunk substantially.
Today newly baked programmers prefer Google to books. They dont realize that Google is OK when you know what you are looking for, while books can give you a new perspective on how other people develop software.
During a recent visit to a major bookstore I noticed a series of books on digital photography. Im one of the legions of people who are thinking of replacing a point-and-shoot camera with a digital SLR such as a Nikon D90. There were about 10 different thin books on that shelf, and I picked the one on the D90. It was about 65 pages long. I quickly skimmed the pages, learning that compared to a pocket camera one of the main advantages of D-SLR is the ability it gives you to change lenses. On top of that, these cameras use a small mirror that enables you to see exactly what youre shooting, plus you can take more shots per second. Not much information for a $25 book.
The secret was that the book came with a DVD, which contained 80 minutes of instructional videos! The printed part of the book and the DVD complemented each other. The wannabe photographers dont want to read books.
The new generation of computer programmers doesnt want to read either. They want to watch videos. They can be YouTube videos on how to do something, or screencasts. The material has to be prepared for easy consumption.
But because not everything in the world of software can be videotaped, future computer books will still include several hundred pages some code samples and short instructions will go there.
Remember those 1,500-page Bibles on software? It seems that their days are over. These days a 500-page computer book can be considered thick. Five years from now a 200-page software book will become the standard. But books will come with DVDs on which the authors walk you through all the examples mentioned on paper.
I like this new 24-Hour Trainer series from Wiley Publishing. This is not to say that you can learn the software covered in these books within 24 hours. Its about having a trainer thats with you 24 hours a day. Each book in this series is a set of short chapters containing a minimum of theory but accompanied by an instructional DVD with screencasts recorded by the author.
Who This Book Is For
This book is for anyone who wants to learn how to program with the Java language. No previous programming experience is expected.
This tutorial can be used by Java developers looking for simple working examples that use certain features of the language.
Accomplished Java developers can also use this book as a refresher while preparing for a technical job interview.
This tutorial can be used by university students who are interested in learning from a practitioner who has spent 20-plus years developing enterprise software for a living.
College professors should appreciate the fact that each lesson ends with a Try It section a prepared home assignment for each lesson.
What This Book Covers
To be called a Java developer, a person has to know not only the core syntax of this programming language, but also the set of server-side technologies called Java EE (Enterprise Edition). This book covers both. At the time of this writing, the latest version of core Java is 6, and the latest release of Java EE is also 6.
Java is a general-purpose language you can program applets running under control of a Web browser, stand-alone applications that run independently on the users computer, and applications that connect to remote servers. Java is used for writing applications running in mobile devices, cars, or in household appliances.
The first 25 lessons of this book cover a program that can run on users computers. The next 12 are about Java EE technologies used for Java programs that run on servers. The final lesson is dedicated to the process of getting prepared for Java technical job interviews.
This book doesnt cover Java programming for mobile devices.
How This Book Is Structured
This book is a tutorial. Each lesson walks you through how to use certain elements and techniques of the Java language or gives an introduction to the server-side Java EE technologies. The Try It sections serve as continuations of materials explained in the lessons. The screencasts included on the DVD usually illustrate how the author compiles and runs code samples included in the lessons. You can choose to read the lesson and then try to run the example on your own, or you can read the lesson, watch the video, and then try to run the examples. After this part is done, start working on the assignments from the Try It section.
This book contains 38 lessons, which are not formally broken into sections. The first 25 lessons cover Java SE topics. Lessons 26 through 34 cover Java EE topics. Lessons 35 and 36 introduce you to popular third-party frameworks Spring and Hibernate. Lesson 37 demonstrates an application that utilizes several Java EE technologies. And, finally, Lesson 38 helps you to get prepared for the technical interview when you decide to look for a Java-related job.
The lessons are short and to the point. The goal is to explain the material quickly so you can start applying it hands-on as soon as possible. Some readers may feel that more explanation of certain subjects are required, and they are encouraged to do some extra research; there are lots and lots of online materials available on any Java-related subject. But the coverage of the material given in this book definitely helps in understanding what to focus on and what to look for.
What You Need to Use This Book
To do the examples in this book, you do not need to purchase any softwarefreely available software is used here. Installing Java Development Kit and Eclipse IDE is explained in the first two lessons, and this is all you need for Lessons 1 through 25. In Lesson 26, you install Java Application Server GlassFish, which is used for explanation of the materials in Lessons 26 through 34. If you decide to learn third-party frameworks Spring and Hibernate, you need to download and configure their software libraries as explained in Lessons 34 and 35. Whenever you need to download certain software, detailed instructions are given in the book and/or in the screencasts included on the DVD.
From the hardware perspective, you can use either PC running Windows or one of the Apple computers running Mac OS. Linux fans are also able to run all book samples. You should have at least 1GB of RAM on your computer to run all code examples from this book. But adding more memory can make your Java compiler and Eclipse IDE work faster.
How to Read This Book
This book is a tutorial, and I assume in each lesson that the reader is already familiar with the materials from those that came before it. If you are new to Java, I highly recommend that you read this book sequentially.
Each lesson except the last one has a corresponding video screencast on the accompanying DVD, in which I either work on the assignment from the Try It section of the lesson or simply install and configure some software. Ideally, you should try to do all the assignments from the Try It sections on your own, and use the videos only if you get stuck or dont understand the instructions. But if you prefer to learn by following the instructor, just watch the video first and then try to repeat the same actions on your own. Whatever works is fine.