samedi 28 juillet 2012

Veille technologique semaine 30

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • sortie de la version 7.2 de NetBeans avec des amélioration des performances, l'intégration du builder d'interface pour JavaFX et des nouvelles fonctionnalités d'analyse statique du code.
  • La participation de Twitter au développement d'OpenJDK, la version open sources de Java qui est la base du JDK 7.
  • Un article de fond au sujet de l'architecture logiciel et les frameworks : qui doit influencer l'autre ?
  • L'annonce d'Oracle de différer le projet Jigsaw de modularisation dans le JDK 9 (2015). La polémique commence.
  • La programmation concurrente avec les types atomiques du standard C++ 2011.
  • Des mesures de performances de la programmation concurrente du standard C++ 2011.
  • La sérialisation en Java avec les performances du C++ : c'est possible.
  • Un tutorial sur la généricité en Java, pour les débutants.
Bonne lecture.


NetBeans IDE 7.2: Smarter & Faster
NetBeans IDE 7.2 is alive! The NetBeans IDE 7.2 release comes with significantly improved performance and many new features in the Java Editor, with a special focus on FindBugs integration, providing new static code analysis capabilities.


NetBeans IDE 7.2 Available for Download
NetBeans IDE 7.2 provides significantly improved performance and an enhanced coding experience, with new static code analysis capabilities in the Java Editor and smarter project scanning.


The Importance of Twitter’s Participation in OpenJDK
Twitter has announced they’ve signed the Contributor Agreement for OpenJDK and plan to be active participants. Also, they announced that they’ve joined the JCP.
As an ecosystem guy, I find the fact that Twitter signaled their participation to be very important. It’s not because of their very cool and popular brand, or that they’re loaded with engineers with world class reputations, or that they’re running one of the fastest growing and massively scaled software projects on the planet (although, those all certainly are nice). From my perspective, it’s the fact they’re not an ISV*. They do not generate product revenue by selling software licenses. If OpenJDK were just and only about the Oracle/IBM/SAP’s of the world, plus individuals who sell consultancy hours, or to further academic research, based on their close participation, then I think OpenJDK would eventually suffer for it.


Debate: The Annoying Detail
Uncle Bob and Simon Brown debate on the infrastructure’s role in drawing a system’s architecture.
In an earlier post entitled Screaming Architecture, Robert Martin (a.k.a. Uncle Bob) drove home the point that the architecture of a software product should make it obvious for everyone what purposes that product is supposed to serve, adding that
the architecture of a system is supposed to reflect the use cases of that system and not the frameworks it uses.


Jigsaw a (encore) raté le train
Dans un mail à l’Expert Group du JDK 8, Mark Reinhold vient de proposer le report du projet Jigsaw à Java 9.


Reprenons du début: l’idée d’un système modulaire pour Java remonte à 2005 (!) avec la JSR 277 et ses fichiers « .jam ». Celle-ci, peut-être pas assez réfléchie, rencontra une vive opposition, fut mise en suspens puis remplacée par les « Superpackages » de laJSR 294, initiée en 2007 puis remplacée à son tour par le projet Jigsaw, dont l’idée a germé en 2008. Mais ce projet emblématique connaît depuis un avenir en dents de scie: initialement prévu pour Java 7, puis décalé vers Java 8 à la faveur du «Plan B», il est aujourd’hui de nouveau reporté.
Or le besoin de modularité devient de nos jours critique, comme le démontre le succès de Maven et d’OSGi. Le JDK monolithique actuel devra tôt ou tard subir ce – douloureux? – lifting, notamment afin de:

1.        Faciliter la construction, la maintenance et la distribution d’applications de plus en plus larges, ayant de plus en plus de dépendances;
2.        Permettre des configurations adaptées à des environnements hétérogènes, du serveur d’application au smartphone;
3.        Permettre de meilleurs performances à l’exécution et une empreinte mémoire optimisée;
4.        Régler définitivement le problème du JAR hell (différentes versions d’une même classe dans le classpath).


