vendredi 19 décembre 2008

Veille technologique semaine 51

Pour cette semaine 51, je vous propose les articles suivants :
  • c'est la saison des prévisions pour 2009 et le JDK 7. Il est reporté début 2010 avec une réduction des évolutions. Certaines ne sont pas encore prêtes.
  • La conférence Devoxx 2008 en Belgique a permis d'avoir des précisons sur le JDK 7.
  • Un résumé, jour par jour, des conférences Devoxx 2008.
  • Un article sur une présentation de Devoxx au sujet des estimations et des engagements dans le développement du logiciel.
  • Ensuite, deux articles au sujets des composants logiciels. Un premier qui explique l'intérêt de la modélisation UML2 et qui propose le concept de composant
  • et un exemple de modèle de composants de l'industrie : SCA (Services Component Architecture) proposé par IBM et actuellement normalisé chez OASIS qui a en charge des spécifications. Une implémentation open sources est proposée par le groupe Apache avec TUSCANY.
  • La société Excelsior qui sort la version 6.4 de son compilateur Java. Cette version propose une gestion de la propriété intellectuelle du code Java avec un maquillage complet du binaire.
  • L'article suivant rappel, pour ceux qui font des IHM avec Swing, que le thread de l'IHM (EDT : Event Dispatcher Thread) est le seul thread autorisé à manipuler un JavaBean Swing. C'est une règle qu'il faut respecter à 100% sinon les disfonctionnement arrive très vite (dead lock, comportement non conforme ou non prévue, ...). Swing n'est pas thread safe, il faut en tenir compte.
  • Sortie de l'update 11 du JDK 6, avec son lot de bugs corrigés.

Bonne lecture.



Year in Review: What to expect in Java SE 7
An overview of features in and out of the next Java specification. The current target for Java SE 7 is early 2010. We can expect a platform JSR to arrive in the first quarter of 2009.
  • Better dependency management
  • Project Jigsaw and the 'module' keyword
  • (More) NIO APIs
  • Tackling the time dimension
  • Parallel processing
  • Better precision through annotations
  • Simplifying Swing
  • Java Management Extensions (JMX) updates
  • Language changes
  • Dynamic-language support
  • Java SE 7 and the future of Java


From Devoxx: JavaFX on show, JDK 7 News !
Closing out a busy week here at Devoxx, the release of JavaFX and JDK 7 news have been the talk of the town !



Java 7 Update from Mark Reinhold at Devoxx
This is a summary of Mark Reinhold's Java 7 update given at Devoxx, with a few comments from myself. Mark described his presentation as a provisional plan and not binding. The changes in Java 7 will come from Sun and others.


Devoxx 2008 : Bien plus que Java. En effet.

Devoxx, comme vous le savez, c'est le nouveau nom donné à Javapolis. Et ce nom permet bien plus de liberté qu'auparavant.

Avant, Javapolis oblige, tout tournait autour de Java.
Maintenant, avec Devoxx, les organisateurs peuvent se permettre d'étendre le spectre. Même si le focus est toujours principalement sur Java.




Devoxx : présentation sur les estimations du temps de dév
Estimation : Prediction is a very difficult task especially about future ones…"
Giovanni demande à l'assistance qui donne des estimations de temps de développement ? la majorité de la salle. Qui se fait négocier par son managment ces temps de développement ? Encore une fois pas mal de monde.

Il explique ensuite la différence entre "Estimation" et "Engagement".
L'estimation est la mesure objective du temps nécessaire pour faire une tâche. Cette estimation n'est donc pas négociable.
L'engagement représente le but à atteindre et donc la promesse. Cette promesse regroupe un niveau de qualité, un certain nombre d'itérations, bref c'est bien la promesse de ce que le client aura. L'estimation c'est le prix à payer.

Faut-il surestimer ou sous-estimer ?
A cette question, Giovanni répond que les développeurs sont trop optimises de 30%. Par sécurité il faut donc mieux ajouter un peu plus à une estimation initiale.
Cependant, l'effet inverse s'appelle la loi de Parkinson : le temps de travail temps à rejoindre le temps donné pour effectuer une tâche. Si tu me donnes 10 jours pour faire cette tâche, je vais tendre à remplir ces 10 jours, c'est humain.
Avoir trop de temps disponible entraine aussi le phénomène de procastination. On tend à remettre à demain des tâches.



Définir une architecture par composants avec UML2
Les limitations de la modélisation / programmation par objet sur la réutilisabilité et l'autonomie, ont renouvelé l'intérêt pour les composants. En effet, réutiliser une classe signifie souvent importer un ensemble de classes liées, mal identifié par l'utilisateur. Hériter d'une classe signifie créer une dépendance forte, qui sera excessivement sensible aux évolutions de la classe héritée. Les points d'utilisation, les modes d'assemblage, l'autonomie des éléments réutilisés, le contrat d'utilisation ne sont pas fournis par la programmation/modélisation objet.

La notion de composant a été un ajout majeur introduit dans le standard UML2. Le composant permet en effet d'isoler des parties de logiciel en unités autonomes, avec des points de connexion bien définis. Les notions de "structure interne" de classe, de port et de part sont des notions nouvellement introduites offrant des mécanismes utiles pour les architectures orientées composant. A travers ces mécanismes, UML2 apporte la modélisation par composant. Ces mécanismes d'assemblage de composants permettent de réaliser le vieux rêve du "lego logiciel", c'est à dire d'assembler des composants qui ne se connaissent pas obligatoirement, pour former un système englobant. Pour ceux qui ont connu l'enfer de l'intégration logicielle, ou pire encore l'intégration logiciel / matériel, ces mécanismes sont très prometteurs.



Introduction à SCA (Service Component Architecture)
SCA (Service Componant Architecture) est un ensemble de spécifications visant à simplifier la création et la composition de services (indépendamment de leur implémentation) dans le cadre d'Architectures Orientées Service (SOA). SCA propose donc un modèle de programmation pour la construction d'applications à base de composants suivant le paradigme SOA. Ce modèle se base notamment sur l'idée qu'un service de niveau N se construit par assemblage / agrégation / orchestration de services de niveau N-1 ou N (Et ce quelque soit la hiérarchisation choisie. Par exemple : Services organisationnels, Services métiers, Services techniques).

A ce titre, SCA fournit deux niveaux de modèle :

  • Un modèle d'implémentation : Construire des composants qui fournissent et utilisent des services
  • Un modèle d'assemblage : Construire une application métier à forte valeur ajoutée en liant entre eux un ensemble de composants.

Ainsi, SCA insiste sur une séparation forte entre l'implémentation des services et leur assemblage.

Le modèle SCA se veut agnostique vis-à-vis :
  • Des technologies d'implémentation des composants de service. Il inclut entre autre les technologies d'implémentation suivantes : Java, C++, BPEL, XQuery ou SQL.
  • Des technologies d'exposition et d'invocation des composants de services (même si WSDL et les interfaces java sont mis en avant).

SCA permet de décrire des services et leur assemblage indépendamment de toutes considérations techniques d'implémentation.


Excelsior JET
Accelerate, protect, and deploy your Java applications.
Excelsior JET is a compliant Java SE 6 technology implementation with an ahead-of-time (AOT) compiler and a deployment toolkit. Use it if you want to:
  • Speed up your Java applications without any source code changes or hardware upgrades
  • Protect your Java code from decompilers without compromising performance
  • Build compact, professional installers for your Java applications without dependency on the JRE

Excelsior JET 6.4 is the first release that introduces features designed specifically for IP protection enhancement.



Swing threading and the event-dispatch thread
The evolution and pitfalls of Swing's single-threaded event model.
To ensure your Swing components are accessed correctly you should always create the entire UI in the event-dispatch thread, as shown here:

Runnable runner = new Runnable() {
public void run() {
// ...create UI here...
}
}

EventQueue.invokeLater(runner);

Moving your initialization code to the event-dispatch thread is the only way to ensure that your Swing GUIs are thread safe. Yes, it will feel awkward at first, but progress usually does.




JavaTM SE 6 Update Release Notes Changes in 1.6.0_11


vendredi 12 décembre 2008

Veille technologique semaine 50

Pour le bulletin de cette semaine 50, je vous propose les sujets suivants :
  • une première rétrospective de l'année 2008 sur la technologie Java : du langage à la plate-forme.
  • JavaFX est sorti depuis début décembre, et un certain nombre d'articles commencent à sortir. Une version 1.1 de JavaFx devrait voir le jour en Février, et une autre version 1.5 fera son apparition aux alentours de Juin 2009. Je vous propose les articles suivants :
    • SUN et JavaFX
    • des plugins qui permettent d'utiliser photoshop ou illustrator comme outil de composition visuel pour JavaFX
    • la FAQ de JavaFX
    • un article sur la création d'une petite application en JavaFX
  • Comment mesurer la productivité ? C'est une question récurrente pour laquelle l'article propose une solution qui a fait ses preuves : les tests automatisés pour permettre le refactoring.
  • Le planning de la conférence annuelle Javoxx (anciennement JavaPolis) qui se passe en Belgique en décembre. C'est une conférence très importante pour le monde Java avec des présentations de qualités. Ce planning montre un très grands nombre de sujets tous les plus intéressant les uns que les autres. Je vous indiquerais lorsque les slides seront disponible sur internet.
  • Un article au sujet de quelques amélioration des EJB proposé par la version EJB 3.1 avec : l'asynchronisme sur les services, une version d'EJB lite, ...
  • un petit article au sujet des exceptions en Java et de leur bon usage.
  • encore une page sur les performances en Java.
  • et enfin, pour ceux qui font de l'IHM avec Swing et Awt, sur la suppression de la limitation sur le mélange de composants lourd et léger : enfin corrigé dans le version JDK 6 update 12 (non encore officiel) et JDK 7.
Bonne lecture


Year in Review: Java in 2008 - What just happened?

