May’s Packt Publishing Prize Draw – Java 7 Features

9 May 5627EN_Java SE 7 New Features Cookbook_cov

Do You Know Java Seven?

This month we are offering just one book in the competition because every Java developer needs to read it, or one like it.

The book is “Java 7 – New Features Cookbook” by the father and daughter team Richard and Jennifer Reese.

Java 7 arrived in July last year after nearly half a decade of waiting.  It brings useful new features that we all need to master if we are to stay relevant.

The New Features Cookbook provides solid, practical examples to help you get to grips with these new features.  It helps you to gain a proper understanding of what they are for and how they are used.

If you want to have a chance of winning one of this months books then please sign up on the Meetup page.  At the end of March the lucky winner will get a physical copy with an ebook for the runner up.

Let’s cover a few examples of the new features and how the cookbook introduces them.

Concurrent Processing

The free lunch ended years ago, and no developer can afford to ignore concurrent programming.  To make our life easier Java 7 introduces the join/fork framework and the Phaser synchronization barrier.

The join/fork framework allows us to break a problem down into smaller parts, work on them in parallel and then bring it all back together at the end.   The Reese’s introduce us to the framework using an example that calculates the sum of square both iteratively and using fork/join and compares how long the two approaches.  The fork/join isn’t necessarily faster.

The Phaser is useful when you have threads working together in cyclical phases.  It waits for all the threads in one phase to complete before starting the next.  This time a mock game engine is created with each player represented by a task.   The Phaser is used to co-ordinate their activities, synchronising when a set of tasks will start.

Automated Resource Management

We have always needed to be careful to close our resources or suffer the consequences.  Try with resources makes safely working with resource much easier.  The resources being managed automatically are declared as we enter the try block and released as we exit.  The book demonstrates their use by copying a file using buffered streams.  Suppressed exceptions and structuring issues are also explained.

User Interface Improvements

Swing has gained a new few tricks.  If your client is filthy rich you can deck it out with new bling like windows that are translucent and irregularly shaped.  Some simple examples show translucent windows with gradients and an octagonal shape.  Not every operating system can support it and the examples show how to check the graphics environment for support.

Aprils Packt Publishing Prize Draw

4 Apr

Androids and Architects

This month we’re going to look at two very different areas.  First of all we have two beginners guides for Android.  They may be beginners guides, but they are covering advanced topics that can make your Android apps look fine.  Then we have two books for the service oriented architect.  If you want to become and architect then this is a popular architectural style that you need to be familiar with.  The final two books are for those with an interest in architecture that want to stay practical.  They cover two core element’s of JBoss’ SOA Suite: the Enterprise Service Bus and Business Rules Engine.

If you want to have a chance of winning one of this months books then please sign up on the Meetup page.  At the end of March the lucky winner will get a physical copy with an ebook for the runner up.

Making Android Applications Special

The Play market is full of applications that all look like each other.  To stand out from the crowd you want to make your applications look special.

Android 3.0 Animations: Beginner’s Guide 
by Alex Shaw

From simple stop frame animation and fades to 3D motion and form this guide will show you how to create, test and use stunning animations.

Android NDK Beginner’s Guide
by Sylvain Ratabouil

The Android Native Development Kit allows you to create C + C++ embedded applications for the Android platform that can be integrated with Java.  This allows native APIs to be ported and used.  The book introduces both OpenGL ES and OpenSL ES.

Service Oriented Architecture

The SOA Manifesto sets out what it means to do Service Oriented Architecture.  It means focusing on business value,  strategic goals intrinsic interoperability, shared services, flexibility and evolutionary refinement.

Do more with SOA Integration: Best of Packt
by various authors

Integration is a key part of SOA, and this book integrates the best of eight existing books.  It takes a broad sweep that covers topics as diverse as Web Services, BPEL and Governance.

Service Oriented Architecture: An Integration Blueprint
by Guido Schmutz, Peter Welkenbach and Daniel Liebhart

Based on a foundation of core principles and base technologies this book provides a blueprint for SOA.  Each layer and component is described in detail and visualisations help you to see the big picture.

