RSS Feed Subscribe to RSS Feed

 

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: http://gizmodo.com/5300800/flash-for-android-webos-landing-in-october)

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:
http://d.andriod.com
source.android.com
android.git.kernel.org
code.google.com/p/apps-for-andriod
http://android-developers.blogspot.com/
http://forum.xda-developers.com/

Tags: , , ,

CodeCamp 2009: An Introduction to Spring

As I posted about earlier, the Silicon Valley Code Camp 2009 is coming up and this year, I am planning on presenting a session on the Spring framework.

You can find my session details here: An Introduction to Spring.

Tags: ,

Silicon Valley Code Camp 2009

The planning for this year’s Silicon Valley Code Camp seems to be well under way. After attending last year’s event, I’m looking forward to it already. There are some great sessions lined up already, including

  • Beginning iPhone Development
  • Creating Java Applications with Google App Engine
  • Intro to Cloud Computing
  • Asynchronous Web Services

As the site says: Attendance is free, but space is limited so you need to Register.

As well as attending this year, I am also hoping to present a session on ‘An Introduction to Spring’. I will post more details when I have submitted my proposal…

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: www.rahmannet.net.

Tags: , ,

TheServerSide Java Symposium – Day 2

Day 2 at TSS Java Symposium.

The highlights of the second day at TSSJS2009 were a couple of interesting talks from Rod Johnson (Mr Spring) and a talk on Groovy from Scott Davis (Groovy.com).

I have included links to some of my (limited) notes below, which includes links to the actual presentation slides (PDFs) where available.

Keynote: How Spring Fits into the Java Landscape – Rod Johnson

Spring for the advanced developer – Rod Johnson

The Amazing Grrovy Weight Loss Plan – Scott Davis

Tags: , , ,

TheServerSide Java Symposium – Day 1

Today I’m at the first day of the TheServerSide Java Symposium in Las Vegas. There are about 400 attendees and a dozen or so companies exhibiting. I will try to post some notes about the talks as the day goes on…

Tags: , , , ,

The Server Side Symposium

Have just signed up for this year’s TSS Symposium. Couldn’t make last year’s in Prague, so looking forward to this one a lot. And it’s in Vegas so will have to brush up on my Blackjack and Poker skills again before then 🙂

Tags: ,

Silicon Valley Code Camp Notes

I am at the Silicon Valley Code Camp at the moment.

I will try to post some notes on the various talks I attend below…

Day 1:

Day 2:

Tags: , , , , , ,

Silicon Valley Code Camp

I have signed up for this code camp next weekend…

http://www.siliconvalley-codecamp.com/

There are some interesting sessions on, amongst other things, Groovy, Grails, Java, Web Services, Testing, Agile development and more. And it’s all free and ran by volunteers…

I will post some feedback when the weekend is over.

Tags: