Devoxx - Day 2

The second day at Devoxx continues with a university day, with much introductory talks.
BTW, catering was fine today, better than two years ago. I think the is worth mentioning, since this was one of the weak points last time we visited the Devoxx. Ah yes, Wifi is ok, too. Now for the talks ;-)

# Diving into Android (Romain Guy, Chet Haase)

After the various kinds of layouts available in Android are explained
shortly, Romain explained ways how to debug layout issues. A tool
Hierarchy Viewer looks to be very powerful for inspecting your view
hierarchy giving you tons of informatsions. It can even export the
complete UI as a Photoshop file. Within a well crafted demo, Romain
implemented a new Layout, FlowLayout.

After the break, Chet talked about filthy rich client concepts applied
to Android in a basic form. The basic elements of Android graphics are
explained: Paint, Canvas, Bitmap. Chet walked through the detailed
process of creating a simple picture viewer with effects like
reflections and gradients. Nice hack: Quick blur by scaling down an
image to half its size and scale it up again to its full size (used
for the reflection part). Finally, Chet gave some hints for
optimizations for a mobile device:

  • Pre-scaling
  • Caching complex rendering
  • Creating bitmaps in the device’s color depth
  • Avoiding garbage when possible
  • Making the background view opaque
  • Avoid re-creating objects
  • Don’t over invalidate
  • Avoid costly operations on the UI thread
  • Reduce layout nesting
  • Avoid costly rendering during animations
  • Use layoutopt for a static analysis of yout layout files,
    traceview for profiling

Conclusion: It always a pleasure to listen the graphics twins ;-). It
was an entertaining and well done presentation. Android appears to
have a very nice programming model, which because it’s Java has a
lower entry barrier than Objective C development for the iPhone,
especially when you come from a Java background.

Cassandra

Cassandra is another NoSQL project, open sourced in 2008 by Facebook to Apache.It is based on ideas from Google’s BigTable and Amazons Dynamo.

  • Scalable, largest installation includes 100+ nodes
  • Reliable
    • Replication that works
    • Multi-DataCenter support
    • No SPOF
    • Tuneable consistency levels: one, quorum, all
      Choose availability vs. consistency (and latency)
  • Analytics in the same system as OLTP (with integrated Hadoop support)

Like most NoSQL stores, Cassandra does not support ACID Transactions and has
limited support for OLTP ad-hoc queries (which you also loose when sharding relational DBs).

The basic data model is a multi dimensional hash, with keyspaces, column families and columns.
Example: Keyspace ‘MyApp’, Column Family ‘Users’ with columns for ‘Name’ etc.

A noteworthy example application is Twissandra.

Ajax Library Smack down: Prototype vs. jQuery (Nathaniel Schutta)

Nathaniel started with a first statement (with which IMO every
JavaScrip or Webapp talk should start): Drop IE 6 support, even
Microsoft dropped it for SharePoint for 2010. I’m get feeling better.

Protoype and jQuery have both a very similar feature set, a very good
documentation, an active community and widely used. But they have a
complete different philosophy. Prototype is heavily influenced by Ruby
and jQuery was a anti-reaction on this. They influenced and improved
each other. A sum up of Cons and Pros of both libs are summarized as:

Prototype’s Pros:

  • Adds useful function to standard elements
  • Widgets and effects via script.aculo.us
  • Ruby flavored JavaScript
  • Widely used

jQuery’s Pros:

  • Focused on HTML elements
  • Doesn’t pollute the global namespace
  • Extensive plugins
  • Widely uses

Minor Prototype’s Cons:

  • Where’s the minified version ?
  • Performance is not always a priority
  • Pollutes the global namespace

Minor jQuery’s Cons:

  • Parameter ordering in APIs not always intuitive
  • Plugins required for a variety of functionality
  • Some functions reassign this

Some detailed comparison of common use cases implemented with both
libraries followed.

In the second part, Nathaniel dived deeper into jQuery. Unfortunately,
quite some basic stuff were repeated over and over. Nothing real
new in this second part, this talk could have gone away with one hour
as well (instead of 2,5).

Conclusion: In-depth comparison of jQuery and Prototype features on a
very basic level, but at the end they do things quite similar so that
a choice between both lastly is simply a matter of taste. You can’t go
wrong by selecting one over the other. No particular new stuff and
very introductory, but a good recapitulation of basic Prototype and
jQuery features, unfortunately quite lengthy.

Author: Admin
Categories: devoxx, java, development