JBoss SOA

If you are already implementing SOA using the JBoss stack you will want to learn how to better leverage the power tools at your disposal.

JBoss ESB Beginner’s Guide 

by Len DiMaggio, Kevin Conner, Magesh Kumar B and Tom Cunningham

The Enterprise Service Bus is central to SOA Integraion, and your SOA implementation journey should begin here.  With practical examples, step by step instructions and plenty of screenshots this book will help you take those difficult first steps.

Drools Developer’s Cookbook 
by Lucas Amador

Drools is just so powerful that it can be hard to get to grips with.  If you’re already using Drools then this book will take you forward through the advanced topics such as complex event processing, Camel integration and JMX monitoring.

March’s Packt Publishing Prize Draw

6 Mar

Time to Tool Up

If you want to got more done then you need to look at your tools!  Can you do something better by introducing the right tool?  Are you using the tools you have to your best advantage?

Getting tools is one thing, using them right is something else entirely.  This months we’re offering books about tools that you might find useful.

If you want to have a chance of winning one of this months books then please sign up on the Meetup page.  At the end of March the lucky winner will get a physical copy with an ebook for the runner up.

JIRA

 

We have finally matured, with restrictive methodologies behind us and the path to further agility ahead.  For every project and team there is now a separate methodology.  As Atlassian put it, “your development process, your rules.”

JIRA 4 Essentials

Be careful that JIRA’s default settings don’t become your methodology by default.  If your not adapting JIRA to your team and making it part of your everyday processes, with the screens and workflows set up to make it easy to do the right thing, then you’re not benefitting from the JIRA’s power.  Patrick Li’s book will show you how to do it.

JIRA Development Cookbook

If you have already mastered the essentials of Jira then you can push ahead further.  Jobin Kuruvilla’s book will show you how to develop plug ins and crate new gadgets as well as take advantage of the JIRA Query Language.  Along the way he will introduce you to JIRA’s architecture so that you have a better idea of how it is implemented.

WordPress

If you’re in a start up rather than a big enterprise then you’ll be much more concerned with marketing than business processes.  WordPress is an open source tool that can help you get word of your product out there and appearing in search results.

WordPress 3 Complete

WordPress provides a complete content management system that you can use to build more than just a blog.  April Hodge Silver’s book will show how to get the code downloaded and installed on your own servers.  It offers advice on creating and managing your content as well as developing your own themes.

WordPress 3 Cookbook

Getting the content up on the web is only the beginning.  You then have to build a community, integrate sales and marketing and manage accessibility and security.  Ric Shreves’ book will show you how to achieve these step by step.

Liferay

Back in the Enterprise, if you want to publish information and build a community within your organisation you might want to consider Liferay portal.

Liferay Beginer’s Guide

If you have no previious experience of building portals then you should begin with this book.  The authors will guide you through the planning, installing and building needed to get your site up.  Then it will offer guidance for publishing your content and  building your communities.

Liferay User Interface Development

Just because it’s on an intranet doesn’t mean it has to be ugly.  Let the authors show you how to make your portals good looking and user friendly.  Get to grips with themes, taglibs and the fancy new Alloy UI.

Programming Concurrency on the JVM

15 Feb

“Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors” by Venkat Subramaniam

Are you an experienced Java programmer? Do you want to explore your options of managing and making use of concurrency on the JVM using either Java or other JVM languages such as  Scala, Clojure, Groovy and JRuby? Or maybe you’ve heard about the Software Transactional Memory (STM) or actor-based model and are wondering if there is a way you could make use of them while still writing for the JVM? If so, this book is for you.

The book is the fourth one by the same author featured by the Pragmatic Bookshelf. As it was the case for all books under this label that I’ve read, this book is pleasing to read. 280 pages make it not very long and a good part of it is code. The book is available both as a paper book and as an eBook, in three formats: epub, PDF and mobi/Kindle.

