Posts tagged java

Book Review: Refactoring HTML

Despite years of progress by web standards advocates, and a significant improvement in the quality of the HTML on the web, many of us still end up grappling with outmoded, broken HTML on a regular basis. When confronted with a large site filled with broken pages it can be hard to know where to start. Elliotte Rusty Harold’s Refactoring HTML offers a step by step recipe book for migrating such sites to clean, semantic code.

Harold’s is a well known name in the XML world, and that background shows through in how he approaches the book. While a general audience will probably find useful content, the reader needs to be prepared for a series of command-line and Java-based examples. Tools like tidy are featured prominently, as is the use of regular expressions to seek out broken code to fix and, in the music-to-my-ears category, automated testing.

If you’re equipped to do so, following these steps will lead to much cleaner, more manageable sites, but I found myself wondering how many of those comfortable with command line tools and regular expressions are in the market for a book like this.

In general I suspect the key audience for this will be IT departments inside large organisations tasked with refreshing or extending an intranet. For those developers, who maybe don’t spend much of their time working with HTML and like the idea of using scripting tools similar to those in their regular workflow, this book’s worth a look. If you’re already familiar with current trends in web development, then there are probably other ways of picking up on the scattering of techniques that might be new to you.

Disclaimer: I was sent a copy of this book for review by the publisher. You can find it at amazon US, amazon UK and all sorts of other places.

Book Review: Practical JRuby on Rails Web 2.0 Projects

I am not in this book’s target audience. Whereas the book is aimed at experienced java developers who are just getting started with rails and want to take advantage of JRuby, I’ve rarely touched Java but have lots of ruby and rails experience and am interested in JRuby mainly to see where I might be able to take advantage of java libraries, or ship my ruby apps into new contexts. In that respect, the book was helpful but there’s probably space for a companion volume for people like me.

The book takes a measured pace, introducing Rails early on and then building in different components from the Java world as it works through four different projects. Use of JDBC within a rails app, calling ruby code from Java, deployment strategies, packaging a Rails app as a .jar that can be dropped into an application server, and making use of java for interfacing with SOAP web services are all covered.

Readers will probably need to spend some time experimenting with each feature to really get comfortable with them, but the book works well to get you started and point in the right direction. The introduction to Ruby and Rails is a case in point, as Ola dives right in to his examples after a brief lead-in. That may work well for experienced developers who will enjoy exploring the accompanying code, but it is worth being aware of.

It did feel like there were some missed opportunities later in the book, particularly in the final project, to introduce more of Rails’ “RESTful” features since that example really invited that style of design, and it would have been interesting to have some discussion of the pros and cons of treating the libraries built to interface with external services as models within a rails app, making the interface more transparent.

I’m also not quite sure where the “Web 2.0 Projects” line in the title comes from. The final project interfaces with amazon web services, which I suppose might get thrown onto the “web 2.0″ bandwagon, but don’t go into the book expecting a series of stereotypical “web 2.0″ projects. It’s an introduction to JRuby on Rails for Java developers, whatever approach to the web they may be taking.

JRuby is a really exciting technology that promises to help developers take another step towards picking technology based on their projects, not just the platforms their organisations may have standardised on over the past decades. If you’re a java developer wanting to learn how to make use of JRuby and looking for some help to get up and running, this book is likely to give you just that.

Disclaimer: I was sent a copy of this book for review by the publisher. You can find it at apress, amazon US, amazon UK and all sorts of other places.