YSlow v0.9.3 Firebug plugin available

A few weeks back we’ve already posted about YSlow, a free plugin from Yahoo that works on top of Firebug that additionally computes a performance grade report for your website.

A new version has now been released: YSlow v0.9.3, and one of it’s notable new features is that it works now on Firefox 3 beta3 and later. For those that didn’t try Firefox 3 yet, we can already say it improves rendering speed and uses a lot less memory then Firefox 2. Unfortunately not all the plugins have been made compatible yet with Firefox 3, so you may want to wait a bit before removing Firefox 2.

Javapolis 2007: Next gen RIA site Parleys.com V2 Beta is Available

RIA site Parleys.com V2 BetaOne of the coolest Flex based RIA applications showcased during the Javapolis 2007 convention was the beta of the new Parleys.com website. Parleys hosts all videos and presentations from Javapolis and other BeJUG organized events and is great source of information for Java developers to stay current.

Now version 2 is available for testing at http://www.parleys.com/display/PARLEYS/Parleys.com+V2+BETA+Program

Be sure to check out the online version and the desktop version (showcasing Adobe AIR technology). As a JSF/Richfaces/AJAX developer I’m impressed by the speed & look ‘n feel of the site. Having to implement the below requirements is certainly not easy either with the traditional set of Java web tools.

  • Full screen viewing of talks
  • Add comments and tags in the presentation time line
  • Bookmark talks and slides and forward them to a friend
  • Change slide transitions

Javapolis 2007: Bamboo, continuous integration the easy way

On Javapolis 2007 Atlassian presented two new products aimed at helping agile management projects ‘work’ in the real world.

First in the line is Bamboo, their continuous integration tool. Next we’ll talk about Crucible.

The guy from Atlassian Bamboo began his talk by telling the audience that “Continuous integration is a process, not a tool’. That’s certainly true, you should first think about your process before starting to setup tooling. That said, there are a lot of tools with an inadequate feature set or skyhigh prices, ultimately leading to a good process which is not followed in practice due to timeconstraints.

Bamboo tries to fit in a lot of functionality while still being relatively inexpensive.

Features include:

Build telemetry

Bamboo dashboard

Build telemetry lets you interpret statistics and trends of your builds. It also allows you to drill down into a specific build or pull up and look at overview information. Having this empirical data at your fingertips supports change as you can make informed choices.

Interesting statistics include:

  • build time
  • % of successfull builds
  • number of test failures
  • average time to fix a failure
  • allows comments on a failure
  • graph, allows to see trending and comparision between projects

Test telemetry

Test telemetry lets you interpret statistics and trends of your Unit Tests.

Handy features include:

  •  drill down to the tests that have failed
  • see if this test has failed in the past?
  • if true see how it was fixed the last time
  • a Top 10 of failing tests
  • historical summary of your tests can help identifying problem areas

Besides those two types of statistics, Bamboo also features a plugin framework which you can use to for example integrate Clover (coverage tool), PMD and FindBugs.

Speedup your ajax site with YSlow Firebug plugin v0.9 Release

As a webdeveloper you’re probably already using the fantastic Firefox plugin Firebug. Features like inline editing of HTML, CSS, DOM inspection and HTTP requests viewer makes your developer life infinitely easier.

YSlow, a free plugin from Yahoo that works on top of Firebug additionally computes a performance grade report for your website.

Some of the rules it uses are:

  1. Make Fewer HTTP Requests
  2. Use a Content Delivery Network
  3. Add an Expires Header
  4. Gzip Components
  5. Put CSS at the Top
  6. Move Scripts to the Bottom
  7. Avoid CSS Expressions
  8. Make JavaScript and CSS External
  9. Reduce DNS Lookups
  10. Minify JavaScript
  11. Avoid Redirects
  12. Remove Duplicate Scripts
  13. Configure ETags

Implementing these performance improvements suggestions may speed-up your site greatly as according to Yahoo’s research almost 80% of the time is spent on the client side. So optimizing your Java server side code is not the only thing you should be focusing on 🙂