The author uses simple but nicely chosen problems as a basis for the discussion of different approaches to concurrent programming. The source code for examples used in the book is available from the publisher’s site. Unfortunately, these are not runnable programs. For instance, in java files, there are packages declared, but there is no corresponding folder structure. So, in order to run the code, you will need to move some bits around. This is an inconvenience that could have been easily avoided.

The book is well structured and besides the usual introduction and summary parts, consists of four parts: “Strategies for Concurrency”, “Modern Java/JDK Concurrency”, “Software Transactional Memory” and “Actor-Based Concurrency”. I found the “Recap” paragraph at the end of every chapter very useful. It provides nice summary and will be a useful reference when reaching for the book next time.

The book starts with highlighting the problems that concurrency is trying to solve and points that all the benefits are not for free – “The Power and Perils of Concurrency”. What follows is a discussion of possible ways of turning your sequential program into concurrent one with consideration of whether the application is IO or computation intensive and how it affects the number of threads needed. One of the first questions you will need to answer when writing a concurrent application is how to deal with state. The author quickly explores three available options: shared mutability, isolated mutability and pure immutability. These first chapters nicely prepare the ground for further parts.

In the “Modern Java/JDK Concurrency” part, the author looks at the new threading APIs introduced in Java 5 and later. A message for a reader is to forget about old threading APIs and benefit from:

  • new and better ways of managing a pool of threads and scheduling tasks for concurrent execution,
  • fine-grained synchronization using locks,
  • new concurrent data structures

The section on Java 7 Fork-Join API is a definite sign that the book is up to date.

As a nice bonus, at the end of this part, the author presents a small program with a few flaws and walks through the process of eliminating them.

As the author suggests himself, the book just gives an overview of solutions available in Java and the JDK. If you need one that goes more into details you should grab “Java Concurrency in Practice” by Brian Goetz.

Almost half of the book is taken by parts on Software Transactional Memory and Actors. These parts have similar structure. There is one chapter devoted for introduction and discussion of the concept, with examples in one or two of the languages on the JVM. The chapter following shows how to implement a solution in different JVM languages, often by using a library discussed previously. The author diligently highlights potential problems when using libraries across JVM languages and shows how to work around them. I personally liked the few pages of theory before digging in to the code examples.

STM is explained in the context of Clojure which has support for it built into the core language. We are shown how STM enables lock-free programming and eliminates the need for synchronization. The author discusses suitability of STM for different problems and shows with an example that it is not meant to be used in applications that have a lot of write collisions. The book also covers an alternative implementation of STM in Java – Multiverse and support for it in Akka.

In the part on actor-based concurrency, the author uses the Java and Scala APIs of Akka to walk us through different types of actors, ways of exchanging messages between them and coordinating them. Since the examples in Java and Scala are not that different, I think it would be better if only one language was used in the introduction chapter and the examples in the other language were in the chapter that follows. Having examples in both slightly distracts. As it was the case for STM, the author concludes the chapter with a discussion of the limitations of the actor model.

The second chapter in this part contains examples in JRuby, as well as in Groovy using GPars.

Summary

Although not my daily bread, I write some concurrent code every now and then. I reached for this book mainly to learn about STM and actors and see when and how I could benefit from these approaches to concurrency. And I was not disappointed. The author did very good job in explaining them and provided a comprehensive overview of available implementations.

Regarding the title, I would say that the word “mastering” may be a little overstatement. I think the book is an excellent starting point and once you choose an approach for you problem there is further reading to be done.

The book provides nice coverage of options available when programming concurrent applications on the JVM, and although the implementation might not be written in the same language you are working with, they are still very viable options.

I really enjoyed reading the book.

About the Reviewer

Tomasz Wróbel is a developer who spends most of his work day building web applications in Java.  In his free time he explores functional programming with Scala and plays a little bit with Android.

February’s Packt Publishing Prize Draw

7 Feb

Get out of your comfort zone

It’s too easy to get stuck in a rut. You find something you’re good at and stick with it. You keep doing it again and again until you have it perfected. Then you discover that it’s all become a little stale. The world is moving on and you haven’t been keeping up.

Now that 2012 is well under way perhaps it’s time to try something new. This months selection of books present some skills that you may have neglected or did’t realise you needed.

