vendredi 27 mai 2011

Veille technologique semaine 21

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • Un article sur le futur du Web selon Gartner.
  • YouTube a six ans : quelques statistiques.
  • Sortie de l'outil IDE (Integrated Developement Environement) compatible du JDK 7
  • Sortie de JavaFX 2.0 en version béta : première version majeur 100% compatible avec tout les langages JVM : Java, JRuby, Groovy, Scala, ... C'est une évolution majeur pour les IHM en Java, avec des possibilités de nouvelles ergonomies intégrable dans une IHM Java extistant. Certains considèrent que JavaFX correspond à Swing 2.0, qui serait le remplacement de Swing actuel. Oracle propose de mettre
  • Un article au sujet de la modularisation pour le JDK 8 : le leader de la spécification Mark Reinhold propose de (re-)commencer le travail de cette spécification.
  • Un exemple de code Java avec le mot clé "final" :

    public static void main(String[] args) {
      final int s1 = 6;
            int s2 = 6;
      System.out.println(false ? s1 : 'X');
      System.out.println(false ? s2 : 'X');
    }


    Quel est le résultat imprimé ? Réponse et explication dans l'article.
  • Langage Java : quel est la conséquence d'une classe non static interne à une autre classe.
Bonne lecture.



The Future of the Web as Seen by Gartner
Gene Phifer, Managing VP in Gartner Research, and David Mitchell Smith, VP and Fellow in Gartner Research, recently held a webinar entitled How Web and Cloud Computing Will Drive Your IT Strategy (registration required), outlining some of the key characteristics of the future web as seen by Gartner, concluding with a number of recommendation for businesses that want to be prepared.

Smith divided the history of the web in 3 periods:
  • Web 1.0 (1989-2003) – HTML on top of HTTP – consumed by humans, mostly readers and a few authors
  • Web 2.0 (2004-2010) – Web 1.0 + AJAX, XML – consumed by humans and machines with many readers and authors
  • Modern Web (2011-) – Web 2.0 + HTML5 – includes mobile, cloud computing, real-time

The Future or the Modern Web has several characteristics, according to Phiper :


YouTube : six ans et quelques statistiques
YouTube fête ses six ans : créé en février 2005, le site n'a été lancé qu'en mai de la même année. Google, qui a acheté la société un peu plus d'un an plus tard, profite de l'occasion pour donner quelques statistiques sur son service.


JetBrains Release IntelliJ IDEA 10.5 With Full Java 7 Support
Since version 10.0 IntelliJ IDEA has been offered in two versions, a free open-source "Community Edition" and an expanded commercial offering called the "Ultimate Edition".
As well as Java 7 support a number of other new features have been added to the Community Edition: The latest versions of Android SDK are supported, including Honeycomb; XSLT 2 support has been added; and the Groovy capabilities have been updated with new refactorings such as Introduce Field, and Groovy 1.8 support.

Updates in the Ultimate Edition include:
  • Spring 3.1 support and Spring Roo console
  • Bundled Jetty integration
  • Google Chrome support in the JavaScript debugger

JavaFX 2.0 Beta Now Available
The much-anticipated JavaFX 2.0 beta release is now available for download—which means you can take advantage of all the new benefits that JavaFX 2.0 brings to the Java platform. This release is the latest development in Oracle's long-term commitment (roadmap) to making JavaFX a premier rich client platform.

JavaFX provides a powerful and expressive Java-based UI platform capable of handling large-scale computationally intensive data-driven business applications. JavaFX applications are completely developed in Java while leveraging the power of standards-based programming practices and design patterns. JavaFX provides a rich set of UI controls, graphics and media API with high-performance hardware-accelerated graphics, web and media engines to simplify development of immersive visual applications. JavaFX developers can preserve existing investments by reusing Java libraries in their JavaFX applications. They can even access native system capabilities via the Java native interface, or seamlessly connect to server-based Java EE middleware applications.

JavaFX 2.0 Beta is now available for download from javafx.com. Please help us make JavaFX successful by testing it at an early stage and
report any issues you encounter. For detailed tutorials and API documentation, see http://download.oracle.com/javafx.


What Is JavaFX?
The JavaFX platform is the evolution of the Java client platform designed to enable application developers to easily create and deploy rich internet applications (RIAs) that behave consistently across multiple platforms. Built on Java technology, the JavaFX platform provides a rich set of graphics and media API with high-performance hardware-accelerated graphics and media engines that simplify development of data-driven enterprise client applications.
Investing in the JavaFX platform provides the following advantages to Java developers and companies that are part of the Java ecosystem:
Because the JavaFX platform is written in Java, Java developers can leverage their existing skills and tools to develop JavaFX applications. Because Java is widely used, it is easy to find experienced Java developers who can quickly become productive building JavaFX applications.
By using a homogenous set of Java technologies for both the server and the client platforms, the JavaFX platform reduces the risk of investment by reducing the complexity of the business solutions. Development costs are also reduced because of the aforementioned advantages. The JavaFX platform provides developers with a development framework and runtime environment to create enterprise and business applications that run across multiple platforms that support Java. See the JavaFX Architecture and Framework document to learn about the JavaFX platform's architecture and key concepts.


JavaFX Architecture and Framework
The JavaFX 2.0 platform is a rich client platform built on Java technology and designed to enable application developers to easily create and deploy rich Internet applications (RIAs) that behave consistently across platforms. See the What is JavaFX document for a summary of what JavaFX 2.0 has to offer.
Figure 1 illustrates the architectural components of the JavaFX 2.0 platform. The sections following the diagram describe each component and how the parts interconnect. Below the JavaFX public APIs lies the engine that runs your JavaFX code. It is composed of subcomponents that include the new JavaFX high performance graphics engine, called Prism; the new small and efficient windowing system, called Glass; a media engine, and a web engine. Although these components are not exposed publicly, their descriptions can help you to better understand what runs a JavaFX application.


JavaFX 2.0
JavaFX 2.0 Beta is the latest major update release for JavaFX. Many of the new features introduced in JavaFX 2.0 Beta are incompatible with JavaFX 1.3. If you are developing a new application in JavaFX, it is recommended that you start with JavaFX 2.0 Beta.

JavaFX 2.0 : Frequently Asked Questions
1. What is new in JavaFX 2.0?
2. Why should I choose JavaFX to develop applications?
3. What kind of applications can be built with JavaFX?
4. What is the relationship between JavaFX and the JRE?
5. What operating systems are supported by JavaFX?
6. Is JavaFX replacing Swing as the new client UI library for Java SE?
7. Does JavaFX provide support for audio and video codecs?
8. Does JavaFX 2.0 support JavaFX Script?
9. Will previous versions of JavaFX remain available?
10. What licensing model will JavaFX 2.0 be available under?
11. How do I submit a bug report or request a feature?


Requirements of a Standard Java Module System
Yesterday, Mark Reinhold posted the first public draft of the future of modularity in Java. Unlike the previous iterations of JSR294, the discussions of modularity in Java have taken place outside of Sun/Oracle's closed doors and involved others with a stake in OpenJDK, such as IBM and other members of the Java SE and Java EE communities, as explained in Mark's blog post on the subject.
As it is a draft there are a handful of issues that still need to be agreed on but it represents the consensus of what modularity in Java should look like. And with IBM being involved, there's more emphasis on interoperability with OSGi than there has been in the past.


Final : le mot clef qui évite les surprises
Titre : un bytecode peut en cacher un autre
Dans notre équipe, nous mettons les variables à final par défaut. C'est la règle "immutable par défaut" de "Java concurrency in practice" : final offre une forme d'atomicité que des langages fonctionnel comme Haskell ou Erlang systématisent (scala fournit le mot-clé val) et qui évite des problèmes de concurrence. J'ai découvert une autre raison d'utiliser final, l'opérateur ternaire  " exp ? si vrai : si faux "
Voyons une manifestation paranormale du phénomène :