When high-tech history is inscribed for the ages, 2008 may be remembered as the year Java tipped from a language-centric to a platform-centric technology. Andrew Glover kicks off JavaWorld's Year in Review series with a look back over the last 12 months in Java development, when alternate languages for the JVM took center stage, new directions emerged in the enterprise space, and Sun Microsystems staked its claim on the client side -- with or without Swing.


With JavaFX, Sun seeks new coders, new revenue.
JavaFX also comes with a slick feature, the ability to move running applications out of the browser and onto the desktop--and back, if desired. Essentially, they can change their nature and abilities according to where they're housed. And the same application also can run on JavaFX Mobile, holding the promise for programmers that they won't have to endlessly rewrite the same applications for different media.

"You can build a media player, run it in a browser, then you can simply drag it out of your browser onto your desktop, and it becomes a desktop application automatically. It's the same code, the same application," said Jeet Kaul, Sun's senior vice president of Java engineering. Moving to the desktop, the application could take advantage of new screen real estate that affords a better user interface and new permissions for tasks such as writing files to a hard drive, Kaul said.

JavaFX 1.0 Production Suite enables designers to convert their rich media assets to JavaFX format and view the converted files before handing them off to JavaFX application developers. JavaFX 1.0 Production Suite consists of three components:

JavaFX Plugin for Adobe Photoshop (exports graphics in Photoshop to JavaFX format)
JavaFX Plugin for Adobe Illustrator
(exports graphics in Illustrator to JavaFX format)

JavaFX Media Factory
(converts SVG files to JavaFX format and provides a Viewer for displaying JavaFX format files)



JavaFX Technology - FAQs


Getting Started With JavaFX Technology
Creating Your First JavaFX Application
This section guides application developers in creating their first JavaFX application by using the NetBeans IDE 6.5 for JavaFX 1.0 technology. For web designers who want to get started using the JavaFX 1.0 Production Suite, see the Getting Started With JavaFX 1.0 Production Suite article.


Comment mesurer la productivité ?
Depuis toujours, dans le monde du logiciel, on entend « Il faut augmenter la productivité des développements ». Il ne suffit pas d'en parler pour améliorer la productivité. Comment passer d'un slogan très abstrait à des actions concrètes et des résultats tangibles ?

On ne peut améliorer que ce que l'on mesure. Il est donc impératif de trouver un indicateur permettant de vérifier l'amélioration recherchée. Les mesures comme le nombre de lignes de code ou le nombre de points de fonctions, encore utilisées aujourd'hui, sont trop éloignées de la valeur produite pour être intéressantes. Un indicateur beaucoup plus proche de la satisfaction client, et donc plus pertinent, est « le nombre de fonctionnalités sans erreur ajoutées à un logiciel durant un période donnée », ce que l'on pourrait appeler le débit de fonctionnalités.
Malgré les différences de technologies, les deux tendances (1) et (2) ont une caractéristique commune : après un certain temps, le débit de fonctionnalités chute. Le profil 3 montre les équipes arrivant à conserver une augmentation de leur productivité. Quelle caractéristique magique ont-elles ?

Une technologie spécifique ? Non. Une architecture spéciale ? Non. Elles observent simplement deux disciplines : le test automatisé et le remaniement permanent du code.


Javoxx 2008 - Schedule

Avec 3200 personnes inscrites la conférence Devoxx 2008 qui a eu lieu du 8 au 12 décembre 2008 est complète ! C'est un vrai plébiscite et une grande réussite pour le JUG Belge, organisateur de cette conférence.


EJB 3.1 – EJB New and Improved!

The EJB 3.0 specification was a huge improvement from what we were used to in the early versions of EJB. Available as an early draft, EJB 3.1 has many more features and is even easier to use. Let's take a brief overview of a few interesting topics being considered in this new and improved version of EJB.


Exceptions in Java

In this article, we look at exception handling in Java. We start with the history of exceptions, looking back at the precursor of Java, a language called Oak. We see reasons why Thread.stop() should not be used and discover the mystery of the RuntimeException name. We then look at some best practices that you can use for your coding, followed by some worst practices, in the form of exception anti-patterns.


Java Performance

I remember 12 years ago, when Java was on the rise, and it was seen as "too high level" and slow when compared to C and C++.
The latter languages were the languages of choice when you wanted to achieve maximum performance.
Java, on the other hand, was seen back then as a high overhead alternative, due to its features like bytecode generation by the compiler, automatic memory management, references instead of pointers, and built in array bounds checks. At that time, those features looked like a costly overhead. The reasoning behind that point of view went more or less along these lines:

  • Java provides automatic array bounds verification, which means that it has to check the limits of the array at every access, therefore it has to be slower.
  • Java doesn't have pointers. There must be an overhead every time a reference is accessed, therefore Java is slower than C/C++.
  • Java has the garbage collector, therefore the virtual machine has to spend a long time finding unreachable objects, therefore Java is slower than C/C++.
  • Java compiles to bytecode, therefore it loses to C and C++ because those two languages compile to native code.