If you want a chance to win your choice of book then go and RSVP to this months Prize Draw Meetup. The winner will get to choose a print edition and the runner up selects an ebook.

Build a User Interface

When was the last time you built a GUI? If, like me, you spend most of your time in the middleware worrying about APIs you might find things have changed. User Interfaces are no longer bound to the desktop with windows, icons, mice and pointers. They’ve gone mobile with touch interfaces.

Google Inventor for Powerful Android Apps

Google App Inventor is still unpacking boxes at its new MIT home. While your waiting you can see how a user interface can be built by pushing together blocks and not having to write any code. Take a look at the video to see what the future of development might be like.

Learning Vladdin

Vaadin is a web framework build on GWT with a solid rich server side. If you’re a back end person who finds Javascript running on the client a little distasteful then it might be to your liking. Again, there’s a video to watch. That’s how it is with these UI guys.

Manage a Cluster

Do you give much thought to what happens to your code once you’ve built and deployed it? You should, because with ever expanding datacentre clusters supporting the cloud everything is changing.

Puppet 2.7 Cookbook

How many servers do you have? How do you manage them? Do you still start and stop them individually? Using Puppet you can deploy thousands of Tomcat servers. You may not have that many yet, but it’s probably just be a matter of time.

CF Engine 3: Beginners Guide

If you’re new to configuration management then perhaps you’d prefer to work through this beginners guide for CF Engine, the original that inspired them all.

Integrate

Are you still building systems one line at a time? Sure, it’s great fun but it takes such a long time. it’s just so unfashionable these days. The cool kids are mashing it up while the grown ups in suites are busy leveraging their existing assets.

Pentaho Data Integration 4 Cookbook

Ther’s only one thing multiplying faster than the servers in your data centre and that’s the data they hold. Pentaho‘s Kettle provides an open source engine for the extraction, transformation and loading of data.  You’re next data migration could be so much easier.

Google Apps: Master Integration and Customization

What do you see when looking at the cloud? Six legged pigs or the starship enterprise? Not any more. The cloud is now full of app servers, spreadsheets, federated identities and provisioning APIs. They’re just floating about waiting for you to put them together.

January’s Packt Publishing Prize Draw

16 Jan

Looking back at 2011

During 2011 Packt publishing gave 22 books away to LJC winners. Those lucky winners signed up through the LJC Meetup Site and their names were picked.
Each month a first prize winner received a physical copy and the runner up received an e-book.

If you want to be one of the 2012 winners you should go and RSVP to this months Prize Draw Meetup straight away.

The books choosen give an idea of the topics our members are interested in. It is a list dominated by Google’s technologies.

We’re offering these popular choices again, along with a couple of testing books.

Web Applications with Java and Google

The most populate topic for the books was Google’s Java based web application stack with their Web Toolkit and App Engine. Nearly 20% of the prizes claimed were for this topic.

Google Web Toolkit 2 Application Development Cookbook

Claimed in June and September this is part of Packt’s cookbook series. It provides step by step instructions for tasks that include the following:

  • Create impressive, complex browser-based web applications with GWT 2.
  • Learn the most effective ways to create reports with parameters, variables, and subreports using iReport.
  • Create Swing-like web-based GUIs using the Ext GWT class library.
  • Develop applications using browser quirks, Javascript,HTML scriplets from scratch.

Google App Engine Java and GWT Application Development

Claimed in March and September and providing everything needed to get a dynamic web application up and running in the cloud, including:

  • Comprehensive coverage of building scalable, modular, and maintainable applications with GWT and GAE using Java.
  • Leverage the Google App Engine services and enhance your app functionality and performance.
  • Integrate your application with Google Accounts, Facebook, and Twitter.
  • Safely deploy, monitor, and maintain your GAE applications.

Mobile Development with Android

Java programmers find the Android platform to be quite familiar and there’s a lot of demand for mobile developers right now. It shouldn’t be surprising, then, that Android books have proven popular with winners, making up almost 15% of the claims.