Reassigning the outer class reference
Everyone knows (or should) that a non-static inner classe has a hidden reference to the instance of its containing class.
Let's exercise this sample class :

vendredi 20 mai 2011

Veille technologique semaine 20

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • un résumé sur le transistor en 3D annoncé par Intel : le Transistor MOS 3D Tri-Gate
  • l'externalisation du système d'information : le cloud et la DSI
  • sortie de la version 7 de NetBeans avec le support du JDK 7.
  • Une métaphore du Model Driven Engineering
  • Trois articles sur la programmation concurrente : the free lunch is over : la prochaine révolution dans l'informatique : la programmation concurrent (multi- tâche) natif dans les langages de programmation.
    La sortie de la version scala 2.9 qui propose des collections où un ensemble d'opérations (itération, recherche, ...) sont multitâches (multi-threadées).
  • Deux article sur la sérialisation Java : derrière la scène et sans Sérialisable.

Bonne lecture.


Transistor MOS 3D Tri-Gate : Intel ajoute la 3D aux processeurs
Intel dévoile un nouveau type de transistor Metal Oxide Semiconductor, qui fait l'effet d'une bombe : 3D Tri-Gate vise des performances plus élevées pour un coût à peine supérieur au transistor MOS classique.


Faut il avoir peur du Cloud ? Il semblerait que oui…
Le Cloud Computing est une lame de fond inévitable tant il offre d'opportunités pour les entreprises : élasticité, paiement à la consommation, externalisation de la « plomberie informatique », etc. Il provoque cependant d'importantes remises en cause et craintes au sein de leurs DSI.


Oracle Announces NetBeans IDE 7.0 with Support for JDK 7 Developer Preview
Allowing users to take advantage of latest developments in Java Platform, Standard Edition (Java SE), NetBeans IDE 7.0 introduces language support for development to the upcoming JDK 7 release, currently available as a Developer Preview. Additional enhancements include new support for GlassFish Server Open Source Edition 3.1 and Oracle GlassFish Server 3.1 and full integration of Oracle WebLogic Server. New support for Oracle Database is included, as well as Apache Maven 3 and HTML5 editing support, and enhancements to the Java editor. In addition, an improved and far more intuitive GridBagLayout visual designer has been integrated for Swing GUI development.


A metaphor for Model Driven Engineering
A couple of weeks ago I wrote an article introducing a framework for Model-Driven SOA. This article doesn't stand on its own, it's based on earlier pieces on Model-Driven SOA and observations that Model-Driven Engineering should focus on the problem domain. However, I'm noticing that these articles can be hard to grasp if you have no background knowledge. That's why I want to explain Model-Driven Engineering using a simple metaphor I often use in my presentations.


The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software
The biggest sea change in software development since the OO revolution is knocking at the door, and its name is Concurrency. This article appeared in Dr. Dobb's Journal, 30(3), March 2005. A much briefer version under the title "The Concurrency Revolution" appeared in C/C++ Users Journal, 23(2), February 2005.


Getting Started with Parallel Programming
Multi-core computers have shifted the burden of software performance from chip designers to software architects and developers. In order to gain the full benefits of this new hardware, we need to parallelize our code. The goal of this article is to introduce you to parallelism, its different types and to help you understand when to parallelize your code - and when not to. We will also examine some of the tool options developers have today for building parallel applications.
Introduction to parallelism


Scala 2.9.0 Introduces Parallel Collections
Together with last week's announcement of the new Scala company Typesafe, the latest major version 2.9.0 of Scala was released. Compared to last years Scala 2.8 release, 2.9 contains a much smaller amount of new features and concentrated on improvements and bug fixes of existing ones. The primary new feature of Scala 2.9 are the parallel collections, which are built on the same abstractions and provide the same interfaces as the existing collection implementations.
From the release notes:
Every collection may be converted into a corresponding parallel collection with the new `par` method. Parallel collections utilize multicore processors by implementing bulk operations such as `foreach`, `map`, `filter` etc. in parallel.