The reasoning above may have been true back then, in the pre-HotSpot era of Java 1.0 and 1.1, but since the introduction of the HotSpot virtual machine in java 1.3 those problems have been greatly reduced and in some cases Java now even beats C and C++ in terms of performance.


Allow limited mixing of heavy and lightweight components

Release Fixed 7(b19), 6u12(b01) (Bug ID:2167756)



vendredi 5 décembre 2008

Veille technologique semaine 49

Pour cette semaine 49, je vous propose les sujets suivants :
  • sortie de JavaFX en version 1.0. Après plus d'un an depuis l'annonce à JavaOne en juin 2007, SUN propose la technologie JavaFX en version 1.0. Une technologie basée sur Java, pour réaliser des applications IHM pour internet : les RIA (Rich Internet Application). Le terme riche fait référence à l'expérience utilisateur : interactions, look and feel, multimédias, etc... pour des IHM connectés à des applications distantes à travers internet. C'est une technologie qui se place en concurrence de la technologie Air d'Adobe (flash) et de la technologie Silverlight de Microsoft, ou de l'HTML 5. C'est ambitieux de la part de SUN de se placer en challenger.
  • JavaFX c'est quoi ?
  • FAQ JavaFX
  • JavaFX script
  • La version 2.0 des API de persistance : JPA avec les requêtes basées sur des critères typées. C'est une avancé importante sur le chemin de l'intégration d'un langage de requête dans Java, comme LINQ pour C#.
  • LIQUidFORM par google qui propose de résoudre le même genre de problème de requêtes typées pour JPA.
  • Un article technique sur le principe de compression des pointeurs mémoire pour les JVM 64 bits en pointeur 32 bits. Cette compression permet d'avoir les avantages du mode 64 bits du pentium (meilleures performances) sans les inconvénients de la taille des pointeurs 64 bits : la JVM est en mode 64 bits mais avec des pointeurs 32 bits, ce qui donne une mémoire maximum adressable de 32 Go = 4Go x 8 = 32G octets. Question : pourquoi 4 x 8 ? A votre avis ? Réponse dans l'article.
  • L'article suivant est une explication de ce principe de compression de pointeur : oops = "ordinary object pointer"
  • Un article sur l'analyse de la couverture de code. C'est un point incontournable pour augmenter la qualité de code.
Bonne lecture.


JavaFX Technologies At a Glance
JavaFX provides a productive development environment for web developers, mashup authors, and Java developers to quickly and easily build the next generation of rich internet applications (RIAs). With JavaFX, designers and developers can collaborate on building high-impact RIAs. Designers gain a broad set of tools to complete the designer/developer workflow, and developers have a simple, declarative scripting language with the right set of tools.

site JavaFX
http://javafx.com

Quickly and easily create and deploy Rich Internet Applications with JavaFX
It's here. The JavaFX Rich Client platform. A platform and tools suite that offers distinct advantages to Web developers, Web designers, and Java developers that are building rich, connected experiences.


Frequently Asked Questions : JavaFX
JavaFX is an expressive rich client platform for creating and delivering rich Internet experiences across all screens of your life.
JavaFX is fully integrated with the Java Runtime and takes advantage of the performance and ubiquity of Sun's Java Runtime Environment that is installed on literally billions of devices worldwide. In addition, JavaFX fosters a productive and collaborative developer-designer workflow.
Web developers and designers can use JavaFX to imagine, create and express a real experience that jumps out of the browser and into our day-to-day lives. JavaFX is the powerful combination of a scripting language â€" JavaFX Script, a rich client platform and set of tools that enable a complete, productive and collaborative developer-designer workflow.



JavaFX Released: Top 10 Things to Know



Experiments With JavaFX Script

JavaFX was unveiled at JavaOne 2007 as a new initiative for consumer-oriented Java applications. The strategy includes a new programming language called JavaFX Script that is geared towards developing Java-based GUIs, as well as libraries and tools for developing desktop, browser and mobile applications.



Java Persistence 2.0 Public Draft: Criteria API :
Probably the most significant of the new features introduced in the JPA 2.0 Public Draft is the Criteria API. This is a non-string-based API for the dynamic construction of object-based queries.

Criteria queries are constructed in terms of query definition objects.
As with JPQL static and dynamic queries, criteria query definition objects are passed to the EntityManager createQuery method to create Query objectsâ€"and then executed using the methods of the Query API.

Loosely speaking, a QueryDefinition object can be thought of as a set of nodes corresponding to the semantic constructs of the query: domain objects, which correspond to the range variables and other identification variables of the JPQL FROM clause where clause predicates, which comprise one or more conditional expression objects select clauses, which comprise one or more "select item" objects order-by and group-by items subqueries and so on...




LIQUidFORM stands for Language Integrated QUeries
For Object Relational Mapping and is a Java library that provides a Java Domain Specific Language for building type-safe and refactoring proof JPA queries.



