vendredi 28 novembre 2008

Veille technologique semaine 48

Pour le bulletin de cette semaine 48, je vous propose les sujets suivants :
  • un article de wikipédia au sujet des transactions en mémoire. Ces transactions permettent de prendre en compte la préoccupation de la gestion du multi-thread d'une manière fiable. Ce concept provient des systèmes de gestion de base de données, avec les propriétés ACID bien définies. La version transaction mémoire correspond à : ACID = Atomique (c'est entièrement fait ou pas du tout), Cohérence (si l'application est cohérente, la transaction le sera), Isolation (chaque thread travail comme si il est tout seul) et Durable (en mémoire, visible des autres threads). Cette gestion des transactions doit être prise en charge par l'infrastructure et non pas par le développeur. Sans les transactions, c'est le développeur qui doit écrire (directement ou indirectement) le code de gestion des verrous avec tous les risques que cela comporte (accès concurrent non thread safe, dead lock, gestion imbriqué compliqué, ...). Il est donc temps d'intégrer les transactions mémoire dans nos infrastructures.
  • un article sur OpenCL qui est un standard géré par le groupe Khronos, et qui propose une API qui permet d'utiliser la puissance de calcul des GPU (Graphic Processeur Unit).
  • l'article suivant est la version pour utiliser les GPU par NVidia : CUDA.
  • un problème récurrent dans les IHM (en dehors de l'ergonomie) relatif à la perception des couleurs en fonction des couleurs voisines. Le cerveau humain fait des corrections qui mettent en évidence ou qui atténue la perception relative de ces couleurs. Il faut donc en tenir compte pour construire des IHM. Il est parfois nécessaire d'ajuster les couleurs avec l'image finale de l'IHM. Il faut avoir un processus de composition visuel : WYSIWYG (What You See Is What You Get).
  • la gestion des fenêtres semi transparentes et non rectangulaires avec JavaFX.
  • la distribution d'objet Ruby avec le produit Terracotta : c'est encore un exemple de solution qui montre l'intérêt d'avoir des objets Java et Ruby (JRuby) qui partagent le même runtime : ils peuvent tous être répliqués par Terracotta.
  • la liste des modifications du langage Java proposée pour le JDK 7. Cette liste n'est toujours pas validé officiellement.
  • le Beans Binding for Java (JSR 295) du JDK 7 permet de faire le lien entre un JavaBean et un objet Swing. Il ne permet pas de faire le lien avec un objet Java tout simple (POJO : Plain Ordinary Java Object) et un objet Swing.
Bonne lecture.


Software transactional memory
In computer science, software transactional memory (STM) is a concurrency control mechanism analogous to database transactions for controlling access to shared memory in concurrent computing. It functions as an alternative to lock-based synchronization. A transaction in this context is a piece of code that executes a series of reads and writes to shared memory. These reads and writes logically occur at a single instant in time : intermediate states are not visible to other (successful) transactions.


OpenCL - The open standard for parallel programming of heterogeneous systems
OpenCL (Open Computing Language) is the first open, royalty-free standard for general-purpose parallel programming of heterogeneous systems. OpenCL provides a uniform programming environment for software developers to write efficient, portable code for high-performance compute servers, desktop computer systems and handheld devices using a diverse mix of multi-core CPUs, GPUs, Cell-type architectures and other parallel processors such as DSPs.
OpenCL supports a wide range of applications, from embedded and consumer software to HPC solutions, through a low-level, high-performance, portable abstraction. By creating an efficient, close-to-the-metal programming interface, OpenCL will form the foundation layer of a parallel computing ecosystem of platform-independent tools, middleware and applications.
OpenCL is being created by the Khronos Group with the participation of many industry-leading companies and institutions including 3DLABS, Activision Blizzard, AMD, Apple, ARM, Barco, Broadcom, Codeplay, Electronic Arts, Ericsson, Freescale, HI, IBM, Intel, Imagination Technologies, Kestrel Institute, Motorola, Movidia, Nokia, NVIDIA, QNX, RapidMind, Samsung, Seaweed, Takumi, Texas Instruments and Umeå University.


CUDA, QU'EST-CE QUE C'EST ?
La technologie NVIDIA CUDA est le seul environnement en langage C permettant aux programmeurs et aux développeurs de développer un logiciel et de résoudre des problèmes de calcul complexes en un rien de temps en accédant à la puissance multi-coeur de traitement parallèle des GPU. Avec les millions de GPU déjà déployés et disposant de la fonction CUDA, des milliers de programmeurs de logiciels utilisent les outils de développement CUDA en libre accès pour accélérer les applications (encodage vidéo et audio, forages pétroliers et gaziers, design de produits, imagerie médicale et recherche scientifique).


Colors and the UI
As the name suggests, GUIs (Graphical User Interfaces) present their features and functions visually. The human-computer interaction is heavily based on seeing things, looking for things and interacting with graphical UI elements. Color is a main characteristic of any visual scene, not only on computer screens, but in any situation where we see something. Because most of what we see and interact with in our everyday life is colored (as opposed to shades of white-gray-black), we are very familiar with colors – maybe so much that we don't think about them a lot. On the other hand, it does bother us when we need to read a dark-gray label on a black button. So colors have the potential to boost or wreck the user experience. This article will introduce the concept of user experience and highlight some aspects of colors and color perception together with recommendations for UI design.



Clustered JRuby - Transparent Clustering of JRuby with Terracotta
Similar projects have been attempted in the past. Gemstone also experimented with supporting JRuby on top of their Java based product and there was a previous attempt of JRuby on Terracotta, although that hasn't been updated in some time.


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
Contents - Introduction
  • Feature Overview
  • Translucent Windows
  • Shaped Windows
  • API Overview
  • Using the Feature
  • Determining the Support for a Desired Effect
  • Making a Window Translucent
  • Setting the Opacity Level of a Window
  • Enabling Per-Pixel Translucency
  • Setting the Opacity Level of a Window
  • Translucent and Shaped Windows Demo
  • Summary


Les nouveautés du langage dans Java 7
  • Support des propriétés JavaBean
  • Support des opérateurs numérique pour le type BigDecimal
  • Comparaison pour les énumérations
  • Invocation chainée
  • Méthodes d'extension
  • Clause catch améliorée
  • Instruction invokedynamic et langages dynamiques
  • Support natif XML
  • Comparaisons de chaines de caractères dans la clause switch
  • Tiered Compilation
  • Garbage collector G1
  • Types et génériques
  • Closures et blocs de gestion automatique des ressources


Beans Binding: A Java Data-Binding Solution with a Serious Problem
Data binding simplifies how you sync a data object's properties with their visual representations, and Beans Binding for Java (JSR 295) aims to deliver a default data-binding specification for the Java platform. Find out how to use Beans Binding and work around its onerous overhead.
In the past couple of years, data binding has emerged as an important concept for GUI development in Java. Its main objective is to simplify the task of syncing a data object's properties with their visual representations on the screen (text fields, tables, combo boxes, etc). JSR 295 (Beans Binding for Java, or simply Beans Binding) aims to deliver a default data-binding specification for the Java platform.

Binding to POJOs (Where Beans Binding Fails)
At this point you likely are ready to jump into Beans Binding. Alas, this library contains a major hidden flaw that makes it extremely cumbersome to use. The flaw is not the fault of Beans Binding itself, but rather the lack of required binding plumbing in the Java language. To be two-way bindable, each object on both the source and target sides must be a full JavaBean with manually-coded property change support—in other words, a simple POJO like this is not fully bindable out of the box.

vendredi 21 novembre 2008

Veille technologique semaine 46 et 47

Pour le bulletin de la semaine 46 et 47, je vous propose les sujets suivants :
  • suite aux Spring Day à la Défense, Spring Source a dévoilé la roadmap du framework Spring,
  • l'IDE NetBeans est sorti en version 6.5 : avec des compléments à tout les étages, en particulier, le composeur d'IHM Matisse, et l'inclusion du look and feel Nimbus (premier look entièrement vectoriel, y compris les icons, donc indépendant de la résolution de l'écran),
  • le projet mono (implémentation open source de la plate-forme DotNet), propose des extensions à la plate-forme qui utilisent les instructions vectorielles natives des processeurs : les SIMD (Single Instruction Multiple Data). Cela permet d'avoir des performances très importante pour des calculs avec un rapport jusqu'à 10,
  • le standard JEE 6 (Java Enterprise Edition version 6) est en phase finale de spécification : ce document fait un résumé des technologies présentent dans cette version 6,
  • deux articles sur les différents langages de programmations qui fonctionnent dans une JVM : on parle de "Multi-Lingual Virtual Machine". Avec JRuby, Groovy et autre Scala, la JVM accueille de plus en plus de langages différents avec interropérabilité au runtime native. C'est l'unification des runtimes des langages : il y en a deux runtime unifiés : la plateforme JVM et la plateforme DotNet. L'article suivant illustre la conséquence : on peut programmer pour un serveur d'application JEE (GlassFish) dans un autre langage que Java : avec PHP, Ruby, Groovy, Scala, ... et donc de bénéficier de tout les services non fonctionnels proposés par le standard JEE : persistence, transaction, sécurité, remote, ... et interropérer entre langages.
  • un résumé des nouveautés prévues pour le JDK 7 : le JSR (Java Specification Request) qui liste les JSR du JDK 7 n'est toujours pas sorti. Cela tarde un peut car l'échéance se rapproche : mi 2009 ?
  • une mise à jour du 22 novembre des benchs de certains langages de programmation : c'est un bench des implémentations de ces langages avec des algorithmes de bases. La référence (1) est le C / C++ (gnu), le JDK 6 (option serveur) est à 1,3 (1,3 fois plus lent), C# (mono) est à 2,5, l'ADA (gnat) 2005 est à 2.6, l'interpréteur Java est à 8,6 (il a fait des progrès car il était dans le passé autour de 20), Python est à 11, JRuby est à 21 et Ruby est à 39.
  • enfin un petit article sur la gestion des objets en C#, qui donnent accès à des ressources qu'il faut libérer explicitement. Cette libération de ressource est faite par le compilateur qui appel l'opération dispose() de l'interface IDisposable que ces objects implémentent. C'est une manière élégante de remplacer l'usage du destructeur en C++ pour libérer des ressources : fermer un fichier, un socket, un verrou, etc... Il est temps de proposer cette solution pour Java.

SpringSource dévoile sa roadmap :



NetBeans.org is proud to announce the availability of NetBeans IDE 6.5!

NetBeans IDE 6.5 offers simplified and rapid development of web, enterprise, desktop, and mobile applications with PHP, JavaScript, Java, C/C++, Ruby, and Groovy.

New features include a robust IDE for PHP, JavaScript debugging for Firefox and IE, and support for Groovy and Grails. The release also delivers a number of enhancements for Java, Ruby on Rails, and C/C++ development. Java highlights include: built-in support for Hibernate, Eclipse project import, and compile on save. Combining excellent out of the box experience, compelling features, and a great plugin ecosystem, NetBeans IDE 6.5 is a must-download for all developers.


What's New in 6.5
NetBeans IDE 6.5 is a significant update to NetBeans IDE 6.1 and includes the following changes:
  • PHP support with code completion, Xdebug and web service features.
  • New Support for Groovy and Grails.
  • Improved JavaScript, AJAX and Ruby support.
  • Automatic Compile and Deploy on Save for Java and Java EE applications.
  • Improved database support: SQL history, SQL completion, and results viewing and editing improvements.
  • Improved Java ME support for Data Binding, SVG and Custom Component creation.
  • GUI Builder: Support for Nimbus and simple class names.
  • JUnit: single test method support.
  • Debugger: Redesign of Step into feature.


Composeur WYSIWYG de "User Interface" Matisse :
  • Standard and Custom GUI Components
  • Swing Application Framework (JSR 296) Support
  • Beans Binding technology (JSR 295) Support


Mono's SIMD Support: Making Mono safe for Gaming
Mono is outgrowing the standard. Mono is not just playing catch-up any more, it is trying to move past the CLR in many areas. And as an open source project, they can slip in new libraries at a much faster clip than Microsoft. Instead of trying to build everything themselves, they can simply pick up mature projects like Mono.Options or the collection library C5 and include them in the standard release.
One of the most impressive enhancements announced for the December's Mono 2.2 release is support for SIMD. SIMD is a set of CPU commands that can drastically speed up operations of vectors. Instead of performing operations on each element of an array in sequence, one can use an SIMD instruction to process a vector of up to 16 elements. Below is a list of supported types.
The performance gains are remarkable. Using a Spring-Gravity algorithm, a naive C++ program takes 9.5 seconds to run. By comparison, a literal conversion into Mono takes a pitiful 17.7 seconds. But by switching from standard operators to SIMD functions, the time to run Mono drops to 1.7 seconds.



Les Nouvelles Technologies au p'tit déj'
Java EE 6 :
  • Rétrospective et futur de J(2)EE
  • Servlets 3.0
  • JSF 2.0
  • EJB 3.1 "Lite"
  • JPA 2.0
  • JAX-RS 1.1
  • WebBeans 1.0


Charles Nutter Discusses JVM Language Summit
The 2008 JVM Language Summit took place September 24 through 26, 2008, hosted by Sun Microsystems at its Santa Clara campus. The summit featured technical presentations about programming languages and the Java Virtual Machine, and featured language experts, OpenJDK engineers, and Java luminaries both as attendees and presenters. The summit was billed as a chance to help shape the future of programming languages on the JVM. About 70 people attended. But slides and videos for many of the presentations are available through the links at the end of this article. I spoke about the summit with one of its organizers, Charles Nutter. Nutter is best known as the JRuby guru at Sun. A Java developer since 1996, he started working on Ruby in the fall of 2004. He now works full-time as a core developer on JRuby.




Dynamic Languages support in GlassFish v3 Prelude:
By now most of you might already know that GlassFish v3 Prelude is released! GlassFish v3 Prelude brings not only JavaEE support but also brings in support for Dynamic Languages based platforms, such as Rails, Grails and also tested to work for Scala/Lift, PHP (Quecus, Java-PHP bridge).
Read Jerome's post on GlassFish v3 key architectural points that enables pluggable containers.
Following dynamic languages based frameworks are supported on GlassFish v3 Prelude:
  • JRuby on Rails
  • Groovy on Grails
  • PHP: Quercus (Caucho)
  • PHP / Java Bridge
  • Scala / Lift


Les nouvelles librairies dans Java 7
  • Modularité
  • NIO2
  • Units and Quantites
  • Date and Time API
  • Cache API
  • Concurrence
  • XQuery API
  • Resources consumption management
  • Changements mineurs (java.util.Currency)
  • Swing Application framework
  • Beans Binding et Beans Validation
  • Java Media Components
  • JMX 2.0 et connecteurs web services pour JMX
  • Outils divers (La JSR-260 définit des améliorations à l'outil javadoc afin de générer une documentation plus moderne et d'ajouter des tags de commentaires.)


The Computer Language Benchmarks : Benchmarking programming languages?
How can we benchmark a programming language?
We can't - we benchmark programming language implementations.
How can we benchmark language implementations?
We can't - we measure particular programs.

Programming language measurements by OS and CPU : 22 Nov 2008

x64 Ubuntu : Intel Q6600
  • 1.0 : C++ GNU g++
  • x 1.3 : Java 6 -server
  • x 2.5 : C# Mono
  • x 2.6 : Ada 2005 GNAT
  • x 8.6 : Java 6 -Xint (interpréteur)
  • x 11 : Python
  • x 21 : JRuby
  • x 39 : Ruby


using Statement (C# Reference)
Provides a convenient syntax that ensures the correct use of IDisposable (remove) objects.

vendredi 7 novembre 2008

Veille technologique semaine 45


Pour la semaine 45, je vous propose les articles suivants :
  • Les slides de la présentation de GWT par le club Java de PARIS, seront bientôt publié sur le web. C'est une technologique qui permet de faire des IHM Web (html, Javascript, ajax) à l'aide de code Java. Il est donc possible de pouvoir coder du web uniquement en connaissant la langage Java et la librairie GWT. Un compilateur traduit le source Java en html et Javascript qui sera exécuté coté navigateur web. Quelques URL pour voir le résultat : c'est assez étonnant.

Démo GWT-Ext http://www.gwt-ext.com/demo/
Démo Ext-GWT dit "GXT" http://extjs.com/products/gxt/
http://gwt.google.com/samples/Showcase/Showcase.html
http://gwt.google.com/samples/Mail/Mail.html
http://ofcgwt.googlecode.com/svn/demo/test.html
http://beta.contactoffice.com/ puis Demo login
http://samples.gwtphp.com/pax4/merchants/index.php

  • Une journée gratuite sur le model driven est organisé à la Défence, le 25 novembre prochain. C'est un moment unique pour avoir des retours d'expériences et de pourvoir accéder à des spécialistes de ces technologies.
  • Dans les Valtech Days du mois dernier, un outil de gestion des métriques sur des projets en cours de développement a été présenté. C'est un ensemble de chiffres qui sont actualisé dans la temps pour suivre les évolutions quantitatives et qualitatives du code Java. Cet outil Sonar est basé sur les projets gérés par Maven 2. A intégrer dans les outils.
  • Une autre présentation au sujet des problèmes d'intégration d'application (EAI : Enterprise Application Integration) avec la technologie JBI (Java Business Integration). Les composants d'intégration permettent de faite du binding entre des applications qui ne se connaissent pas.
  • Une question sur les priorités de SUN qui se focalise sur JavaFX au détriment de Swing : JavaFX a-t-il pénaliser Swing ?
  • SUN annonce que le JDK 1.4.5 est en fin de maintenance le 30 octobre 2008 (fin de vie). Le JDK 5 le sera l'année prochaine (octobre 2009) et le JDK 6 le sera en 2010. Après, il faut financer des prolongations pour rester sur une version et bénéficier des corrections de bug.
  • Première partie sur les nouveautés des fonctions mathématiques de la classe Math du JDK 5 et JDK 6. Pour les algoritmes en java ?
  • Le JDK 5 a ajouté les types paramétrés (les génériques) avec une compatibilité avec les version précédante (sans les types paramétrés). Les IDE comme eclipse propose un warning lorsque le code utilise la version non paramétré d'une classe ou d'une API : ont parle de donnée "raw" (brute). Pourquoi ? En fait, il est prévu, dans la norme du langage, dans le futur, que l'utilisation du mode "raw" soit interdite : cela ne sera plus un warning mais une erreur. Quel temps avons nous pour passer du mode raw au mode paramétré ?


Bonne lecture.


La journée du « Model Driven » - Edition 2008
  • Programme 2008
  • Présentations d'experts (MDA, UML, SOA, ...)
  • Exposés de solutions « Model Driven »
  • Retours d'expériences
  • Conclusions, perspectives d'avenir


Contrôles de qualité avec Sonar
La qualité d'une application étant directement liée à la qualité de son code, de nombreux outils sont apparus pour effectuer différents contrôles : reporting de tests unitaires, analyse de la couverture du code par les tests, vérifications du respect des règles de codage, de nommage des variables et méthodes, etc.
Sonar est un outil qui permet d'évaluer rapidement et clairement la qualité des projets Maven2, mais aussi d'autres types de projets, moyennant une "Mavenisation" assez simple. Il s'appuie sur des outils comme Checkstyle, PMD et Cobertura et offre un reporting web très intuitif pour synthétiser les résultats de ces différents outils et guider l'utilisateur sur la voie de la qualité.


Sending Messages Using JBI Technology
Every day, software professionals look for solutions to address integration problems in the business-to-business (B2B) and enterprise application integration (EAI) fields. These solutions are typically based on proprietary technologies, JMS platforms, or web services. Lately, a new technology has appeared: Java Business Integration (JBI). It offers a solution to the integration problem by defining a standard architecture where different components can be plugged in, in a cooperative context. The current version of JBI, 1.0, is described in JSR 208.
In this article, we will explore the main features of this technology, by developing a new component that can be plugged into the JBI environment. This component exchanges information with an external GSM modem to send a short text message. This is potentially useful because nowadays, many of us use short message service (SMS) to send and receive data like news, alerts, event notifications, and so on.



Has JavaFX Hurt Client-Side Java?
Sun's focus on JavaFX has resulted in less progress on improving Swing development productivity. Has the shift of focus to JavaFX from Swing hurt the cause of client-side Java?
In spite of a thriving Swing community, and despite Swing's large user base, Sun has re-focused its efforts around JavaFX over the past year-and-a-half, at the expense of Swing development. The most visible aspects of that change in focus is that many of the most experienced Swing developers left the company, such as Chet Haase (see Artima's interview with Chet Haase), Hans Muller, or Scott Violet. The important Swing-related JSRs have also been stale for a long time now: the latest JSR 295 and 296 updates occurred in June, 2006, according to the JCP's Web site.
Most recently, SwingX contributor Jeanette Winzenburg wrote on the project's online forum that Sun all but abandoned its support for SwingX, because its engineers are busy working on JavaFX.



Java SE & Java SE for Business Support Road Map
Java SE release families will be maintained for a minimum of 3 years from that release families general availability date (GA date), whereas those same release families will be eligible for up to 15 years of support with Java SE for Business.
October 30, 2008 : End of Service Life for JDK 1.4.2
October 30, 2009 : End of Service Life for JDK 5
2010 : End of Service Life for JDK 6




Java's new math, Part 1: Real numbers
Version 5 of the Java Language Specification added 10 new methods to java.lang.Math (and its evil twin java.lang.StrictMath), and Java 6 added another 10. In this article, I focus on the more purely mathematical functions provided, such as log10 and cosh. In Part 2, I'll explore the functions more designed for operating on floating point numbers as opposed to abstract real numbers.


Raw type, rare type and preparing the future
The use of raw types is allowed only as a concession to compatibility of legacy code.
The use of raw types in code written after the introduction of genericity into the Java programming language is strongly discouraged. It is possible that future versions of the Java programming language will disallow the use of raw types.