YSlow 0.9 improves the plugin for Web2.0 applications as it now supports AJAX requests, frames and iframes. There are several other new features and bug fixes described in the release notes including highlighting HTTP 404s, better detection of CSS expressions and JavaScript minification, and searching within the YSlow panel.

Seam in Action Javapolis University Day 1

Seam is the newest JSF based framework in town and this presentation by Peter Hilton and Pete Muir explained the shortcomings of existing JSF frameworks and ways to overcome these problems with Seam.

Seam promises tight integration with other frameworks/specs including:

  • EJB
  • Hibernate
  • jBPM (java business process management)
  • Richfaces
  • Drools (rules engine)

It also offers Eclipse IDE support with the JBoss tools plugin.

Continue reading Seam in Action Javapolis University Day 1

Java Generics and Collections in Action

On Monday, Maurice Naftalin, co-author of the Book Java Generics and Collections presented a talk about two new features in Java5/6:

  • Generics
  • (Concurrent) Collections

Generics

Maurice started by stating the advantages of using generics. These include the following:

  • cleaner code (eg. the enhanced for-loop; no casts)
  • more errors can be detected at compile time (which would otherwise only be noticed at run time)

Maurice then talked about the ‘by erasure’ implementation of generics that makes it possible to gradually ‘generify’ legacy libraries and your client code.

(Concurrent) Collections

Collections in Java (since v1.2) are by default not thread safe, which means that two threads can simultanuously read/write to a Collection, possiby leaving the Collection in an inconsistent state.

Thread safe Collections are also available, but note that this is not the same as concurrent safe access. Eg. when iterating (which is obviously is not an atomic operation) over a thread safe collection you’ll receive a ConcurrentModificationException when the underlying collection is modified. (a so-called fail-fast iterator)

The java.util.concurrent package introduce weakly consistent iterators. Weakly consistent iterators may or may not reflect insertions made during iteration, but they will definitely reflect updates or removals for keys that have not yet been reached by the iterator, and will not return any value more than once.

Here is a summarized list of the non thread safe and new java.util.concurrent Collection interfaces and when to use them. (Remember to choose your collection based on functional behaviour, performance characteristics and concurrency policies.)

  • Queues
    • Not threadsafe with FIFO ordering
      • ArrayDeque
      • PriorityQueue
    • Threadsafe (with weakly consistent iterator)
      • PriorityBlockingQueue
      • DelayQueue
      • ConcurrentLinkedQueue: best non blocking threadsafe queue
  • Lists
    • Threadsafe (with weakly consistent iterator)
      • CopyWriteArrayList: good when you have more reads then writes
    • Non thread safe
      • ArrayList: best general purpose list
      • LinkedList: only ok qua performance when using a ListIterator (which provides remove, add and iteration operations) – never do access by index => slow!!
  • Sets
    • Non thread safe
      • HashSet
      • LinkedHashSet: this set keeps O(1) when the set is almost full
      • EnumSet: optimized for using Enums objects
    • Threadsafe (with weakly consistent iterator)
      • CopyInWriteArrayList: good when you have more reads then writes

Javapolis 2007 University Day 1

This week I’m attending Javapolis 2007, the biggest European Java event, which is organized in Antwerp, Belgium (my homecountry :-)).

Today I went to the following talks:

  • Java Generics and Collections in Action
  • Seam in Action
  • Making sense of your builds with Bamboo Continuous integration server
  • Addictive code reviews with Crucible

Watch out for a detailed report on each of these talks in future blog posts!

Welcome to Java Blog – your source for Java tips and tricks!

Hi there, welcome to my new Java Blog!

I’m Wim Bervoets and I have been a Java developper since 1998 when I started using it on some projects at University. With this blog I hope to give you an overview of all the interesting things happening in the Java world and stuff I have learned over the years.

These include topics ranging from

  • backend java
  • web development (including JSF frameworks, AJAX frameworks, CSS, Javascript, …)
  • tooling (Eclipse, Netbeans)

till codequality tools like Findbugs.

Next week you can expect some coverage from the Javapolis event!