Adverts

Archives By Subject

Calendar

Mon Tue Wed Thu Fri Sat Sun
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Search

RSS


Tags

adobe apache book review cfimage coldfusion google google chrome hosting iis internet explorer java javascript jquery lucene photoshop regex ses urls software review sql injection svn trac

Subscribe

Enter your email address to subscribe to this blog.

Book Review: Java Phrasebook

I've recently been using a Java for a project, which I hope to blog about later. I haven't done any Java development since version 1.2 back in 2002, so I had a a bit of catching up to do. I also needed to update my library with some Java material.

Normally I would have gone for O'Reilly's Java Cookbook, as I'm already an experienced programmer. Although my Java experience is limited, I know the basics. Unfortunately, the current Cookbook only covers Java 1.5, so instead I bought the Java Phrasebook by Tim Fisher.

I've already bought the Javascript Phrasebook in this series, which I found to be very good, so hoped this would be much of the same. I haven't used the Javascript Phrasebook in anger yet though, and sometimes that's the real test of a book.

Like the JS Phrasebook, the Java Phrasebook cuts through all the waffle and gets straight to the point. The chapters cover all the major aspects of the language, and the phrases cover the everyday scenarios. Each phrase starts with a code example, followed up by a discussion.

In practice, I found this to work very well when they had a phrase that matched my task. The problems came when there wasn't a phrase.

As an example, I needed to copy files in the program I was writing. Much to my suprise, Java doesn't handle this out of the box. It has classes to handle, creating, deleting and moving files - but not copying them. Likewise, the Java Phrasebook has phrases for creating, deleting and moving files, but not copying. I ended up having to Google for an example, which makes the book a bit redundant.

Another example was when dealing with XML files. The Java Phrasebook covers the very basics, but it would be useful to have examples on tasks such as converting an XML node to a String.

In hindsight, I might have been better buying the Java Cookbook for this project, but that's not to say the Java Phrasebook is a bad purchase. It's very good at what it does, it just doesn't do everything I needed.

Going off topic now, it was interesting to use Java in a bit of depth, and compare it to languages I'm more experienced in - CFML and Actionscript. I suppose the main lesson I learned was how spoilt I am using CFML. It comes with so much functionality out of the box, that I can accomplish most tasks in just a few lines of code. In contrast, in Java I found myself, having to write lots of code and classes to accomplish the same task. I also spent ages going through the Java docs to figure out what was going on, although that is probably because I'm not so familiar with the language. You can go into further detail with Java, and fine-tweak the way a task is performed, but if I ever needed to do this in ColdFusion, I can easily drop in the Java code.

I do think the Java experience has made me a better programmer though. It forces you to develop in a far more Object-Orientated manner and think about code re-use. I'm sure I'll see the benefit of that in future CFML and Actionscript projects.

Author Timothy R. Fisher
Publisher Sams (November 2006)
ISBN 978-0672329074
Rating 7/10

Related Blog Entries

Comments
Adobe Certified Professional - Macromedia ColdFusion MX 7 Advanced Developer Powered By ColdFusion 8 aggregated by mxna aggregated by coldfusionBloggers