MikaŽl Barbero (OBEO )
Making with Eclipse · Standard
Wednesday, 11:10, 20 minutes | Ballroom D
Google Guava (a superset as Google Collections) is a very active Java library that Google used internally for years. Since then, it has been open sourced. One part of this library is a natural extension of the Java Collections Framework. It brings some new types of collections, immutable implementations and above all a functionnal approach to collections handling. With this approach, it is possible to handle large data sets in a memory and CPU efficient way.
When you browse Eclipse Modeling Framework (EMF) models in pure Java, you are rapidly faced to the issue of handling such large data sets by building a LOT of intermediate lists and by looping on these lists VERY often. It is a pain in the neck to repetitively write this kind of code. Moreover, it may also lead to unnecessary memory usage and/or performance drop. It can be solved by using Google Guava to browse EMF models. Despite of the fact it is possible to directly use Guava with EMF, it can be cumbersome. EMFPath is a very small Java library hosted on EclipseLabs that bridges the gap between EMF and Guava libraries and make it fun and easy to write beautiful code.
This talk will scratch the surface of Google Guava libraries, focusing on Function and Predicate interfaces and Iterables utility class. Then it will show how EMFPath lets you conveniently and efficiently write complex browsing in your EMF models.
Mikaël Barbero is working as software engineer and consultant at Obeo in western France. He is working on model-driven software migration and modernization. He is contributing to several open source projects (Acceleo, EMF Editing Framework, ATL, EMFCompare...) about modeling and is also leading the EMFPath project.