Language Integrated Queries For Object Relational Mapping
LIQUidFORM stands for Language Integrated QUeries For Object Relational Mapping and is a Java library that provides a Domain Specific Language for
building type-safe and refactoring proof JPA queries. While the project draws its inspiration from the LINQ project, it is not LINQ for Java : its aim is only to help in writting JPA queries against your domain model. Read on to understand what LIQUidFORM is and what it is not.



32-bit or 64-bit JVM? How about a Hybrid?
Before x86-64 came along, the decision on whether to use 32-bit or 64-bit mode for architectures that supported both was relatively simple: use 64-bit mode if the application requires the larger address space, 32-bit mode otherwise. After all, no point in reducing the amount of data that fits into the processor cache while increasing memory usage and bandwidth if the application doesn’t need the extra addressing space.

When it comes to x86-64, however, there’s also the fact that the number of named general-purpose registers has doubled from 8 to 16 in 64-bit mode. For CPU intensive apps, this may mean performance at the cost of extra memory usage. On the other hand, for memory intensive apps 32-bit mode might be better in if you manage to fit your application within the address space provided. Wouldn’t it be nice if there was a single JVM that would cover the common cases?



Compressed oops in the Hotspot JVM
What's an oop, and why should they be compressed?
An "oop", or "ordinary object pointer" in HotSpot parlance is a managed pointer to an object. It is normally the same size as a native machine pointer, which means 64 bits on an LP64 system. On an ILP32 system, there is a maximum heap size of somewhat less than 4Gb, which is not enough for many applications. On an LP64 system, though, the heap for any given run may have to be around 1.5 times as large as for the corresponding IPL32 system (assuming the run fits both modes). This is due to the expanded size of managed pointers. Memory is pretty cheap, but these days bandwidth and cache is in short supply, so significantly increasing the size of the heap just to get over the 4Gb limit is painful.


L'analyse de couverture de code en Java
Il ne reste plus grand monde pour soutenir que l'écriture de tests unitaires automatisés est une perte de temps sur un projet logiciel - la notion de dette technique entre dans les moeurs. Cette prise de conscience salutaire se heurte pourtant souvent à deux grandes catégories de difficultés :
Le conservatisme - pour ne pas dire la stupidité - de certains chefs de projet, qui persistent à voir dans l'écriture des tests une activité contre-productive, qui servira de variable d'ajustement au moindre coup de grisou. L'existant : quand le projet n'a pas systématisé la pratique du test dès son origine et que la multiplication des anomalies tardives le pousse à la réintroduire. Par où commencer ?

Pour le premier point, la solution passe par un effort pédagogique, ou, pour les cas désespérés, par une reconversion imposée ou un congé sabbatique.
Pour le second, il faut un peu de bon sens, et un peu d'outillage.

C'est sur le deuxième aspect qu'interviennent les outils d'analyse de couverture de code (ou "code coverage" en anglais). Dans la suite, nous verrons que ces outils ne permettent pas
d'évaluer les tests unitaires d'un point de vue qualitatif, mais qu'ils peuvent en revanche apporter au bon sens un précieux appui en répondant aux questions suivantes :
  • Quels sont les tests unitaires déjà en place ?
  • Les tests sont-ils en phase (à jour) avec le code qu'ils testent ?
  • Les fonctions critiques de l'application sont-elles couvertes par les tests ?

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.



vendredi 31 octobre 2008

Veille technologique semaine 44

Pour le bulletin de la semaine 44, je vous propose les articles suivants :
  • une soirée sur Google Web Toolkit (GWT) par le club Java de Paris : le 4 novembre.
  • une conférence gratuite sur l'open sources proposée par Xebia et Skills Matter : le 12 novembre à la Défense.
  • une journée sur le framework Spring à la Défense : le 13 novembre.
  • une présentation sur JEE 6 par SUN le 12 décembre à Paris.
  • La stratégie de Microsoft au sujet du model driven : le modèle devient l'application
  • un article d'IBM au sujet des architectures SOA (Services oriented Architecture) et EDA (Event Driven Architecture) : les deux style d'architectures sont complémentaires : le terme EDSOA (Event Driven Service Oriented Architecture) est proposé par BEA.
  • La programmation concurrente (multi-thread) pour la plate-forme DotNet 4 : le multicore demande au logiciel de prendre en compte cette évolution des architectures des processeurs : pour DotNet 4, cela sera intégré au langage C#.
  • un article sur Java Efficace, deuxième édition, de Joshua Bloch : c'est un livre dont la lecture devrait être obligatoire à tout développeur Java, avec interrogation.
  • un exemple d'utilisation de l'interropérabilité de Java2D et OpenGL (jogl) possible depuis le JDK 6.
  • enfin un exemple de singleton avec les EJB 3.1 : @Singleton, le design pattern est pris en compte par le conteneur EJB.


Bonne lecture.

Rencontres Spring 2008 - 13 novembre - Paris

Le 13 novembre à La Défense auront lieu "les rencontres Spring". Cet événement exceptionnel sera l'occasion de rencontrer les personnes qui sont à l'origine du framework Spring, et de voir quelles sont les grandes orientations du portefeuille de projets Spring dans l'avenir.

En particulier, nous aurons les interventions des personnes suivantes :

· Juergen Hoeller <http://www.springsource.com/people/jhoeller> (SpringSource), co-fondateur et principal développeur du framework Spring, qui parlera de Spring 3.0

· Peter Cooper-Ellis <http://www.springsource.com/management> (SpringSource), senior vice-president of engineering de SpringSource, qui donnera des informations sur la roadmap des produits Spring

· Mark Thomas <http://www.springsource.com/people/mthomas> (SpringSource), principal contributeur au projet Apache Tomcat, qui parlera de l'utilisation de Tomcat en production avec Spring

Les places sont gratuites et obligatoirement en nombre limité! L'événement se passe à Paris-La Défense.


Première Conférence Open Source Exchange!

A l'occasion de l'annonce du partenariat qu'ils ont scellé, Skills Matter & Xebia vous donnent rendez-vous pour ce premier Open Source Exchange à Paris, le 12 novembre 2008. Cet événement gratuit est une occasion unique de partager votre expérience avec des autres experts de l'Open Source. Venez écouter ce qui est nouveau dans le monde de Java EE 6 et GlassFish, eXo Web oS, Hadoop & Groovy.

Cet évènement s'adresse à tout public souhaitant mieux connaître le monde de l'open source. L'évènement est gratuit mais compte tenu du nombre limité de places, il est indispensable de s'inscrire auparavant en remplissant le formulaire suivant.


Journée gratuite "GlassFish et Java" le Vendredi 12 décembre à Paris

chez Sun au 42, avenue d'iéna à Paris.

Sujets traités: GlassFish, Java EE 6, Grizzly Comet, Jersey, OpenMQ, JavaFX, MySQL, OpenSSO, OpenESB, partenaires, retours d'expérience.

Speakers: Roberto Chinnici (spec lead), Richard Bair (tech lead), Paul Sandoz (spec lead), Linda Schneider (tech lead), Jean-François Arcand (tech lead), etc...

Plus de détails et ouverture des inscriptions dans quelques jours, nombre de places (très) limité.



Soirée Google Web Toolkit (04/11/2008)
Mardi 4 novembre 2008, Dans les locaux de l'ISEP




Microsoft's Modeling Strategy
The foundation of Microsoft's vision for their new model-driven service-oriented architecture (SOA) - Oslo project, model driven development would bridge the gap between business analysts and IT, delivering on the SOA promise to align application development with business needs.

Model-driven development is the missing ingredient that the industry has been looking for. Oslo will be the anchor for a new generation of app development that uses model-driven development, but takes it mainstream. Rather than having models being imported and exported and generating code, the model is the application and that breaks down the silos. We're creating a general purpose set of modeling tools, modeling language and repository that can bridge all the various types of models that describe an application and move models to the center of application development. Models then become the app.

[UML is] one of the standards Microsoft needs to support, but it's not the only one. We think of it as one of the important modeling notations, but it's not the only one. Microsoft plans wide support for a range of modeling tools from its own basic Visio diagramming product to UML, but also including other language requirements such as business process modeling notation (BPMN)




Combining Service-Oriented Architecture and Event-Driven Architecture using an Enterprise Service Bus
Service-Oriented Architecture (SOA) and Event-Driven Architecture (EDA) are two different paradigms that address complex integration challenges. How can organizations choose the better approach to meet their needs? Actually they don't have to choose: an Enterprise Service Bus (ESB) allows for the implementation of both the SOA and the EDA concepts.




.NET 4 Feature Focus: Parallel Programming
The Common Language Runtime has always had basic support for parallel programming in the form of locks, threads, and thread pools. With the increasing emphasis on multi-core CPUs, there has been a renewed interest in high-level parallel programming constructs.
The first one announced was Parallel LINQ, also known as PLINQ. Like SQL, parallelization is handled by the language itself without effort by the developer. Simply tack on an AsParallel to the query and everything else just works. Well usually, but just like SQL there are times with additional options need to be specified.



More Effective Java With Google's Joshua Bloch
Joshua Bloch, Google's chief Java architect, is a former Distinguished Engineer at Sun Microsystems, where he led the design and implementation of numerous Java platform features, including JDK 5.0 language enhancements and the award-winning Java Collections Framework. He holds a Ph.D. in computer science from Carnegie-Mellon University.
Bloch won the prestigious Jolt Award from Software Development Magazine for the first edition of his 2001 book, Effective Java Programming Language Guide, known to many developers as Effective Java, and he is also the coauthor (with Neal Gafter) of the highly regarded book Java Puzzlers.
If there's one book that Java developers repeatedly refer to as their favorite, it's Effective Java.

"Developers tend to reinvent the wheel is the same reason they tend to optimize prematurely: In order to stay sane, most developers have a can-do attitude, and some take it too far. They say to themselves, "Yes, there's a library, but I can do better." Maybe you can, but that doesn't mean you should. Use the standard library unless it's profoundly unsuited to your needs."



Integrating GLPbuffer and Java Graphics2D
This article discusses the incorporation of OpenGL into an ongoing mathematics visualization project, 3D-XplorMath-J. 3DXplorMath is a program to visualize mathematical objects and allow the user to interact with them, created for educational and research purposes. The object is to have a "virtual math museum," organized into "galleries" and "exhibits." The project was begun by Richard S. Palais as a program for Macintosh computers; it was written in the Pascal programming language, with contributions from other mathematicians.

Quick Look at Java 6 and OpenGL
In Java SE 6, JOGL and Java 2D can be used together directly. Java 6 allows Swing objects to now overlay OpenGL rendering. Now rendering of 3D OpenGL graphics can be done directly onto Java 2D graphics, and similarly, Java 2D graphics can be drawn directly onto 3D OpenGL graphics.


EJB 3.1 Singleton Example
As the name implies a javax.ejb.Singleton is a session bean with a guarantee that there is at most one instance in the application. What it gives you that is completely missing in EJB 3.0 and prior versions is the ability to have an EJB that is notified when the application starts and notified when the application stops. So you can do all sorts of things that you previously could only do with a load-on-startup servlet. It also gives you a place to hold data that pertains to the entire application and all users using it, without the need for a static. Additionally, Singleton beans can be invoked by several threads at one time similar to a Servlet.


vendredi 24 octobre 2008

Veille technologique semaine 43


