RSS Feed Subscribe to RSS Feed


Selenium talk at SF JUG

I attended another great San Francisco JUG meeting tonight, this time on How to use Selenium with Maven/Ant to automate testing of web apps.

The talk was given by Chris Bedford, from Build Lackey Labs – “Automating the Monkey Work Out and the Quality In!”. Overall, I thought this was a great talk by Chris. He clearly has a huge amount of experience creating automated tests and integrating them with build tools and he gave a well structured, interesting, well delivered presentation. I have posted a copy of Chris’s slides and I think the video will be posted on the SF JUG site at some point, but I have also posted my notes from the presentation below…
Read more

Tags: , , , , ,

JUG Meetup: Joshua Bloch (Effective Java)

I had the chance tonight to see Joshua Bloch speak at the Silicon Valley Web JUG meetup down at the Googleplex in Mountain View. I have read and blogged about his great book “Effective Java” – probably the single best book I have read on Java – so it was great to hear him in person. The talk covered a couple of examples from his Java Puzzlers book as well as a discussion on some of the items from the Effective Java book. As expected, he was a great presenter, both insightful and funny.

Tags: , ,

SF JUG: Android UIs

There was another great San Francisco JUG meeting tonight down at the Google offices. It was all very well organized as usual by Sasa. The speaker was Romain Guy from Google’s Android UI team. He gave his talk from Google IO: Turbo-charge your UI: How to Make your Android UI Fast and Efficient.

The presentation slides can be found here.

I thought Romain was an excellent presenter and did a top job of talking on his area of expertise: Android UI development. He covered the issues you need to be aware of when developing Android UIs if you want them to be performant, best practices and work-arounds for the gotchas, as well as useful tools that can be used for development. Personally, I would have benefited from more of a broad overview and introduction to Android, but that is more a reflection of my own lack of knowledge on Android! Maybe the newly created Android User Group will provide an ‘Intro To’ type talk at some point…

First, Romain covered the Andriod UI terminology (like Canvas, Drawable, Surfaces and Views) before covering the architecture.

The bulk of his talk covered how to make sure you UI runs fast, including:

  • Avoiding runtime scaling of background images
  • Avoiding invalidating (i.e. redrawing) the entire screen and instead only invalidate the small part of the screen that has actually changed.
  • Minimizing the number of views you use (ideally have <100, which seems pretty reasonable for a tiny phone screen!) and talked about some techniques to help with this including using ViewStubs and recycling views
  • Avoid allocating memory (apparently the Garbage Collector is slow and pretty much stops the world when it is running)
  • Use SoftReferences (objects that only have soft references to them will be kicked out of memory if the Garbage Collector needs more memory) and WeakReferences (which can help to avoid memory leaks) when possible

He also talked about some neat dev and debug tools including Allocation Tracker (which monitors objects being created, memory being allocated etc) and Hierarchy Viewer (which shows you all the devices/windows/views you have how long things are taking to render).
He also mentioned the Android emulator that can be used for testing your apps.

Some of the questions from the Q&A session included:

Q: Will Android support languages other than Java?
A: Romain mentioned that there is a version of Scala and python that work on Android, but currently all APIs are in Java.

Q: Does Flash work on Android?
A: Development is on-going and the Android team is working with Adobe.
(I found more on the web about this topic here:

Q: Can JavaFX be used on Android?
A: Code might be hard to run on the phone and may not be performant.

Q: Apparently, Sony Ericsson are also building an Android phone. How do you plan to avoid fragmentation as other companies start shipping Android phones?
A: CTS – Compatibility Test Suite
You cant ship a phone as ‘Android’ if it doesn’t pass the CTS.

Other links:

Tags: , , ,

Spring and EJB 3 Integration

I attended another excellent SF JUG meeting earlier this month. It was a double billing with Talip Ozturk talking about Hazelcast, an opensource clustering and data distribution platform, and Reza Rehman speaking about EJB3 and Spring Integration.

Reza is the author of EJB3 in Action and an accomplished speaker whom I had the chance to meet at The Server Side Symposium earlier this year, so I was particularly interested in his talk.

Reza gave some background on EJBs and how they have been completely reinvented as part of the latest (EJB3) release, including using 100% annotations (no xml) and making heavy use intelligent defaulting. He also talked about how Spring became popular as an alternative to the heavyweigth approach of the older EJB releases and has thrived through its focus on integration with standards like JPA, JMS, JDBC and JAX-WS.

He then went on to his main point, which was that EJB3 and Spring can now be viewed as complimentary, rather than competing, technologies and he went on to back this up by discussing the integration strategies that can be used, including

  • Embedding Spring inside a Java EE app server
  • Embedding an EJB3 embeddable container withing Tomcat with Spring
  • Enabling Spring @Autowired annotation in EJBs via Interceptors
  • Using EJB3 natively inside Spring using Spring Pitchfork

Reza finished by reiterating the benefits of using Spring and EJBs together to increase ease of coding and vendor neutrality.

Overall, I thought it was an insightful presentation from Reza. I had studied EJBs back in the v2 release as part of the my SCEA certification, and have used Spring in several projects, but this was the first time I had a chance to hear how they can be used together.

I have made Reza’s presentation notes available here, as well as his demo source code available here. You can also follow him on his web site and blog at:

Tags: , ,