Seulement voilà, tous s’accordent sur le but, mais beaucoup reculent devant l’ampleur de la tâche: il s’agit ni plus ni moins que du remplacement du bon vieux classpath par un système de modules versionnés assorti d’un mécanisme de résolution de dépendances, le tout s’inspirant de quelques exemples réussis, comme les librairies partagées UNIX, OSGi ou encore Maven. Sans oublier la rétro-compatibilité!
Pourtant dans son blog, Mark Reinhold énumère les progrès accomplis jusqu’à présent: Jigsaw dispose de spécifications détaillées, d’un design initial détaillant la syntaxe de déclaration d’un module, et même d’un prototype. Mais il restait encore des points d’achoppement. En particulier:

1.        La modularisation du coeur même de Java, tout en gardant la rétro-compatibilité totale, est particulièrement ardue; InfoQ mentionne à ce titre les références circulaires entre certains packages comme java.lang, java.io, java.net ou encore l’exemple de java.beans.Beans#instantiate(), qui dépend d’AWT.
2.        Le support des « conteneurs » comme les IDE, serveurs d’applications et conteneurs d’applets est loin d’être abouti, en raison notamment de la délicate gestion du multi-versionnage (plusieurs composants chargés par le conteneur référençant des versions différentes d’un même module).


Mark Reinhold s’est ainsi retrouvé face à un choix cornélien: ajourner tout Java 8 pour permettre à Jigsaw de finir le travail et notamment la nécessaire phase de tests et de retours d’expérience, ou bien releaser Java 8 à temps, sans Jigsaw. C’est la deuxième option qui a été retenue, notamment afin de permettre à Java d’être désormais livré tous les deux ans, à la fin de l’été. Ne seront embarqués que les développements terminés, mais il n’est plus question de repousser les versions.


Alexis Moussine-Pouchkine a réagi vivement à cette annonce et n’hésite pas à parler de « débâcle »: Oracle ne mobiliserait pas toutes les ressources possibles sur le projet. Il déclare même qu’une telle décision risque d’être fatale à Jigsaw car elle encouragera les projets alternatifs, et conteste au passage l’idée d’une release bisannuelle, rythme selon lui trop lent « dans un monde où rester sur place est synonyme de fossilisation ». Et pourquoi ne serait-il pas possible de couper le projet en deux : l’ajout d’un vrai système de modularisation à Java d’une part, et la modularisation de la plateforme elle-même d’autre part ?


Les yeux se sont aussi tournés, non sans malice, vers la communauté OSGi, que l’on soupçonne de se délecter encore et encore des échecs de Sun/Oracle pour proposer une alternative viable à ce standard de facto. Dans ce contexte, Neil Bartlett, auteur de OSGi in Practice, a également réagi au report de Jigsaw. Selon lui, il ne faut pas (trop) s’en réjouir car les deux projets, bien que souvent présentés comme compétiteurs, seraient en vérité plutôt complémentaires: en gros, Jigsaw se placera au coeur de la JRE, sera chargé en même temps que la JVM, et effectuera des bindings statiques – tout le contraire d’OSGi. De plus, avec son lourd rt.jar, le coeur de la JRE, comme évoqué plus haut, est un écheveau inextriquable de dépendances: même OSGi gagnerait à ce que Jigsaw y mette un peu d’ordre, notamment pour pouvoir traiter le namespace java.* comme un namespace parmi d’autres. Rappelons d’ailleurs que le Projet Penrose a été créé dans le but d’explorer les interactions entre Jigsaw et OSGi, et a marqué un virage positif dans les rapports qu’entretenaient jusque-là l’OSGi Alliance et le JCP.


Evidemment, tout cela nous fait redouter un Java 8 vidé de toute substance. Tant que le Projet Lambda (JSR 335) est présent, diront certains, tout n’est pas perdu. Moins médiatisés, les projets Date and Time API (JSR 310) et Annotations on Java Types (JSR 308) apportent eux aussi leurs lots de contributions substantielles.


Project Jigsaw: Late for the train
The aim of Pro!ject Jig!saw is to design and implement a standard module system for the Java SE Plat!form, and to apply that system to the Platform itself and to the JDK.
Jigsaw is currently slated for Java 8. The proposed development sched!ule for Java 8 expects work on major fea!tures to be finished by May 2013, in preparation for a final release around September. Steady progress is being made, but some significant technical challenges remain. There is, more importantly, not enough time left for the broad evalulation, review, and feedback which such a profound change to the Plat!form demands.
I therefore propose to defer Project Jigsaw to the next release, Java 9. In order to increase the predictability of all future Java SE releases, I further propose to aim explicitly for a regular two-year release cycle going forward.


