vendredi 28 août 2009

Veille technologique semaine 35

Bonjour à tous,

pour le bulletin de la semaine 35, je vous propose les articles suivants :

  • La société Terracotta achète le produit EhCache : explication marketing et technique de ce rapprochement.
  • La sortie de eclipse galileo version 3.5 : où comment l'outil peut nous aider à coder plus rapidement ?
  • Un article théorique sur les transaction mémoire logiciels : Software Transactions Memory (STM) : c'est quoi et à quoi ça sert ? C'est en premier lieu un problème de productivité.
  • La technologie LINQ (Language Integrated Query : langage de requête intégré à C#) de Microsoft fait-elle du tort à Java ? Les closures qui étaient prévues pour la JDK 7 et qui sont reportées, oblige à faire des solutions comme celle proposé par le projet Quaere : faire des requêtes sur des collections indépendamment de la persistance, et donc sur une collection d'objets en mémoire. A intégrer rapidement dans nos systèmes. Google propose également un projet lambdaj pour généraliser l'exécution d'une opération sur une collection Java. C'est très élégant.
  • Un article sur les painters de JavaFX 1.2
  • Un autre article sur les mixin de JavaFX. JavaFX est une technologie pour réaliser des GUI qui propose également un langage (de script ?) pour programmer l'interaction.
  • Définition wikipedia des mixin.
  • Les fenêtres transparentes et non rectangulaires en Java.
  • Un petit exercice Java : avec l'exemple de code présenté, quel est le résultat du print ?

Bonne lecture.


Terracotta acquires Ehcache
We've been teasing the twitter-sphere for a few days now about some big Terracotta news and now I can finally talk about it.
Terracotta has entered into an agreement with Greg Luck, the copyright owner and primary developer on the Ehcache project. Ehcache is of course the most popular open source Java cache library. The agreement means that Greg Luck will join Terracotta, the Ehcache copyright will transfer from Greg to Terracotta, and Terracotta will take over hosting Ehcache.


Faster Java coding in Eclipse Galileo 3.5
Summary: Learn how to use the new toString() code-generation ability in Eclipse Galileo along with hashCode(), equals(), and setter/getter generation to cut down on the amount of work that goes into building the foundation of a Java class.


Software Transactional Memory
Software Transactional Memory (STM) is an emerging technology for protecting shared state in concurrent programs, based on automatic control of concurrent accesses. Its goal is to provide a more user-friendly and scalable alternative to locks by promoting the notion of transactions as a first-class citizen for component model.
This Software Transaction Memory target «state of the art» services and events oriented multi-tier components based software architecture with separation of concerns. One of the concerns is threading issues. STM propose an answer with a declarative transaction model for services and events.


Does .NET With LINQ Beat Java?
Framework's data query capabilities give it an edge, experts claim.
There is a question some developers are asking:
Has LINQ given Microsoft's latest .NET Framework an edge over Java?
Industry experts say "yes," but with some caveats.


Quaere
Quaere is an open source, extensible framework that adds a querying syntax reminiscent of SQL to Java applications. Quaere allows
you to filter, enumerate and create projections over a number of collections and other queryable resources using a common,
expressive syntax.

Iterable lowNumbers =

from("n").in(numbers).
where(lt("n",5).
select("n");


What is lambdaj for?
How many times have you read or written the same two or three lines of code that
frequently seem to go together, and even though they operate on different objects, feel like
the same thing? And how often these repetitions involve some sort of collections iteration
or more generically manipulation? These repetitions in the code is something that
developers eventually learn to filter out and ignore when reading code, once they figure
out where the interesting parts are placed. But even if the developers get used to it, it
slows them down. Code like that is clearly written for computers to execute, not for
developers to read.

List personInFamily =
asList(new Person("Domenico"),
new Person("Mario"),
new Person("Irma"));

forEach(personInFamily).setLastName("Fusco");


Introducing Custom Paints to JavaFX
In this article, I leverage a couple of undocumented capabilities to support custom paints. You
can use a custom paint to render the outline and fill for any shape (including text), and also to
render the fill for the stage's scene.

Specifically, the article introduces you to TexturePaint, BrownianPaint, and PlasmaPaint.
Each of these javafx.scene.paint.Paint subclasses relies on an undocumented Paint
function to make its underlying java.awt.Paint available to JavaFX. Furthermore, these
classes rely on an undocumented toolkit's subclass for filling a stage's scene.


Mixins in JavaFX 1.2 Technology
With the release of version 1.2 of JavaFX technology, developers have a new style of class inheritance: a mixin. A mixin is a type of class that can be inherited by a subclass, but it is not meant for instantiation. In this manner, mixins are similar to interfaces in the Java programming
language. However, the difference is that mixins may actually define method bodies and class variables in addition to constants and method signatures.


Mixin
From Wikipedia, the free encyclopedia
In object-oriented programming languages, a mixin is a class that provides a certain functionality to be inherited by a subclass, while not meant for instantiation (the generating of objects of that class). Inheriting from a mixin is not a form of specialization but is rather a means of collecting functionality. A class may inherit most or all of its functionality from one or more mixins through multiple inheritance.


How to Create Translucent and Shaped Windows
The article describes a feature that allows creating applications with translucent and shaped windows.
JavaFX Script is a capable new language that offers a set of APIs for creating RIAs. It also provides you with access to the rich features of the the standard Java language. One of the major features introduced in the Java SE 6u10 release is the ability to create translucent and shaped windows.

This includes:
making application windows translucent (tuning the general opacity of the window and using a per-pixel translucency effect) setting shapes on application windows This feature is available for objects of the java.awt.Window class and its descendants, for example javax.swing.JFrame, javax.swing.JFDialog, java.awt.Frame.


Translucent and Shaped Windows in JDK7
Here is another sneak peek at a page that was just completed for the JDK7 update of the Swing tutorial.
How to Create Translucent and Shaped Windows:
As of the Java SE 6 update 10 (6u10) release, you can add translucent and shaped windows to your Swing applications.
This functionality, part of the public AWT package in JDK 7.


The Ultimate Java Puzzler
Why is this particular one the ultimate? Two reasons:
It's at the very core of the Java language, not some obscure piece of API.
It melted my brain when I hit it.

public class /*p1.*/C1 {
/*default*/ int m() {return 1;}
}

public class /*p1.*/C2 extends C1 {
/*default*/ int m() {return 2;}
}

public class /*p2.*/C3 extends p1.C2 {
/*default*/ int m() {return 3;}
}

public class /*p1.*/Main {
public static void main(String[] args) {
C1 c = new p2.C3();
System.out.println(c.m());
}
}

Classes C1, C2 and Main are in package p1. C3 is in package p2.

What is the output of Main.main()?


Aucun commentaire: