vendredi 10 octobre 2008

Veille technologique semaine 41

Je vous propose, pour le bulletin de cette semaine 41, les articles suivants :
  • sortie de la version 2.0 de mono qui est l'implémentation open source de la plate-forme DotNet. Cette version complète l'implémentation du langage C# 3.0 avec, en particulier, le langage de requête LINQ.

  • mise à jour du langage Groovy avec un complément qui est à remarquer : des concepts de design patterns sont intégré au langage? Groovy est un langage à typage dynamique, dans la même catégorie de Ruby, Python, etc qui est standard de la plate-forme Java (JSR 241). Ce langage propose une syntaxe proche de celle de Java. La plate-forme d'exécution est la JVM standard ce qui permet aux objets groovy d'interropérer avec les objets Java et inversement. En fait, la JVM ne sait pas que c'est des objets Groovy ou Java, ce sont des objets JVM. La conséquence est de cette unification est de pouvoir bénéficier dans un langage de tout ce qui a été développé dans un autre : la persistance, la réplication, les IHM, etc... Groovy a intégré les méta-données avec la version 1.3 avec la syntaxe des annotation Java : @. Les design patterns proposés sont : le singleton (@Singleton), la non mutabilité (@Immutable), la délégation (@Delegate), l'instanciation paresseuse (@Lazy). Le mixin (ajout de méthodes à une classe à l'exécution) est proposé avec @Mixin. A voir dans les exemples de code.

  • Dans cette série sur l'interopérabilité entre objets issus de langage différents dans le même runtime, l'implémentation JRuby du langage Ruby sur la JVM permet d'utiliser la librairie d'interface graphique Swing en code Ruby. IBM propose un article au sujet de Ruby sur le poste dureautique.

  • Un article très pointu sur les algorithmes de garbage collector, qui ont encore des possibilités de progrès et qui peuvent donner des meilleurs comportement pour l'application et terme de déterminisme ou de performance. C'est un sujet d'étude qui occupe encore les laboratoires de SUN, IBM et BEA (Oracle) et qui est basé sur des statistiques du comportement des applications objets.

  • Enfin un article au sujet de l'outil VisualVM, qui permet de visualiser l'exécution de la JVM sous forme graphique. C'est en fait le plug-in "profiler" de NetBeans qui a été rendu autonome. Cet outil est en standard dans le JDK 6 depuis l'update 7. Il propose par défaut : affichage de l'occupation mémoire, charge CPU par thread, navigation dans les objets (le tas), le nombre d'objets et la taille totale par classe, mesure de temps d'exécution des méthodes... C'est un outil incontournable pour tout développement sur la JVM. J'ai à disposition la documentation complète sous forme d'un PDF.

Bonne lecture.


Mono 2.0 Released
Mono 2.0 is a portable and open source implementation of the .NET framework for Unix, Windows, MacOS and other operating systems.

Mono 2.0 has been released. Though still behind Microsoft's .NET in some areas, in others it has leaped ahead. For those seeking to write crossplatform applications, the first list of features in the release notes is the Microsoft-compatible APIs.

  • ADO.NET 2.0 API for accessing databases.
  • ASP.NET 2.0 API for developing Web-based applications.
  • Windows.Forms 2.0 API to create desktop applications.
  • System.XML 2.0: An API to manipulate XML documents.
  • System.Core: Provides support for the Language Integrated Query (LINQ).
  • System.Xml.Linq: Provides a LINQ provider for XML.
  • System.Drawing 2.0 API: A portable graphics rendering API.

For cross-platform graphics, Mono also offers Mono.Cairo, a binding to the Cairo Graphics library.
"Currently supported output targets include the X Window System, Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL (through glitz), XCB, BeOS, OS/2, and DirectFB."


Mono 2.0 Release Notes

Mono 2.0 is a major milestone in the Mono project, and it supports the following features:

Groovy 1.5.7 and 1.6-beta2 released
@Singleton to transform a class into a singleton
@Immutable to forbid changes to an instance once it's been created
@Delegate transparently implement the delegation pattern
@Lazy for lazily initializing properties
@Category / @Mixin helps mixin category methods at compile-time
@Newify allows to omit using the 'new' keyword for creating instances, simply doing Integer(5) will create an instance, and also gives you the ability to use a Ruby-esque syntax with Integer.new(5)


Cross-platform development with JRuby and Swing
Ruby for the desktop
In addition to building Web and console applications with Ruby, you can write complex GUI desktop applications that run unmodified on multiple platforms. Thanks to JRuby, a robust alternative to the traditional C implementation of Ruby, Ruby GUI toolkits can use UI tools available to the Java™ platform. This article introduces Monkeybars, a library that uses JRuby and Swing for building applications, and takes you through an example application.

Ruby is currently best known as a programming language for building Web applications, primarily with the Ruby on Rails framework. However, the language is more than capable for developing graphical desktop applications as well. In this article, you'll learn more about using Ruby for the desktop, and you'll work through a detailed example that uses Monkeybars - an open source library based on Swing and JRuby - to create a GUI desktop application.


Ghost in the Java virtual machine
In the decades of research of garbage collection in academia, researchers
made an interesting observation about memory allocation. This came to be
formulated in the weak generational hypothesis. It simply states that most
objects die young. In other words, the vast majority of memory is only needed
for a very short amount of time. For object oriented languages, including Java,
the correlation is even stronger; as much as 98% of object life cycles are short
lived.


VisualVM: Profiling Applications
VisualVM presents data for local and remote applications in a tab specific for that application. You can have multiple application tabs open. Each application tab contains sub-tabs that display different types of information about the application.