Thoughts on the Jigsaw debacle
Disclaimer: this is a personal piece of opinion and in absolutely no way does it necessarily reflect the views of my current employer. I have spent 13 years at Sun/Oracle (5 of which in the GlassFish team which had a modularity experience of its own) and I still care very much about the future of Java. I now work at Google.


Jigsaw Deferred until Java SE 9 
Mark Reinhold, chief architect of the Java Platform Group, announced on his blog that proposal of adding a module system, and modularizing the JDK, is deferred to Java SE 9.
Despite being a difficult decision to make, doing so allows more focus to be given on the module system in order to get it right, without having to delay the release of Java SE 8, scheduled for just over a year's time in August 2013.
The decision is reminiscent of the well executed plan laid in 2010 for Plan B, which deferred the addition of Lambdas (aka JSR 335) until after JDK7 was released. This allowed JDK7 to be released around a year ago (July 2011), some four and a half years after the prior JDK6 released.


C++11 Concurrency Tutorial – Part 4: Atomic Types
In the previous article, we saw advanced techniques about mutexes. In this post, we will continue to work on mutexes with more advanced techniques. We will also study another concurrency technique of the C++11 Concurrency Library: Atomic Types


C++11 Synchronization Benchmark
In the previous parts of this serie, we saw some C++11 Synchronization techniques: locks,
lock guards and atomic references. In this small post, I will present the results of a little benchmark I did run to compare the different techniques. In this benchmark, the critical section is a single increment to an
integer. 

The critical section is protected using three techniques:
  • A single std::mutex with calls to lock() and unlock()
  • A single std::mutex locked with std::lock_guard
  • An atomic reference on the integer

Native C/C++ Like Performance For Java Object Serialisation
Do you ever wish you could turn a Java object into a stream of bytes as fast as it can be done in a native language like C++? If you use standard Java Serialization you could be disappointed with the performance. Java Serialization was designed for a very different purpose than serialising objects as quickly and compactly as possible.
Why do we need fast and compact serialisation? Many of our systems are distributed and we need to communicate by passing state between processes efficiently. This state lives inside our objects. I've profiled many systems and often a large part of the cost is the serialisation of this state to-and-from byte buffers. I've seen a significant range of protocols and mechanisms used to achieve this. At one end of the spectrum are the easy to use but inefficient protocols likes Java Serialisation, XML and JSON. At the other end of this spectrum are the binary protocols that can be very fast and efficient but they require a deeper understanding and skill.


10 points about generics in java – Tutorial Example
Generics Java Example Tutorial I have read many articles and tutorials on generics in java some of them are quite good and detailed but I still felt that those are either too much technical or exhaustively detailed, so I thought to write a simple yet informative article on generics in Java to give a head start to beginners without bothering there head too much. In this java generics tutorial I will cover How Generics works in Java, Mysterious wild-cards in Generics and some important points about generics in Java. I won't go in too much detail instead I will try explaining generics concept in simple words. 

mardi 24 juillet 2012

Veille technologique semaine 28

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • Microsoft et le multi-touch
  • La loi de Conway : l'architecture logicielle finie toujours par refléter l'organisation industrielle. C'est une pathologie.
  • Android 4.1 : à vos smartphones et tablettes.
  • Mise à jour de la spécification des expressions lambda pour Java : JSR 335
  • Un type de transistor plus rapide que ceux basés sur le silicium.
  • Sortie du COTS DataNucleus en version 3.1. COTS de persistances pour Java compatible JDO (Java Data Object) et JPA (Java Persistance API).
  • Le futur du COTS de test d'IHM : FEST.
  • C# : en manque d'idée pour la version 5 ?
  • Un exemple d'utilisation des modules du JDK 8 : définition et utilisation d'un service.
Bonne lecture.


Microsoft : l'amour du risque
Microsoft enfonce une nouvelle fois le clou : la vedette de sa Worldwide Partner
Conference (WPC) est un nouveau produit matériel. Il s'agit d'un écran multitouch de 82" qui de l'aveu de Steve Ballmer pourrait faire un tabac dans les grandes entreprises et dans le milieu de l'éducation. Une annonce qui pourrait paraître anecdotique, mais qui est en fait très révélatrice.