Behind the Scenes of Serialization in Java
When building distributed applications one of the central performance-critical components is serialization. Most modern frameworks make it very easy to send data over the wire. In many cases you don't see at all what is going on behind the
scenes. Choosing the right serialization strategy however is central for achieving good performance and scalability. Serialization problems affect CPU, memory, network load and response times.


Sérialiser des objets non sérialisables
Le mécanisme de sérialisation de Java permet de compresser un graphe d'objets sous une forme compacte, transportable hors de la JVM, puis de reconstituer ces objets en mémoire - à condition qu'ils implementent Serializable.
Dans cet article, je vous propose de découvrir et de tirer parti de certaines options méconnues pour sérialiser des objets n'implémentant pas Serializable - et sans même les modifier !

vendredi 6 mai 2011

Veille technologique semaine 18

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • Intel annonce la création d'un transistor en 3D en 22 nm : réduction de la consommation et augmentation de la fréquence d'utilisation.
  • Tous les navigateurs web intègrent un compilateur Just In Time (JIT) pour améliorer les performances de JavaScript des pages HTML. C'est le cas de Firefox avec IonMonkey.
  • Un outil de qualimétrie : Sonar 2.7 : cette version apporte la gestion de la dette technique.
  • Un article sur la séparation des préoccupations dans la construction d'une architecture logicielle : c'est une synthèse de différents types de préoccupations.
  • Trois articles sur Groovy 1.8 et les compléments de ce langage compatible Java.
  • La classe Void en Java : pour quel usage.
Bonne lecture.

Intel Reinvents Transistors Using New 3-D Structure
New Transistors for 22 Nanometer Chips Have an Unprecedented Combination of Power Savings and Performance Gains.

Intel announces a major technical breakthrough and historic innovation in microprocessors: the world's first 3-D transistors, called Tri-Gate, in a production technology. The transition to 3-D Tri-Gate transistors sustains the pace of  technology advancement, fueling Moore's Law for years to come. An  unprecedented combination of performance improvement and power reduction to enable new innovations across a range of future 22nm-based devices from the smallest handhelds to powerful cloud-based servers. Intel demonstrates a 22nm microprocessor – codenamed "Ivy Bridge" – that will be the first highvolume chip to use 3-D Tri-Gate transistors.


IonMonkey: Mozilla's new JavaScript JIT compiler
IonMonkey is the name of Mozilla's new JavaScript JIT compiler, which aims to enable many new optimizations in the SpiderMonkey JavaScript engine. InfoQ had a small Q&A with Lead Developer David Anderson, about this new development that could bring significant improvements in products that use the SpiderMonkey engine like Firefox, Thunderbird, Adobe Acrobat, MongoDB and more. This new JIT infrastructure, will feature SSA compiler intermediate representations which will facilitate advanced optimizations such as type specialization, function inlining, linear-scan register allocation, dead-code elimination, and loop-invariant code motion.

Main driving forces for IonMonkey are to:
  • Provide a backend that can match or beat the Trace JIT or Crankshaft in speed. Sub-goals:
  • Fine-grained specialization and de-specialization.
  • Integration with type inference.
  • Clean, textbook IR so optimization passes can be separated and pipelined with well-known algorithms.
  • Document and comment well so the implementation and its side effects can be easily understood.
  • Recompilation, debugging, bailouts are all related - and should be solved up-front.
  • First SpiderMonkey JIT that starts off with peer reviews!
  • (Unknown feasibility) Act as a baseline compiler to replace JM2.
  • Manage memory much better, in part to avoid range problems on x64.

Sonar 2.7
The Sonar Team is pleased to announce the release of Sonar 2.7. This version focuses on providing further control on technical debt.
Prior to version 2.5, Sonar was really useful to assess application's technical debt but was not so handy to manage evolution over time. In Sonar 2.5 was added the ability to see metrics evolution and monitor the apparition of new violations over a period of time or since an event.
A similar functionality has now been added with version 2.7 for code coverage by unit tests on new / updated source code. It is now possible to follow what percentage of changed code over a period of time is covered by unit tests.


