pvillega’s posterous

pvillega’s posterous

Pere Villega  //  Born in Barcelona, living in Dublin, and tagged as geek since youth. Developer in the path to becoming a software architect. I swear this is not a proper blog :)

Feb 16 / 7:24am

Google Collections

Google Collections is a library that extends the capabilities of Java Collections. The library consists of:

  • New Collection types: Multimap, Multiset, BiMap and others
  • High-performance immutable implementations of the standard collection types, for example ImmutableSet
  • MapMaker, a builder for concurrent hash maps with many advanced features
  • Ordering, which can only be described as a "Comparator on steroids"
  • Iterators and Iterables utility classes: element-based equality, cycle, concat, partition, filter with predicate, transform with function, and much more
  • Lists, Sets and Maps utility classes: a plethora of convenient factory methods and much more
  • Forwarding collections, such as ForwardingSet, allowing you to customize collection behaviour without subclassing

The API is not frozen until 1.0 is released, so changes are common, but the library is safe to use as it's being actively tested on applications like Gmail or Adwords, which take advantage of the new collections. They are a nice alternative to Apache Collections, Java 1.5 compliant and with a focus on scalability and performance (as they are used on Google's massive applications!), so adding them to your code can only be beneficial. Check the Javadoc or a presentation they did on 2008 about the project for more details.

Loading mentions Retweet

Comments (0)

May 30 / 10:25pm

Google App Engine and Django

There is no doubt that Google App Engine is a marvellous platform. It eliminates the burden of thinking about scalability at an acceptable cost and provides interesting services like authentication using Google accounts. The downside is the coupling with Google's infrastructure, something not really appealing to a certain audience. But even so, it's still a good platform. As you may know Google App Engine can run applications built in Python. The problem is that the API it provides uses Django 0.9.6, not the latest release, and it won't (probably) be updated soon. Due to the limitations on number of files and size using the latest Django in your App box is not a trivial matter. Enter the world of App-engine-patch, a project built to remove the hardships of the task. As you can find in the official documentation of Google App or the Getting Started guide, building a new application with it is quite straightforward. A sample project is provided that can be used as a template for your webapp. Another benefit of this package is Ragendja, a series of snippets that show you how to code certain common tasks. Yes, that easy. You can do the test using the sample project, deploy it and verify everything works. And then add your own code. Enjoy! PS: can't add an example as my Google App Engine has been disabled, no idea why. And as my mobile was already used I can't create a new account. Wonderful :)
Loading mentions Retweet

Comments (0)