Architecture and Conway's Law
"…organizations which design systems … are constrained to produce
designs which are copies of the communication structures of these
organizations."
—Melvin Conway


Android 4.1: Open Sourced with UI, Connectivity, Services and Tools Improvements
The recently open sourced Android 4.1, aka Jelly Bean, comes with several UI, connectivity, services and SDK enhancements, including: smoother UI, better HTML5 rendering, cloud messaging, performance and debugging tools.


JSR 335: Lambda Expressions for the Java Programming Language
Part A: Functional Interfaces: Provides a definition of functional interfaces, which lambda expressions and method references can be used to instantiate.
Part B: Lambda Expressions: Defines the syntax of lambda expressions, including rules for the new kinds of parameter lists and statement lists.
Part C: Method and Constructor References: Defines the syntax of method and constructor references.
Part D: Poly Expressions: Describes poly expressions, which are a category of expressions that can adapt their typing to conform to a particular context.
Part E: Typing and Evaluation: Specifies the typing rules and evaluation behavior of lambda expressions, method references, and constructor references.
Part F: Type Inference: Redefines type inference to support lambda expressions, method references, and constructor references, and to allow context to be pushed down to nested poly expressions.
Part G: Default Methods: Describes the syntax and inheritance behavior of default methods, which are members of interfaces. Adapts the VM specification to support code-carrying methods in interfaces.


High-performance graphene transistors made using sticky tape
Graphene could be a useful material for high-performance transistors because it carries electrons faster than silicon.


DataNucleus
Almost a year from the release of version 3.0 and we move close to the release of version 3.1 (due late in July 2012). So what has changed in that time ?


The Future of Fest
'm very excited to be working on FEST again! It has been more than a year since my last commit and there is a lot of catch up for me to do.
I have put together a plan for the project and myself, which I'm going to share with
the rest of the team. The plan is the following:


Eric Lippert Reviews C# and Speculates on its Future
O'Reilly's Rachel Rouemeliotis recently spoke with Eric Lippert, Principal Software Design Engineer on Microsoft's C# Compiler Team. The conversation covered a number of topics and provided Lippert's brief summary of the C# world. This discussion prompted InfoQ to contact Lippert to provide greater context for his comments leading to a thoughtful analysis of the language's design philosophy.


Modular services with OpenJDK Jigsaw and Guice
This blog entry describes an experiment exploring the connection between Java modules and services in OpenJDK Jigsaw and the dependency injection framework Guice.
Modular services in Jigsaw define a very simple way to bind a (service) interface to implementations (service provider classes) and, using java.util.ServiceLoader, a way to iterate through all (service) instances of implementations bound to an interface.

samedi 7 juillet 2012

Veille technologique semaine 27

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • Le fondateur du framework Spring quitte la société qu'il a créée et part vers de nouvelle aventure.
  • Arret du minitel : imaginer FaceBook sur le minitel.
  • Sortie de la version 2 du langage Groovy : typage statique, compilation statique, modularité et performances.
  • Les développeurs seniors : la pénurie dans les équipes. A qui la faute ?
  • Une comparaison détaillées des expressions lambda du JDK 8 et Scala.
  • Un résumé de la spécification Java Enterprise Edition 7 : prévue pour début 2013. Le cloud, le cloud et le cloud.
  • L'état du langage Java d'après Oracle.
  • Le langage Xtend propose d'étendre le langage Java.
  • JavaFX : les ombrages dynamiques. Exemple de code

Bonne lecture.


Spring Founder Moves On To New Adventures
Yesterday, Rod Johnson, the founder of Spring, announced that he is to leave
VMWare to pursue some new interests. In 2001, Rod changed the way we look at enterprise software when he published Expert One-on-One J2EE Design and Development.
And he followed through with those ideas in 2002 when he founded Spring,
bringing a credible alternative to the enterpise solutions available at the time.



Minitel, France's precursor to the Web, to go dark on June 30
Minitels like this one are set to go dark at the end of this week.

Facebook as re-imagined on Minitel :