La séparations des préoccupations
La séparation des préoccupations (en anglais : Separation of Concerns - SoC) est un concept présent depuis de nombreuses années dans l'ingénierie du logiciel. Les différentes préoccupations des concepteurs d'un système à base de logiciel, apparaissent comme les premières motivations pour organiser et décomposer ce système en un ensemble d'éléments compréhensibles et facilement manipulables. La séparation en préoccupations apparaît dans les différentes étapes du cycle de vie du système et sont donc de différents ordres. Il peut s'agir de préoccupations d'ordre fonctionnel (séparations des fonctions du système), technique (séparation des propriétés non fonctionnelles du système), ou encore liées à utilisateur du système (séparation des actions de l'utilisateur du système).
Avec ces séparations, le système n'est plus abordé dans sa globalité, mais par point de vue, par parties. Cette approche réduit la complexité de conception, de réalisation, mais aussi de maintenance d'un système et en améliore la compréhension, la réutilisation et l'évolution. Cette séparation est la motivation d'approches telles que la programmation en couches logicielle ou la programmation par aspects.


Groovy 1.8
Guillaume Laforge, le chef de projet de Groovy, vient d'annoncer sur son blog la sortie de la version 1.8 du célèbre langage de scripting pour la JVM.
Le millésime semble de qualité avec de nombreuses fonctionnalités nouvelles et améliorations – certaines fonctionnalités très populaires ont d'ailleurs été backportées sur la version 1.7. A noter également que, comme le signale Burt Beckwith sur son blog, Grails 1.4 a été mis à jour pour supporter cette nouvelle version.
Nous vous proposons ici un bref aperçu des principales nouveautés; les exemples sont tirés ou inspirés des notes de version, très complètes. Signalons encore une série d'articles publiés très récemment par Mr. Haki sur son blog et qui donnent une description encore plus détaillée de certaines nouveautés de Groovy 1.8.


Command chains for nicer Domain-Specific Languages
Thanks to its flexible syntax and its compile-time and runtime meta-programming capabilities, Groovy is well known for its Domain-Specific Language capabilities. However, we felt that we could improve upon the syntax further by removing additional punctuation symbols when users chain method calls. This allows DSL implementors to develop command descriptions that read almost like natural sentences.
Before Groovy 1.8, we could omit parentheses around the arguments of a method call for top-level statements. But we couldn't chain method calls. The new "command chain" feature allows us to chain such parentheses-free method calls, requiring neither parentheses around arguments, nor dots between the chained calls. The general idea is that a call like a b c d will actually be equivalent to a(b).c(d). This also works with multiple arguments, closure arguments, and even named arguments. Furthermore, such command chains can also appear on the right-hand side of assignments. Let's have a look at some examples supported by this new syntax:


Groovy 1.8 release notes
compile-time meta programming : New AST Transformations
The Groovy compiler reads the source code, builds and Abstract Syntax Tree (AST) from it, and then puts the AST into bytecode. With AST transformations, the programmer can hook into this process. A general description of this process, an exhaustive description of all available transformations, and a guide of how to write you own ones can be found for example in Groovy in Action, 2nd Edition (MEAP), chapter 9. Below is a list of all new transformations that come with Groovy 1.8. They save you from writing repetitive code and help avoiding common errors.



Why does Void class exist in JDK
I always try to bring some thing new and useful on this blog. This time we will understand the Void.class (which in itself looks something tricky) present in rt.jar. One can consider the java.lang.Void class as a wrapper for the keyword void.
Some developers draw the analogy with the primitive data types int, long, short and byte etc. which have the wrapper classes as Integer, Long, Short and Byte receptively. But it should be kept in mind that unlike those wrappers Void class doesn't store a value of type void in itself and hence is not a wrapper in true essence.