Pour le bulletin de cette semaine 43, je vous propose les sujets suivants :
  • La sortie de Silverlight 2.0 par Microsoft : c'est la première version qui permet d'utiliser un des langages de la plate-forme DotNet (C# par exemple) à la place de JavaScript. Un plug-in eclipse sera disponible.
  • Par réaction, la version 10 de flash est proposé par Abobe : c'est l'une des solutions concurrentes de Silverlight.
  • Sortie du JDK 6 upade 10 : c'est une sortie majeur avec une refonte du JRE qui est maintenant fractionné en plusieurs parties. L'accélération Direct3D est maintenant activé par défaut sur windows.
  • Les Valtech Days 2008 se sont passés sur deux jours : les 21 et 22 octobre dernier. Plus de 300 participants avec 35 sessions pour présenter des technologies, des outils et des processus de développement. Les sessions étaient quatre par quatre, il fallait donc choisir. C'est une moment unique pour avoir un éventail des technologies du moment, avec des retours d'expériences. C'est deux jours qui peuvent vous faire gagner 6 mois à un an en questions ou essais. Prochaine session en 2009.
  • Un résumé des outils de diagnostic du comportement d'une JVM : il faut pouvoir prendre connaissance de ce qui se passe à l'exécution, à l'intérieur d'une JVM.
  • Un exemple de code pour réaliser un exécuter avec un comportement particulier : gestion de la saturation des threads.
  • Quel est l'utilisation des énumérés du JDK 5 : des simples listes de constantes ou plus ? Les énumérés du JDK 5 sont de vraie classes, avec des champs et des opérations. Un énuméré peut implémenter une interface.
  • Dernier exemple de code, en provenance de Joshua Bloch, avec un singleton réalisé par un énuméré. Cela montre que le concept de singleton (une seule instance d'une classe) et le design pattern singleton du Gang Of Four mondialement connu doivent être différencié.

Bonne lecture.


Rich Internet Application (RIA) : Sortie de Microsoft Silverlight 2.0

Microsoft a annoncé cette semaine la sortie de Silverlight 2.

Lors de notre récent contest RIA dans lequel nous avions essayé de dégager les avantages et inconvénients de différents framework RIA, nous annoncions un certain nombre de points négatifs sur la version Silverlight que nous avions utilisée (Silverlight 2 Beta 2). Microsoft comble avec cette release officielle un certain nombre d'entre eux :

  • Microsoft se rapproche du monde Java en proposant un ensemble d'outils permettant le développement Silverlight directement au sein d'Eclipse. Eclipse4SL, de son petit nom, est actuellement disponible en version alpha, la version finale étant prévue pour le printemps 2009. Eclipse4SL contiendra également un éditeur graphique permettant la manipulation et la visualisation du XAML.
  • Microsoft prévoit également d'enrichir son catalogue de contrôles via le Silverlight Control Pack (SCP). Seront disponibles des contrôles du type Accordion, DockPanel, ViewTree ou AutoComplete sous la Microsoft Permissive License (open source).


Un flash Player 10 précipité pour la sortie de Silverlight 2 ?

Adobe a annoncé la semaine dernière la sortie de Flash Player 10 en release sous le nom d'Astro.

Cette nouvelle version comporte des améliorations graphiques et audio :

  • Des nouveaux effets 3D plus fluides et plus performants.
  • Des effets et filtres customisables par le biais de l'outil Pixel Bender.
  • Gestion de traitement de texte avancé avec plus d'éléments typographiques.
Adobe a également pris en compte des demandes d'amélioration de la communauté Flash avec entre autres :
  • plus de contrôles sur le menu contextuel: il est maintenant possible d'ajouter des items en texte riche.
  • la manipulation de grandes images bitmap (jusqu'à 4096 par 4096)
  • sortie de la version Linux en simultanée avec la version Windows, les problèmes spécifiques Ubuntu ont été réglés depuis la bêta,
  • les touches clavier du type Ctrl, Espace… peuvent maintenant être accessibles en plein écran: ce qui peut être pratique pour le développement des jeux Flash.
Vous pouvez retrouver la liste complète des fonctionnalités sur le site d'Adobe.

Comme le signale l'article publié sur le blog de Cedric Champeau, à la sortie du plugin un certain nombre de bugs persistent, la sortie simultanée de Silverlight 2 aurait-elle fait accélérer les choses ?


Programme Valtech Days 2008
Les annonces de nouvelles technologies se succèdent et, parce que votre temps est précieux, nous vous proposons en 2 jours un condensé de notre lecture de l'actualité et notre vision de l'avenir au travers de présentations, retours d'expériences, démonstrations et discussions. Que vous soyez Directeur des Systèmes d'Information, Responsable de Service, Responsable Etudes et Méthodes, Architecte, Chef de Projet, les Valtech Days s'adressent à tous les acteurs du marché : clients, leaders d'opinion, formateurs et consultants experts. En 2007, plus de 300 participants sont venus s'informer et participer à des sessions techniques animées par des experts locaux et internationaux.


Java 6 Update 10 : Quoi de neuf docteur ?

Beaucoup de nouvelles fonctionnalités orientées utilisateur finale pour facilité le déploiement et l'exécution d'applet, parmi lesquelles :

  • L'intégration de Java Quick Starter (JQS)
    • Un service Windows (XP/2000) permet de précharger dans le cache disque de l'OS des fichiers les plus utilisés par la JRE, afin de permettre un démarrage à froid plus rapide.
    • Next Generation Java Plug-in
      • Ce plug-in, pour Internet explorer et Firefox 3, permet notamment de démarrer une applet depuis un fichier JNLP de la même manière qu'une application Java Web Start et d'améliorer la communication entre javascript et java (détection de version, téléchargement de la JRE…).
      • Java Kernel
        • Distribution allégée de la JRE, puis téléchargement à la demande des dépendances selon les applications chargées, pour permettre une réduction du temps de téléchargement et d'exécution initiale de la JVM.
        • Possibilité de mettre à jour une même version majeure de la JRE, pour éviter la multiplication des installations et réduire les téléchargements.
        • Réécriture de l'accélération Direct3D pour la plateforme Microsoft Windows, qui est désormais activée par défaut.
        • Java DB 10.4 est dorénavant inclus dans la JRE.
        • Nouveau Look & Feel Nimbus utilisant des graphiques 2D vectoriels à la place de bitmaps pour les composants permettant de mieux gérer le redimensionnement.

La
liste complète des fonctionnalités sur le site de Sun.

JavaTM SE 6 Update Release Notes


Sun's Danny Coward on the Latest Java Update.

Diagnostic d'une JVM à distance
Développer une application Java, c'est bien. La rendre performante, c'est mieux.
Cependant, qui dit "performance", dit "mesure". En effet, il est nécessaire de pouvoir :
connaître les paramètres de lancement de la JVM, mesurer l'empreinte mémoire et le comportement du Garbage Collector, Cet article va décrire dans une première partie les différents outils permettant de collecter ces informations en local. La seconde partie se concentre sur les moyens pour obtenir ces mêmes informations à distance.

Creating a NotifyingBlockingThreadPoolExecutor
A Thread Pool is a useful tool for performing a collection of tasks in parallel. This becomes more and more relevant as CPUs introduce multi-core architectures that can benefit from parallelizing our programs. Java 5 introduced this framework as part of the new concurrency support, with the ThreadPoolExecutor class and other assisting classes. The ThreadPoolExecutor framework is powerful yet flexible enough, allowing user-specific configurations and providing relevant hooks and saturation strategies to deal with a full queue. To best follow this article, you may find it useful to open the ThreadPoolExecutor Java API in a parallel tab.


Enumérations - Utilisation avancée
Avant l'arrivée des énumérations, deux principaux choix s'offraient à vous pour effectuer des
énumérations : les constantes et les classes de type N-gleton. C'était au développeur de choisir,
selon le contexte, quelle solution semblait la plus adaptée à son problème.

Au premier abord, il est tentant de comparer les énumérations java avec ceux des autres
langages. Elles sont bien plus puissantes que dans la plupart des autres langages. Là où C / C++ ou C# se contentent de traiter les énumérations comme une suite de nombres entiers, les enum Java se comportent comme de vraies classes. On peut tout à fait les comparer au N-gleton que nous venons de développer dans l'exemple précédent possédant un certain nombre de propriétés implicites.


Singleton in Java - the proper way
Update after some comments: this post is not a discussion whether to use Singleton or not. It's not a discussion on why Singleton might be an anti-pattern. It's just an example on alternative implementation of Singleton in Java. Just that.