Groovy 2.0 est là !
La nouvelle mouture du langage Groovy‬, la 2.0, est enfin livrée dans sa version définitive au public (comme par hasard, le jour de l'anniversaire de son project leader : Guillaume Laforge). Les améliorations les plus importantes sont :
  • le static type checking : apparition d'une annotation @TypeChecked pour avoir des erreurs de compilation (plutôt que de runtime) sur des choses comme des variables ou méthodes inexistantes, des assignements de types incorrect, etc.
  • la compilation statique : nouvelle annotation @CompileStatic pour obtenir de la compilation static et ainsi avoir un bytecode identique à celui produit par un javac sur un code Java, et aussi rapide à exécuter.
  • la modularisation : pour ne charger que ce dont vous avez besoin, le coeur de Groovy est deux fois plus léger, et 15 modules l'accompagnent : Console, JMX, Ant, Swing, etc.
  • de meilleures performances : notamment grâce au support de invokeDynamic pour les utilisateurs du JDK7, et beaucoup de travail a été fourni pour que les utilisateurs du JDK6 aussi y trouvent leur compte.
Pour plus de détails :
S'il en était encore besoin, la preuve de la vivacité de l'écosystème Groovy a été apportée ce mois-ci (mois de la GR8Conf) : les projets Groovy‬, Gaelyk, Griffon et Gradle‬ ont chacun livré une version majeure.
Pour les pratiquants, la mise à jour s'imposera d'elle même. Pour ceux qui n'ont pas encore testé,vraiment vous devriez!


What's new in Groovy 2.0? 
The newly released Groovy 2.0 brings key static features to the language with static type checking and static compilation, adopts JDK 7 related improvements with Project Coin syntax enhancements and the support of the new "invoke dynamic" JVM instruction, and becomes more modular than before. In
this article, we're going to look into those new features in more detail.


Pénurie de seniors dans les équipes de développement
Maître Yoda dans ton équipe, plus forte elle sera Après plusieurs années passées à développer, concevoir et architecturer des applications, les développeurs les plus expérimentés, dits seniors, sont souvent propulsés à des postes décisionnels et/ou organisationnels.
En France, ce phénomène est tel que l'écosystème des développeurs informatique manque cruellement de ces profils. Bien que les mentalités commencent à évoluer, la réalité sur les projets est toute autre. Les applications sont mises entre les mains de profils juniors ou confirmés possédant moins d'expérience que leurs aînés, notamment dans la gestion de la dette technique. Dans ce domaine, les seniors possèdent plus de recul, de savoir faire et il est nécessaire que ces derniers continuent d'accompagner les équipes de développement. Nous vous proposons d'analyser ce phénomène.
Juniors, Confirmés, Seniors, …


Java 8 vs Scala: a Feature Comparison
With the release of JDK 8 planned for 2013, Oracle has a pretty fixed idea of what will be included.
Speaking at QCon London earlier this year, Simon Ritter outlined the new features that will be part of JDK 8, which include modularity (Project Jigsaw), JRockit/Hotspot convergence, annotations on types, and Project Lambda.


The Java EE 7 Feature List: Cloud Focused Upgrades
When it arrives later this year, Java EE 7 will offer key new features related to cloud computing.
by Manoj Debnath Java EE 7, under the specification of JSR342, is expected to be released in mid-late 2012. Anticipation of the update's platform as a service (PaaS) capabilities is looming large among technological enthusiasts. With a promise of numerous key improvements, the focus will be on the suitability of Java EE for cloud environments. This article spotlights key things to look for in Java EE 7.
Spotlights in Java EE 7


Status of Java


Xtend Extends Java
Together with the release of Eclipse Juno, the Eclipse Foundation is proud to announce the release of Xtend,
a Java-compatible language with lambdas and yet full compatibility with the Java runtime. Xtend is built
upon Xtext, a suite of DSL libraries and plugins for generating editors.
Unlike Scala, Ceylon or Kotlin, Xtend doesn't need its own separate bytecode compiler. Instead, Xtend source
files are translated into Java source files, which are then compiled with the regular Java compiler. As a result,
Xtend can be used as a development time translation tool that generates Java for use in a standard Java
project, or it can be used as source models that are used to generate Java source files at compilation time.


JavaFX recipes "Dynamic shadows"
This is the first blogpost of a series about JavaFX related tips and tricks that I came across.
Today I would like to explain how to add a dynamic shadow to a node. So first of all let me tell you what I mean with dynamic shadow. If you take a dial with some kind of pointer it will definitely look better when the pointer has a drop shadow. As an example let me show you two radial gauges.