Android User Interface Development: Beginner’s Guide

Claimed in October and July this book introduces the fundamentals of good user interface design from a developer’s point of view. It goes beyond just the coding and teaches the beginner the following:

  • Leverage the Android platform’s flexibility and power to design impactful user-interfaces.
  • Build compelling, user-friendly applications that will look great on any Android device.
  • Make your application stand out from the rest with styles and themes.

Android 3.0 Application Development Cookbook

Claimed in October this is another in Packt’s cookbook series. It provides over 70 working recipes and has the following features:

  • Written for Android 3.0 but also applicable to lower versions.
  • Quickly develop applications that take advantage of the very latest mobile technologies, including web apps, sensors, and touch screens.

Test Driving the Web

In the long tail of interest it’s good to see testing being taken seriously. jUnit just isn’t enough when it’s time to test the user’s web experience. Both of these tools emulate the browser in different ways.

Selenium 1.0 Testing Tools: Beginner’s Guide

“Selenium automates browsers. That’s it. What you do with that power is entirely up to you.” That’s what they tell you over at Selenium HQ.

Our January Runner Up must have needed a little more guidance than because they claimed this book. It’s detailed worked examples will have helped them use the power in the following ways:

  • Save your valuable time by using Selenium to record, tweak and replay your test scripts.
  • Get rid of any bugs deteriorating the quality of your web applications.
  • Take your web applications one step closer to perfection using Selenium tests.

Apache JMeter

It doesn’t matter how pretty or feature rich your web pages are if the user is still waiting for them to load. Apache JMeter helps avoid making user’s wait by simulating different load scenarios for the application.

It was claimed in August and the winner will have learnt to do the following:

  • Test your website and measure its performance
  • Master the JMeter environment and learn all its features
  • Build test plan for measuring the performance

December’s Packt Publishing Prize Draw

12 Dec

The LJC Open Conference

Last month’s LJC Open Conference provided us all with an opportunity to discover some new and interesting ideas. This months selection provides some examples of books that may help you to follow up on those ideas.

If you’d like the chance to win one of the following books then RSVP to this month’s Prize Draw Meetup.

High Performance Java

Using a low level knowledge and careful tuning to achieve high performance in Java was a recurring theme in across the Open Conference programme. High performance is possible in Java, but it requires a detailed knowledge of the implementation and careful performance tuning.

Oracle JRockit: The Definitive Guide

This definitive guide to Oracle’s JRockit JVM provides details of the performance tuning and inside knowledge needed to achieve high performance. Even if you are not working on the JRockit JVM, it provides a valuable insight into how virtual machines work.

Beginning Apache JMeter

The performance testing of web application can be automated using Apache JMeter. This book shows how to get the framework up an running. More importantly, it discusses how to plan automated tests and analyse the results to provide insight into application performance, bottle necks, and load bearing capabilities

Standards and Frameworks

It’s the rich ecosystem of standards and frameworks that keeps Java ahead. Java FX and OSGi were two standards discussed during the open conference.

Java FX

The launch of Java FX 2.0 provides new opportunities for Java based Rich Internet Applications. This book provides a practical introduction to the previous version of the platform. If you’re looking for a productive approach to GUI creation it’s a good place to start.

OSGi and Apache Felix 3.0 Beginner’s Guide

It can be hard to get to grips with OSGi and modularity. The concepts can seem to high level, making it hard to understand their practical applicaton. The 30 minute guide and workshop provided at the Open Conference a useful starting point. This practical introduction using the Apache Felix Framework provides a hands on tutorial introducing the concepts during the creation of a realistic project.

Lightning Talks

The 5 minutes lightening talks provided an opportunity for Open Conference attendees to consider something new and different.

Node Web Development

We were urged to give Node.js a try. This practical introduction to the server side javascript engine provide a good introduction.

Groovy for Domain-Specific Languages

The potential of Groovy for creating DSLs was demonstrated by the GPars framework. It provides a DSL for concurrent programming on for multicore hardware. This book shows how to build your own DSLs using Groovy.

Follow

Get every new post delivered to your Inbox.