vendredi 13 août 2010

Veille technologique semaine 32

Pour le bulletin de la semaine 32, je vous propose les sujets suivants :
  • le site web Last.fm a basé la communication sur le standard JMS : Java Message Service. L'implémentation utilise le produit open source HornetQ de JBoss.
  • Le pattern d'architecture CQRS (Command Query Request Segregation) expliqué par son auteur.
  • Le JSR 308 : annotation type. Prévu pour le JDK 7, un certain nombre de vérification faite à la compilation et à l'exécution comme le @Readonly (alias const) que l'on attend depuis 15 ans en Java, le @Notnull, @Notempty, ... Extrait de la documentation.
  • L'injection de dépendance : la version du framework Spring et la version de Google Guice : les différences et les similitudes
  • Une fiche technique qui résume la technologie de Microsoft pour DotNet : WPF - Windows Presentation Foundation.
  • Les NIO 2 du JDK 7 : les notifications du système de fichiers enfin dans le JDK.
  • Une présentation des langages disponible pour la JVM : Fantom : un résumé et un petit tour de ce langage pas très connu.
  • Trois articles sur les expressions lambda ou closure pour Java 7. L'état des propositions et leur conséquence pour la langage et les API.


Bonne lecture.

L'architecture de Last.fm basée sur le standard JMS (Java Messaging Service) implémenté par HornetQ
Tout le monde connaît Last.fm, le service de streaming et de recommandation de musique. La compagnie a récemment changé son infrastructure de streaming et en a profité pour adopter JBoss HornetQ comme serveur de messaging, au détriment « d'un autre serveur open-source » (mais nous ne saurons pas lequel !). Jeff Mesnil publie sur DZone un article expliquant les raisons de ce changement et la façon dont Last.fm se sert d'HornetQ.
Pour résumer simplement, les messages JMS sont générés principalement par les streamers pour:

  • notifier la fin de l'écoute d'un morceau et donc faire mettre à jour la base.
  • permettre la déconnexion automatique d'un utilisateur connecté à un flux si un message généré par un second streamerindique qu'il vient de se connecter à un autre flux.
Dans sa configuration de HornetQ, Last.fm a mis l'accent sur la performance:
  • la persistance a été désactivée. Comme rapporté par nos lecteurs dans les commentaires d'un précédant article celle-ci est connue pour être consommatrice.
  • messages déclarés comme pré-acquittés, permettant d'éliminer des accès réseau supplémentaires.
Bien sûr tout ceci est fait au détriment de la robustesse. On n'a rien sans rien ! Mais Last.fm préfère perdre des messages plutôt que d'empêcher un auditeur d'écouter sa musique: « Availability was more important than reliable delivery ». Il est à noter que pour renforcer la robustesse, les envois de messages ne sont pas faits n'importe comment: un seul thread s'occupe de la communication JMS. Il communique avec les autres threads en interne par un mécanisme de files, dans lesquelles il puise les messages à envoyer à HornetQ et dépose les messages reçus. Ces files étant limitées en mémoire, cette dernière est donc maîtrisée et comme il y a un seul thread responsable des accès JMS, il n'y a pas de risque de blocage de tout le système.
Pour continuer sur HornetQ, notons que la tant attendue interface REST vient d'être annoncée par Bill Burke, son développeur principal, sur le forum du broker. Cette interface n'est pas encore disponible dans une version officielle de HornetQ, mais sa documentation permet d'ores et déjà de se faire une idée. Basée directement sur HTTP, elle évite de forcer l'utilisation d'une quelconque encapsulation (autre qu'applicative) des messages. Et bien sûr, on peut l'utiliser avec n'importe quel langage: REST est interopérable. La documentation spécifique à la création de messages permet de se faire une idée rapidement. Basée surRestEasy, qui fera aussi partie du futur JBoss AS 6, il y a fort à parier que cette interface fera parler d'elle et ouvrira la voie à de nouvelles utilisations du broker.

Axon, une implémentation Java du pattern CQRS
Le Command Query Request Segregation (CQRS) est un pattern architectural qui a été formalisé fin 2009 par Greg Young et Udi Dahan. Il repose sur l'idée de séparer le code métier selon qu'il s'appuie sur des opérations d'écriture (command) ou de consultation de données (query), plutôt que par découpage fonctionnel. Le but recherché ici est d'offrir une grande scalabilité en permettant aux lectures de s'effectuer de manière synchrone dans un cache, tandis que les requêtes d'écritures sont effectuées de manière asynchrone en mettant à jour à la fois le cache et la base de données sous-jacente.
Les développeurs Java disposent d'une implémentation Open Source de ce pattern, il s'agit du framework Axon (anciennement CQRS4J). Le projet est très actif et vient diffuser une version 0.6 dont la maturité mérite de s'y attarder : gestion et persistance des évènements, intégration à Spring et gestion des transactions.
Ce framework reste modeste pour l'instant et ne couvre qu'un nombre limité d'environnements techniques mais à défaut de répondre à votre besoin il constituera un exemple d'implémentation intéressant à étudier.


Clarified CQRS
After listening how the community has interpreted Command-Query Responsibility Segregation I think that the time has come for some clarification. Some have been tying it together to Event Sourcing. Most have been overlaying their previous layered architecture assumptions on it. Here I hope to identify CQRS itself, and describe in which places it can connect to other patterns.


Type Annotations Specification (JSR 308)
JSR 308 extends Java's annotation system so that annotations may appear on nearly any use of a type. (By  contrast, Java SE 6 permits annotations only on declarations; JSR 308 is backward-compatible and continues to permit those annotations.) Such a generalization removes limitations of Java's annotation system, and it enables new uses of annotations. This proposal also notes a few other possible extensions to annotations.

Examples of type qualifiers
The ability to place annotations on arbitrary occurrences of a type improves the expressiveness of annotations, which
has many benefits for Java programmers. Here we mention just one use that is enabled by extended annotations, namely
the creation of type qualifiers. (Figure 3 gives an example of the use of type qualifiers.)

1 @DefaultQualifier("NonNull")
2 class DAG {
3
4    Set<Edge> edges;
5
6    // ...
7
8    List<Vertex> getNeighbors(@Interned @Readonly Vertex v) @Readonly {
9    List<Vertex> neighbors = new LinkedList<Vertex>();
10      for (Edge e : edges)
11         if (e.from() == v)
12            neighbors.add(e.to());
13      return neighbors;
14      }
15 }

The DAG class, which represents a directed acyclic graph, illustrates how type qualifiers might be written by a programmer and checked by a type-checking plug-in in order to detect or prevent errors.

(1) The @DefaultQualifier("NonNull") annotation indicates that no reference in the DAG class may be null (unless otherwise annotated). It is equivalent to writing as "@NonNull Set<@NonNull Edge>edges;", for example. This guarantees that the uses of edges, cannot cause a null pointer exception. Similarly, the (implicit) @NonNull return type of getNeighbors() enables its clients to depend on the fact that it will always return a List, even if v has no neighbors.

(2) The two @Readonly annotations on method getNeighbors guarantee to clients that the method does not modify, respectively, its Vertex argument or its DAG receiver (including its edges set or any edge in that set).
The lack of a @Readonly annotation on the return value indicates that clients are free to modify the returned List.

(3) The @Interned annotation (along with an @Interned annotation on the return type in the
declaration of Edge.from(), not shown) indicates that the use of object equality (==) is a valid optimization. In the absence of such annotations, use of the equals method is preferred to ==.


Spring vs. Guice: The Clash of the IOC Containers
Spring and Google Guice are two powerful dependency injection frameworks in use today. Both frameworks fully embrace the concepts of dependency injection, but each has its own way of implementing them. Although Spring provides many benefits, it was created in a pre-Java-5 world. The Guice framework takes DI to the next level, leveraging the full power of Java typing, especially annotations and generics. Discover how Guice can make your code more modular, easier to write, and less error prone to maintain.

  • Living in XML Hell
  • Eliminating reliance on String identifiers
  • Preferring Constructor Injection
  • Nullifying NullPointerExceptions
  • Intruding into the domain
  • Replacing Spring verbosity with Guicey compactness
  • Considering other advantages

Windows Presentation Foundation
Windows Presentation Foundation or WPF is a next generation UI framework for creating desktop applications on the Windows Platform. It brings together a number of features and concepts such as a declarative language for constructing interfaces, rich media support, scalable vector graphics, timeline-based animations, sophisticated data binding, and much more.
WPF is a very large topic. The intent of this Refcard is to help you understand the basics of WPF. After we're done you should be able to look at the source of a WPF application and understand what you are seeing. However, in order to effectively use WPF, you will need to continue to learn more though additional and more extensive resources.


Introducing NIO.2 (JSR 203) Part 5: Watch Service and Change Notification
For a long time Java developers used in-house developed solutions to monitor the file system for changes. Some developed general purpose libraries to ease the task for others who deal with the same requirement. Commercial and free/ open source libraries like notify.sourceforge.net, jpathwatch.wordpress.com and www.teamdev.com/jxfilewatcher among others. Java 7 comes with NIO.2 or JSR 203 which provides a native file system watch service.


The Next Big JVM Language talk JavaOne
I'm talking at JavaOne 2010 on the subject of the "Next Big JVM language". I suspect that it might cause some controversey!

Talk
Before writing the talk, I wanted to get some feedback from the community. So, I've got some basic topics and questions I'm looking for feedback on.

1) What makes a language big and popular?
Lots of people have drawn up lists -
Steve Yegge has one (take a look!). But what criteria do you believe make a language big and popular? Static or dynamic? Fast or just fast enough? Lots of features or few? Simple or complex? Does syntax matter? etc. etc.

2) What might be different between a big JVM language and a big language in general (without the JVM restriction)?
Dot NET has several new languages, but they can't be considered. However, if you've seen an interesting idea then thats interesting here.


3) Is it important to reuse existing Java libraries?
Java has a big ecosystem. How important is reusing all those libraries. Or would a fresh start with a new higher quality (less cruft) core library be preferred.


4) What languages should I consider?
I've got Groovy, Scala, Fantom and Clojure on the list, but what else? I'd love to see blog posts by language authors tackling the question of why their language matches the session title.


5) If its none of the above, why not? What are you looking for?
While a random wish list of features is interesting, remember that this is about the next big JVM language. Does your idea fit that?


6) Can Java reinvent itself?
What about java itself - could a reinvigorated Java retain its crown.

Summary
Feedback is definitely wanted, by comment, email or new blog posts. Its a broad topic, but the more feedback the better (or more controversial) the talk will be! (And I'll be starting writing this weekend...


Why Fantom
Overview
Do we really need another programming language? Well obviously we thought so, or we wouldn't have built Fantom! Fantom is designed as a practical programming language to make it easy and fun to get real work done. It is not an academic language to explore bleeding edge
theories, but based on solid real world experience. During its design we set out to solve what we perceived were some real problems with Java and C#. Our background is heavily Java, but many of Java's problems are shared by C# and .NET also.




Fantom Tour
Hello World
We start our whirlwind tour of Fantom's features, with the quintessential hello world:

class HelloWorld {
static Void main() {
   echo("hello world")
   }
}


Lambdas in Java Preview - Part 1: The Basics
As announced at Devoxx last year, closures (or better lambda expressions) will (probably) be added to JDK7. The team of project lambda has checked in initial parts of the implementation into the OpenJDK repositories. This is the first part (see part 2) in a series of blog posts giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. Although most of the examples will work with the current prototype implementation, keep in mind, that this is just a preview, which is based on the straw-man proposal, the specification draft, the discussions on the project lambda mailing list and the current state of the prototype. There might/will be both semantical and syntactical differences to the final version of lambdas in Java. Also some details are left out, e.g. exception handling will probably be out of scope.


Lambdas in Java Preview - Part 2: Functional Java
This is the second part in a series of blog posts (read part I) giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. This part focusses on general functional programming techniques, which will be available through the addition of lambdas. Functional programming (although I still wouldn't consider Java a functional programming language) will make Java code more concise, more expressive and more readable in certain kinds of problem situations.




Lambdas in Java Preview - Part 3: Collections API
This is the third part in a series of blog posts (read part 1, part 2 and part 4) giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. In this part I'll focus on how the addition of lambdas could affect one of the most used standard APIs - the  Collections API.








Lambdas in Java Preview - Part 4: Proposal UpdateThis is the fourth part in a series of blog posts (read part 1, part 2 and part 3) giving some practical examples of lambdas, how functional programming in Java could look like and how lambdas could affect some of the well known libraries in Java land. This part describes shortly the changes of a new proposal, that has been published while writing this series, and how it changes some of the examples in this series.

vendredi 6 août 2010

Veille technologique semaine 31

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • sortie de la version 1.0.0 de Gemfire qui est un produit de gestion de données distribuées. Ce produit est interropérable Java, C++ et C# (DotNet), compatible des transactions (JTA), ...
  • Sortie de OpenCL 1.1 : du GPGPU (General-Purpose computation on Graphics Processing Units) par une API normalisée. Comment faire du calcul numérique par le processeur graphique (GPU).
  • Le W3C propose une spécification pour l'expression des émotions : EmotionML (ce n'est pas un poisson d'avril).
  • Les cinq pièges à l'adoption des méthodes agiles.
  • Un chapitre d'un livre qui vient de sortir sur la méthode agile Scrum : le product backlog
  • Un exemple de programmation par contract avec le langage Groovy : une extension du langage Groovy par les annotations. C'est un exemple de DSL (Domain Specific Langage) interne.
  • La compatibilité ascendante : cela concerne chaque niveau. La compilation, le binaire, l'execution. Détail de chaque niveau par l'équipe du JDK.
  • Un article de Dell sur le multi-core versus l'hyperthreading : et le multi-core hyperthreadé ?
  • La programmation fonctionelle et le JDK 7 : le projet Lambda.

Bonne lecture

Spring Releases Gemfire 1.0.0.M1 for Java and .NET

Spring GemFire (for short SGF) brings the Spring concepts and programming model to GemFire, SpringSource's distributed data management platform. The release is available for both Java and .NET.
The features in 1.0.0.M1 include:
  • declarative dependency injection style configurations for the GemFire infrastructure (such as Cache, Region, Interest, etc)
  • exception translation to Spring's portable DataAccess exception hierarchy
  • Template and callback support for easy native API access
  • transaction management support
  • Spring-backed wiring for GemFire managed objects
  • auto-generation of non-reflection based Instantiators

Note that some of these features are currently available only in the Java version.

Through SGF, Spring users should feel right at home when interacting with GemFire while developers familiar with GemFire will see the benefits and flexibility of the Spring container, its powerful AOP integration, and versatile service abstractions. But don't take my word for it – download the project and take the sample application for a spin. It's a console based 'shell' which allows for ad-hoc interaction with the data grid; one can start and stop nodes and see the information shared transparently between multiple clients.



OpenCL 1.1 enhances performance with backward compatibility
The Khronos Group, the organization responsible for maintaining a number of open standards such as OpenGL, WebGL, and OpenMAX, has announced the release of OpenCL 1.1, an update to the cross-platform standard for making it easier to target GPUs and other specialized hardware for parallel processing. The latest update includes a number of performance improvements and added instructions while maintaining full backward compatibility for OpenCL 1.0. The release also establishes an 18-month cadence for updates to the standard.


Expressing Emotions with a New W3C Markup Language, EmotionML
W3C has published the first public working draft of the Emotion Markup Language (EmotionML), a language meant to express emotions in three main ways in today's computer-based communication: annotating data, the recognition of emotional-based states, and generating emotion-related system behavior.

According to the language authors, EmotionML can have applications in various fields like:
  • Opinion mining / sentiment analysis in Web 2.0, to automatically track customer's attitude regarding a product across blogs;
  • Affective monitoring, such as ambient assisted living applications for the elderly, fear detection for surveillance purposes, or using wearable sensors to test customer satisfaction;
  • Character design and control for games and virtual worlds;
  • Social robots, such as guide robots engaging with visitors;
  • Expressive speech synthesis, generating synthetic speech with different emotions, such as happy or sad, friendly or apologetic;
  • Emotion recognition (e.g., for spotting angry customers in speech dialog systems);
  • Support for people with disabilities, such as educational programs for people with autism.


Agilité : Cinq pièges à l'adoption des méthodes agiles
Mike Griffiths, blogueur et agiliste travaillant au PMI, nous présente dans son article les Anti-Patterns nuisant à l'adoption des méthodes agiles. Bien que les bénéfices tirés des méthodes agiles ne soient plus à prouver, le passage à l'agilité n'est pas forcément couronné de succès. Nombreux sont les pièges et les digressions dans lesquels on peut tomber. Mike décrit ensuite cinq pièges courants, mais c'est à vous d'identifier les autres selon le contexte de votre projet.
  • L'agilité n'est pas un miracle
Oui, l'agilité permet de gagner du temps, d'accroître la valeur métier, et de développer un produit de meilleure qualité. Cependant, ce n'est pas une recette magique, qui va permettre à un projet anémique voué à l'échec d'être un succès. Bien au contraire, vous pourriez arriver encore plus rapidement en situation d'échec, ou au mieux vous en rendre compte avant avec des nouveaux indicateurs.
  • L'agilité ne veut pas dire aucune discipline
Certaines personnes ne connaissant pas bien l'agilité ont l'idée reçu que les méthodes agiles font preuves de très peu de discipline, de planification et d'estimation. Les méthodes agiles sont parfois appelées « méthodes légères » par opposition aux anciennes méthodes.
On peut quand même constater de nombreuses cérémonies et activités de haut niveau nécessitant de la discipline, comme: le stand-up daily meeting, le sprint planning, la rétrospective, la démo, etc.
Même si les documents afférents aux cérémonies sont peu nombreux, ils ne sont pas une excuse pour manquer de discipline et éviter de rendre des comptes. Ils contiennent les indicateurs suffisants pour réaliser des plannings, des estimations, etc.

  • L'agilité sans aucune explication
Une équipe agile ne travaille pas toute seule en silo. Elle interagit avec d'autres équipes, comme le marketing, l'architecture applicative, etc. Le caractère itératif d'un projet agile peut les perturber. Ainsi, il convient d'expliquer le processus agile aux autres équipes, avant d'arriver à des situations de blocages ou pire de rejets.
  • L'importance du feedback client
L'une des contraintes importantes des méthodes agiles est d'avoir le client sur site. Cela permet entre autre d'avoir un feedback régulier au cours d'une itération. La réunion de démonstration a aussi pour rôle d'avoir un retour et une validation du client. Attention, même si le client ne fait pas ou peu de retours, cela ne veut pas pour autant dire que tout va bien et que son réel besoin est satisfait. Au contraire, il peut avoir fait preuve d'inattention. Pour éviter cela, Mike propose des sessions de revue, où le client est assisté par un membre de l'équipe.
  • Obsédé par le processus agile
La recherche de l'amélioration du processus agile au sein d'un projet est bonne chose en soi.
Cependant, il ne faut pas tomber dans le cas extrême du scrum master obnubilé par le process et le sur-outillage avec des indicateurs inutiles. Il faut rester pragmatique et garder à l'esprit que l'objectif de l'agilité est de satisfaire le client et répondre à des contraintes business. Il faut donc garder son attention sur lui et non sur le process. Mike suggère d'utiliser des métriques orientées sur l'objectif final: satisfaction client, fonctionnalités réalisées et acceptées, plutôt que le pourcentage de pratiques agiles suivies, ou le temps passé en pair-programming.



Effective Java, second edition – Book Review
This book is the book to read if you want to write good Java code. All the advices are really useful. It's really comfortable to read book from a person who master Java. In fact, Joshua led the design and implementation of numerous Java features.


Working with the Product Backlog
Agile Product Management with Scrum is the product owner's guide to creating great products with Scrum. It
covers a wide range of agile product management topics including envisioning the product, stocking and grooming the product backlog, planning and tracking the project, working with the team, users and customers, and transitioning into the new role.
This article is an excerpt (Chapter 3 'Working with the Product Backlog') from the book; it introduces the product backlog together with its DEEP qualities. It explains how product backlog grooming works, shares advice on discovering and describing product backlog items, and on structuring the product backlog. ScrumMasters, coaches, team members will also benefit from reading the extract as managing the product backlog is teamwork in Scrum.


An Introduction to Programming by Contract
Programming by Contract is known under the name of Design by Contract first implemented by Eiffel, a programming language introduced by Bertrand Meyer.

The main principle of programming by contract is to actually add a program's specification as expressions in the form of meta-data to certain elements in the source code. Contracts, contracts, everywhere…

So far we have seen class invariants, preconditions and postconditions and how they can be applied on class or method declarations. But where do all those contracting takes place? As you might have already supposed, a contract in terms of Design by Contract is an agreement between the supplier (the programmer, the creator) and the client (the one who makes use of it) of a class.


Kinds of Compatibility
When evolving Java code, compatibility concerns are taken very seriously. However, different standards are applied to evolving various aspects of the platform. From a certain point of view, it is true that any observable difference could potentially cause some unknown application to break.
Indeed, just changing the reported version number is incompatible in this sense because, for example, a JNLP file can refuse to run an application on later versions of the platform. Therefore, since making no changes at all is clearly not a viable policy for evolving the platform, changes need to be evaluated against and managed according to a variety of compatibility contracts.


Threads or Cores: Which Do You Need?
Intel and AMD have done their best to differentiate the x86 architecture as much as possible while retaining compatibility between the two CPUs, but the differences between the two are growing. One key differentiator is hyperthreading; Intel does it, AMD does not.

Multicore and HyperThreading (referred to as "HT") are not the same, but you can be suckered into believing they are, because hyperthreading looks like a core to Windows. My computer is a Core i7-860, a quad-core design with two threads per core. To Windows 7, I have eight cores.


Functional Programming Concepts in JDK 7
There's much excitement about JDK 7 and in particular Lambdas! I've waded through the bloat to help you get an understanding of it.
My take is that lambdas will be in JDK 7 - you can see plenty of evidence of that around the web and in the snapshot builds. That said, no decision is concrete (which is a wise tip from The Pragmatic Programmer no less!). This article is aimed at those who don't know much about functional programming or what Lambdas, Closures or Currying are and want to get 'primed'.

vendredi 30 juillet 2010

Veille technologique semaine 30

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • La dernière version du produit Terracotta permet de gérer des réplications de plusieurs millions d'objets dans un cache d'une taille de 1 Tera octets.
  • Le rôle du manager dans méthode Scrum.
  • La sortie de la spécification OpenGL 4.1 pour le groupe kronos.
  • Sortie de la version 2.2 de l'outil de qualimétries Sonar : personnaliser la page Sonar.
  • Le couplage : comme tout principe, il faut en mettre au bon endroit, avec la bonne dose.
  • La version 5 du langage C# de Microsoft propose d'ajouter la méta-programmation : le programme qui (se) manipule le programme.
  • Sortie de la version 1.3 de VisualVM : visualiser l'exécution de vos programmes dans la JVM : programme écrit en Java, Clojure, Groovy, JRuby, Jython et Scala.
  • Des conseils de Joshua Bloch sur la manière de concevoir des API : "How to Design a Good API and Why it Matters"
  • Quelques détails sur les nouveautés d'eclipse 3.6 : Helios.
  • Quelques exemples d'utilisation des @nnotations Java : comment faire un DSL (Domain Specific Language) interne.
  • Troisième article sur JavaFX : l'asynchronisme.
Bonne lecture.




Terabyte-sized Java apps now possible
The new version of Terracotta's Ehcache Java caching software can hold several hundred million objects simultaneously.

"Building any cache greater than, say, 50 gigabytes is very complex and involves manual work for developers and operators and can be very hard to maintain," Pandey said. "What we have done enables developers and operators to employ a terabyte-scale cache with several hundred million objects."


Manager 2.0: The Role of the Manager in Scrum
When an organization starts to explore Scrum, there's often an uncomfortable moment early on when someone points out that the role of "manager" seems to be missing entirely. "Well I guess we'll have to just get rid of 'em all!" wisecracks one of the developers, and all the managers in the room shift uncomfortably in their seats.


Khronos Group releases OpenGL 4.1, claims to leapfrog Direct3D 11
Just four and a half months after releasing the OpenGL 4 specification, the Khronos Group has released the final version of the OpenGL 4.1 specification. OpenGL 4.0 brought feature parity with Direct3D 11's new features—in particular, compute shaders and tessellation—and with 4.1, the Khronos Group claims that it is surpassing the functionality offered in Microsoft's 3D API.


Sonar 2.2 in screenshots
The Sonar team is proud to announce the release of Sonar 2.2. As usual, this new release includes numerous improvements, bug-fixes
and also brand new features that we believe are worth stopping your daily work for a few minutes to review. Those features can be divided
into three categories :
  • Favourites resources
  • Filters homepage
  • Plugin classloaders

Loose coupling is overrated.
Loose coupling is one of the most desired qualities in modern software development, but because its very subjective nature, and because the lack of analysis on the different types of coupling, some wrong decisions may be taken in the architecture just for the sake of making the application more loosely coupled.


HTML5 @ Zenika-with-Peter-Lubbers
Voici un compte-rendu de la présentation HTML5 de Peter Lubbers de la société Kaazing. Il était invité par Zenika à présenter les grands principes de HTML5 :


HTML5 with Peter Lubbers 1/3
HTML5 with Peter Lubbers 2/3
HTML5 with Peter Lubbers 3/3 


C# 5 and Meta-Programming

To summarize:
C# 1 was all about delivering a new language for a new platform.
C# 2 was all about providing generics to improve strong typing, especially in collection handling situations.
C# 3 was all about letting write strongly typed queries abstracted from the date source. As a consequence C#3 fosters a more declarative way of programming.
C# 4 was mainly about dynamic programming to inter-operate with dynamic programming environment.
C# 5 will be concerned with meta-programming.

Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In many cases, this allows programmers to get more done in the same amount of time as they would take to write all the code manually, or it gives programs greater flexibility to efficiently handle new situations without recompilation.


VisualVM 1.3: Detailed Application Monitoring
VisualVM 1.3 has just been released and is now available for download at
https://visualvm.dev.java.net ! The most significant new features in this release include the incorporation of the Sampler plugin into the core tool, the ability to define custom profiling presets, and support for taking a heap dump of a remote JVM. The tool newly enables custom sorting of applications, recognizes the Clojure, Groovy, JRuby, Jython and Scala runtimes, and introduces monitoring remote hosts. Two new plugins have been provided with this release: the Tracer framework and probes plugin enable detailed application monitoring, and the Threads Inspector plugin displays stacks of the selected threads.


Joshua Bloch: Bumper-Sticker API Design
My conference session "How to Design a Good API and Why it Matters" has always drawn large crowds; on InfoQ was the third most viewed content last year. When I presented this session as an invited talk at OOPSLA 2006, I was given the opportunity to write an abstract for the proceedings. In place of an ordinary abstract I decided to try something a bit unusual: I distilled the essence of the talk down to a modest collection of pithy maxims, in the spirit of Jon Bentley's classic Bumper-Sticker Computer Science, Item 6 in his excellent book, More Programming Pearls: Confessions of a Coder (Addison-Wesley, 1988). It is my hope that these maxims provide a concise summary of the key points of API design, in easily digestible form:


Eclipse 3.6 Hidden Treasures
Eclipse 3.6, aka Helios, was released about a month ago. It has become a tradition: this is the time I highlight some of my favorite hidden features in the new release. I focus my article on features which are less obvious, off the beaten path. Features you might not be familiar with if you didn't take the time to read the "new and noteworthy" for this release.
If you haven't done so already, you are invited to read my posts for Eclipse 3.4 (Ganymede) and Eclipse 3.5 (Galileo) (which won the Galileo Blogathon). You can probably pick up some new tricks there as well. I also took the time to reiterate on some of my favorite shortcuts, which made this article a tad longer. As always, if you are familiar with more features which are hidden and worthy, please let me know in the comments.


Patterns for Using Custom Annotations
If you happen to create your own annotations, for instance to use with Java 6 Pluggable Annotation Processors, here are some patterns that I collected over time. Nothing new, nothing fancy, just putting everything into one place, with some proposed names.


Effective JavaFX Architecture Part 3 - Asynchronous calls, Command Pattern and Testability
In the previous installment of Effective Architecture, I covered TDD with Model-View-Presenter. However the code I presented had synchronous server calls. In JavaFX (like Swing), code runs in the Event Dispatch Thread (EDT). It is unwise to block the EDT. Hence it is encouraged to execute all server calls on a separate thread.

jeudi 22 juillet 2010

Veille technologique semaine 29

Pour le bulletin de la semaine 29, je vous propose les sujets suivants :
  • sortie de la version 2.8 de scala : version importante.
  • mise à jour du JDK 6 udate 21 : performance et qualité du garbage collecteur.
  • Netbeans 6.9 et JavaFX 1.3 : avec le composeur visuel.
  • Une pétition pour demander la mise en open sources de JavaFX. 
  • Le JSR 303 - Bean Validation : comment mettre les contrainte de données qui sont vérifiés par le runtime. C'est un mode descriptif (@nnotations).
  • Un article sur Advanced Message Queuing Protocol : un protocole de messagerie interropérable Java, C++, C#, ... Un remplaçant de JMS ?
  • La programmation parallèle et Java : les multi-cores des processeurs modernes demandent au logiciel d'avoir des application multi-threadés pour bénéficier de l'augmentation de puissance de calcul. Le plus difficile est de paralléliser les algorithmes. Une extension du langage Java le propose : [ hello(); || world(); ]
  • Fait-il conserver Internet Exploreur 6.0 ?
Bonne lecture.

Scala 2.8 enfin finale !
Après plusieurs mois de bêtas et de release candidates, voici enfin venir la toute dernière version de Scala en finale à savoir la 2.8.0 ! Cette version quasi majeure est considérée par beaucoup comme une 3.0 tellement les nouveautés sont nombreuses.
 
Au menu : la nouvelle API collection, la spécialisation de type, une nouvelle implémentation des Array, les arguments nommés et par défaut, les Package Objects, le support des continuations ou bien encore le REPL amélioré. Les nouveautés étant nombreuses, je pense que cette nouvelle version mériterait bien son petit article, n'est-il pas ?
La mise à jour de Scala par votre IDE est possible, pour les autres le téléchargement de la distribution se passe par ici.


JDK 6 Update 21 Release Notes
Java Hotspot VM 17.0
Java SE 6u21 includes version 17.0 of the Java HotSpot Virtual Machine with improvements to overall quality and features such as
compressed object pointers, escape analysis-based optimization, code cache management, the Concurrent Mark-Sweep garbage collector and its successor, the Garbage First (G1) garbage collector.


NetBeans 6.9 Release Supports JavaFX, Java EE6 and OSGi

Oracle has released version 6.9 of its popular open-source Neteans IDE. This is also the first release of the IDE to be released under Oracle's stewardship. The new release has a couple guiding themes providing an umbrella for a raft of new features, as well as many improvements.

First among the additions, and most visible to a user, is the new support for building JavaFX applications using the IDE, called JavaFX Composer. Many have waited for this support for JavaFX to round out the toolkit and the platform. The JavaFX support features a visual designer tool, as well as a code editor. Coders can write code, build them and run them with ease, as well as reformat code files. The visual tools will be the most compelling to users looking to alternatives to Adobe Flash's visual tooling options. The JavaFX composer lets people visually manipulate an application, dragging and dropping components on the screen and arranging them. The tool lets you use - and visually change properties on – all the standard JavaFX components provided with the SDK. JavaFX Composer also provides support for binding web services and databases to components using a generic, abstract idea of data sources and record sets. Accordingly, it's very easy to create these data sources in the IDE.


Open Source JavaFX Petition
To the Leaders, Management, and Board of Directors at Oracle Corporation, We the undersigned formally request that Oracle Corporation release the entire JavaFX Platform as open source software available for modification and reuse by
individuals, educators, and corporations.

Open source software has transformed the way that we build and use software. It has increased the educational reach of technology, allowed new and innovative applications to emerge, and spawned the growth of communities dedicated to
software philanthropy. Java has been at the forefront of this revolution, providing a platform for open source development, and becoming an open source effort in itself.

JavaFX is an innovative technology built on top of Java that allows the creation of next generation Rich Internet Applications (RIA). We believe that an essential part of the future success of this platform is to release it as open source software. This
would increase adoption by companies that fear lock-in or are concerned about technology maturity. It would also make it competitive with other RIA platforms that have embraced the open source model.


Bean Validation
Comment valider un bean ? L'idée de départ, comme toutes les bonnes idées, est très simple.

Avant, pour confirmer que des données étaient valides selon certains critères métiers, le  développeur pouvait être amené à intervenir sur plusieurs couches. Il pouvait agir, par exemple,   sur la couche présentation, en ajoutant du javascript pour contrôler un champ du formulaire, ou  bien ajouter du code de vérification dans la couche DAO avant de persister en base. Cette spécification a eu pour objectif, d'une part d'enrichir les entités métiers sur les valeurs que
pouvaient prendre ses propriétés, et d'autre part de fournir un service capable de valider ces entités avec en plus un certain niveau d'information sur les cas non valides.

La JSR-303, finalisée en novembre 2009, fournit une standardisation de ces concepts et fait partie de Java EE 6. Emmanuel Bernard étant le spec lead de cette JSR, assez naturellement l'implémentation Hibernate Validator est devenue celle de référence. C'est cette dernière qui sera exclusivement évoquée dans cet article.


AMQP, une alternative à JMS ?
AMQP (Advanced Message Queuing Protocol) est un protocole de messagerie créé à l'initiative de  la banque JP Morgan Chase pour gérer la communication entre ses différents partenaires. Le but affiché était de fournir une solution alternative aux solutions payantes et relativement chères dans le domaine du MOM (Message-Oriented Middleware) dominé largement par Websphere MQ
d'IBM et RendezVous de Tibco (93% du marché à eux deux en 2008). Un certain nombre de partenaires se sont fédérés autour de ce projet pour aboutir à une première spécification en 2006. L'ambition avouée est qu'elle devienne l'équivalent du HTTP pour l'internet, ce qui explique qu'elle décrive aussi bien les différentes sémantiques liées au MOM que la partie plus bas niveau du transport de ces messages. Cette normalisation permet la multiplication des solutions clientes ou serveurs dont la compatibilité sera garantie par cette spécification. Par exemple, un broker de message écrit en Erlang comme RabbitMQ transférera de façon
transparente un message d'un client ruby vers un autre client Java/JMS.


Spring facilite l'adoption d'AMQP
Comme on pouvait s'y attendre avec le rachat de RabbitMQ par VMWare, Spring intégre petit à petit des fonctionnalités facilitant l'adoption d'AMQP.
 
Le premier milestone de Spring AMQP 1.0.0 matérialise cet effort. Un gros point de satisfaction, Spring ne s'est pas contenté de fournir la partie cliente Java de RabbitMQ mais propose une réelle abstraction du protocole AMQ. Par contre la gestion des versions de la spécification reste un peu flou. Elle semble caler sur la version 0.8 tout en étant compatible avec la 0.9.1.
La distribution vient avec 4 modules : spring-amqp, spring-rabbit,spring-rabbit-admin et spring-erlang. Ce dernier est le plus inattendu et la documentation semble indiquer que le projet est expérimental. Pour rappel le serveur de RabbitMQ est implémenté en Erlang, un langage très perfomant sur les aspects concurrentiels.
 
La documentation, bien qu'incomplète, a la bonne idée de proposer plusieurs cas d'utilisation et laisse entrevoir un bon support pour Spring Integration. Cette nouvelle est quoiqu'il en soit une très bonne nouvelle pour l'adoption d'AMQP dans le monde Java. Par ailleurs Spring propose également une version .Net.


Think Parallel, Think Java
For the most part, parallel programming for today's multicore and manycore
architectures have been purview of C++ (think Intel's Threaded Building Blocks,
Parallel Studio, RapidMind, and Cilk++) and functional languages (Erlang, Haskell,
Scala, and the like). What's missing? How about Java.

In the Java world, Ateji has released Ateji PX for Java, a Java
extension for providing compatibility with existing sequential code, tools, and
training. The extension provides only parallelism-related aspects, with the addition
of a couple of syntactic constructions.


Easy multi-core programming for all
Boost application performance and leverage hardware assets by using all available processor cores The number of cores in desktop computers and servers is expected to double every year. While the OS is able to run different applications on different cores, the only way for an application to benefit from a performance increase is to parallelize the code at the level of the application.

Ateji PX makes this parallelization process simple and compatible with existing Java code.


Ateji PX for Java : "Parallel programming made simple"
Ateji PX for Java introduces parallelism at the language level, extending the sequential base language with a small number of parallel primitives. This makes parallel programming simple and intuitive, easy to learn, efficient, provably correct and compatible with existing code, tools and development processes.


Faut-il continuer à supporter internet explorer 6 ?
On ne va pas ergoter sans fin, tout le monde doit maintenant savoir que Internet Explorer 6 — IE6 pour les intimes — est un navigateur obsolète et dangereux. Et pourtant, certains continuent à l'utiliser. Faut-il les en dissuader, refuser de leur fournir son support, aller même jusqu'à leur empêcher l'accès, ou faut-il continuer à supporter (les faiblesses de) ce navigateur ?

vendredi 16 juillet 2010

Veille technologique semaine 27


Bonjours à tous,

pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • un résumé sur la présentation de JEE 6 par Adam Bien au club Java de PARIS
  • JEE 6 et les événements : natif pour les EJB 3.1
  • un groupe de travail qui démarre une spécification sur les notifications pour le Web
  • la réutilisation : un rêve ? L'article mentionne qu'un excès de configuration complexifie l'utilisation "Maximize reuse minimizes use" : attention aux usines à gaz !
  • Quelques définitions de vocabulaire UML.
  • Les slides sur une présentation au sujet des annotations Java.
  • La surcharge et la redéfinition : deux concepts à ne pas mélanger (respectivement override et overload en anglais).

Bonne lecture.

Java EE 6 par Adam Bien

Lightweight killer apps with nothing but vanilla Java EE 6, par Adam Bien (http://adam-bien.com)
Adam est membre du JCP, et a écrit le livre Real World Java EE Patterns.

  • Lightweight ?
  • rapide
  • simple
  • small
  • lean
  • short turnaround cycles : déployer le plus rapidement possible pour être productif
  • easy : convention over configuration


Spring vs JEE : Java EE repose davantage sur les conventions, mais Spring donne davantage accès à toutes les options de configuration. A part ça, leurs fonctionnalités sont grosso modo les mêmes aujourd'hui, c'est une affaire de goûts.
Et les autres langages ? Ruby, Groovy... ? Ce sont des technologies intéressantes, mais du point de vue de l'entreprise, pas encore matures ou reconnues. De plus, il est difficile de trouver des développeurs expérimentés.

Architectures modernes

ECB
En Java EE 6, il y a 3 couches : Boundary (interaction avec des systèmes externes : utilisateur ou webservices), Control, Entity.
Pour des applications CRUD, Boundary+Entity sont suffisants, car la plupart du temps la couche service n'est qu'un delegate vers la couche Entity.
On voit ici que le modèle ECB (Entity-Control-Boundary) est indépendant de l'implémentation de Java EE.

DDD
Le Domain Driven Design tente de mettre les use-cases métiers au centre du développement. C'est un peu l'inverse de ECB, orienté technique.
Le DDD pousse à avoir un domaine riche, bien encapsulé ; il n'y a donc pas réellement besoin de couche service dans ce cas.
Adam pointe vers le site http://www.antiifcampaign.com/ qui pousse à remplacer les IF par des classes bien encapsulées et l'utilisation des design patterns (Strategy...).
Le DDD est principalement stateful : le graphe d'objet en mémoire contient l'état du système. Il est alors assez difficile de sauvegarder ce graphe en base de données par exemple. Si plusieurs clients (au sens client du système, pas utilisateur) modifient le graphe de manière simultanée, il est difficile de merger leurs modifications.
Par contre, il est possible de tester le système de manière autonome, sans même avoir de base de données, puisque le système est auto-contenu.
Cette approche est "lean" car moins de couches techniques sont mises en oeuvre : les données et leur traitement sont co-localisés. De plus, elle s'interface bien avec les architectures REST : il suffit d'exposer les objets comme des Ressources.

JSF 2
Avec JSF 2, on peut accéder directement à des Managed Beans ou à des EJB, grâce à un Expression Language. La couche de configuration et d'intégration est donc très légère, voire inexistante.
Adam montre le code d'un EJB, et explique qu'il met la visibilité de ses services injectés (ex: EntityManagers) à "packaged", de manière à simplifier les tests unitaites (injection manuelle). Nicolas Martignole intervient en déclarant qu'il utilise plutôt la visibilité publique partout où il peut, et prend en exemple le framework Play. De nombreux développeurs ne sont pas d'accord et rappellent l'utilité des différents niveaux de visibilité et leur impact sur la sécurité et la robustesse du système.

Service-driven architectures
Ces architectures mettent l'accent sur une couche de service indépendante de ses "clients" : interface utilisateur, webservices... Chaque couche est isolée et possède ses propres modèles et traitements.
Elles sont la base des architectures SOA.

SOA vs DDD : les frères ennemis
Les deux sont des bonnes pratiques... chacun dans un contexte particulier.

Au final, le discours d'Adam Bien est assez anti-conformiste : supprimez les interfaces, les DAO, réduisez le nombre de couches !
Assez surprenant dans le context actuel, où les blueprints Spring et Sun sont martelés dans les écoles et les entreprises.

Qu'y a-t-il dans Java EE 6 ?

EJB 3.1
Les EJB 3.1 sont très simples :

@Stateless
public class SimpleSample {
   public void doSomething() {}
}

Notez qu'il n'y a plus besoin de définir l'interface métier comme dans les EJB 2 ! Il est toujours possible de le faire, mais c'est optionnel.
Mais alors, comment tester ? En fait, il n'y a absolument pas besoin d'interfaces pour tester unitairement : Mockito le fait très bien par exemple. En particulier, les Interceptors fonctionnent directement sur les classes, contrairement aux proxies dynamiques qui demandent la présence d'interfaces.

De même, a-t-on vraiment besoin des DAOs ?
Très généralement, la base de données survit largement aux applications qui y accèdent, il est donc contre-productif (voire stupide) de fournir une couche d'adaptation "au cas où".

JNDI enfin standardisé
... pour des noms enfin portables !

EJB 3.1 + REST
Grâce à l'annotation @Path, on peut exposer un EJB 3.1 en tant que service REST. Pas de XML, pas de configuration de container.

Timers
L'annotation @Schedule permet de définir des expressions type "cron" pour scheduler des traitements.

Singletons
L'annotation @Singleton permet, avec @PostConstruct, de créer des singletons simplement et de manière sûre.

Tâches asynchrones
Les méthodes annotées @Asynchronous sont exécutées dans des transactions en arrière-plan. Elles renvoient des objets de type Future<?>.
L'usage raisonné des méthodes asynchrones peut vraiment faire la différence en termes de performances ! Adam raconte qu'une entreprise était prête à laisser tomber Java pour du C car leurs performances étaient mauvaises. Le fait de configurer certaines méthodes en @Asynchronous a permis de multiplier les performances et ainsi sauver l'application Java.
Les méthodes asynchrones sont exécutées par un pool de threads géré par le container.

Instrumentation
Les EJB exposent automatiquement des métriques en JMX.
Selon Adam, la différence de performances entre un Pojo et un EJB est infinitésimale - alors que la possibilité de monitorer l'application en production est "priceless".

CDI
CDI est l'héritier des anciennes JSR 299 et 330.
CDI s'inspire de ce qui a été introduit par Spring, mais pousse les possibilités plus loin. En particulier, CDI est type-safe.

Adam a principalement réalisé des démos en "live".
Il a ainsi passé en revue à peu près toutes les fonctionnalités principales de Java EE 6, des EJB aux vues JSF, en passant par les méthodes asynchrones, les intercepteurs, et l'injection avec @Inject (y compris pour injecter un simple POJO qui n'en demandait pas tant !).

Au final, ça donne quand même envie d'y rejeter un oeil, sérieusement.
On est loin des temps préhistoriques du XML à foison, des interfaces atroces (throws RemoteException, ça rappelle des souvenirs à quelqu'un ?), et des fonctionnalités limitées. Comme promis, Java EE 6, et notamment les EJB 3.1, fournit un modèle puissant et léger pour le développement d'applications robustes.

De mon point de vue, le principal défaut de la plateforme est la partie vue. Sérieusement, JSF, même 2.0, c'est... juste horrible. Et son concepteur l'a même avoué : il recommande maintenant de se tourner vers Wicket, pour les projets n'ayant pas un fort impératif d'utilisation des standards.

Le prochain Paris JUG se tiendra en septembre : repos pendant le mois d'août !


Decoupling event producers and event consumers in Java EE 6 using CDI and JMS
In this post I will share my recent findings about Container Dependency Injection in Java EE 6, in particular how to decouple the processing threads of event producers and event consumers.

Java EE 6 introduces a very nice dependency injection framework (CDI) that has superb support for the Observer pattern in the form of event broadcasting.


Web Notification Working Group Charter
The mission of the Web Notification Working Group, part of the Rich Web Client Activity, is to produce specifications that define APIs to generate notifications to alert users. A Notification in this context may be displayed asynchronously and may not require user confirmation. Additionally, events are specified for managing user interactions with notifications.


Reuse: Is the Dream Dead?
In general, the more reusable we choose to make a software component, the more difficult that same software component is to use. In the extreme, an infinitely reusable component is infinitely difficult to use. Dealing with the tension between reuse and use is a complex issue, and often, we fail. Largely, the problem has to do with dependencies.

This statement is a derivation of Clemens Szyperski's statement in Component Software: Beyond Object-Oriented Programming -
"Maximize reuse minimizes use."


Association, Aggregation, Composition, Abstraction, Generalization, Realization, Dependency
These terms signify the relationships between classes. These are the building blocks of object oriented programming and very basic stuff. But still for some, these terms look like Latin and Greek. Just wanted to refresh these terms and explain in simpler
terms.


Conférence : Les annotations enfin expliquées simplement
Mardi dernier, j'ai animé chez Zenika une conférence sur les Annotations.
Et le sujet est plus complexe qu'il n'y paraît. Outre les subtilités de leur syntaxe, les annotations disposent d'un outillage puissant à la compilation et au runtime, dont la maîtrise ouvre de nouvelles perspectives en termes de méta-programmation.
En particulier, j'ai démontré l'utilisation des
Annotation Processors, qui permettent d'interagir avec le compilateur Javac, et de la Réflexion pour lire et injecter des annotations dynamiquement au runtime.


Overloading And Overriding
Conceptually overloading and overriding is way different. Only the notion about interface name is same in both cases. Other than that, you cannot find a common thing between them.
Overloading is using the same interface but with different inputs and getting different behaviour as output. Slightly confusing right. I hope by end of this article you may feel better.

vendredi 2 juillet 2010

Veille technologique semaine 26

Pour le bulletin de la semaine 26, je vous propose les articles suivants :
  • Etes vous multi-taches ? On connaît le multi-tâches pour les machines mais qu'en est-il pour les humains ? Des études montrent que au delà de trois tâches, l'efficacité humaine s'effondre. A prendre en compte dans vos activités.
  • Gmail de Google bientôt en HTML 5.
  • Les nouvelles fonctionnalité de l'OS Android 2.2 réalisé par Google, avec bientôt une version sur processeur x86 d'Intel (porté par Intel).
  • Les NIO 2 et le JDK 7 : l'accès aux attributs des fichiers.
  • La différence entre l'identité et l'égalité : exemple en C#
  • Les expressions lambda pour le JDK 7 : étude des différent cas.

Bonne lecture.


Multitasking Gets You There Later
Modern business relies on multitasking to get work done. Employees are evaluated on their ability to multitask. IT professionals are routinely assigned to multiple projects. Did we always do this? Does multitasking work? What are the real impacts of multitasking? Is there an alternative?

Costs of Multitasking
A person who works on more than one project incurs a cost at each shift from one project to the other. The primary cost is the time required to change context. We know that simple interruptions like a phone call can cost as much as 15 minutes of recovery time. The more complex the task, the more time it takes to make the shift.

If you are working on more than two projects the cost can be even greater. It may have been a long time since you worked on that project, taking more effort to remember where you left off. Alternately, if you shift frequently, your context-switching time is a larger proportion of your work time.

There are studies that show people are pretty good at shifting between two contexts for small tasks. In a short time scale this appears to have to do with our two brain hemispheres. To a certain extent, we can parallel process two independent tasks. For larger switches, we should expect some switching cost. Jerry Weinberg showed the escalating context switching costs accrued if each task has a 10% penalty, in reality the costs are frequently higher.


Google Gmail to harness HTML5
Google announced that it would be rendering many upcoming features for Gmail in HTML5.  Dragging and dropping files from the desktop into the browser will be just one new feature in Gmail's new standards-based update.  Google will also leverage HTML5's database standards (migrating away from the now-dead Google Gears storage; in favor of HTML5 Web Workers).


Cool Off This Summer with Fully Native x86 Froyo  
A senior VP at Intel has recently
stated that a fully native x86 version of Android 2.2 will be released this Summer.  All of the code will be sent back to the open branch being created for x86.  This could mean more Atom-powered Android tablets.


Introducing NIO.2 (JSR 203) Part 3: File System Attributes and Permissions support in NIO.2
In two previous entries I covered Introducing NIO.2 (JSR 203) Part 1: What are new features? and Introducing NIO.2 (JSR 203) Part 2: The Basics [2] In this entry I will discuss Attributes introduced in NIO.2. Using attributes we can read platform specific attributes of an element in the file system. For example to hide a file system


Comparing Values for Equality in .NET: Identity and Equivalence
The various ways of comparing two values for equality in .NET can be very
confusing. In fact if we have two objects a and b in C# there are at least
four ways to compare their identity, plus one operator that looks like an
identity comparison to add to the confusion:
1. if (a.Equals(b)) {}
2. if (object.Equals(a, b)) {}
3. if (object.ReferenceEquals(a, b) {}
4. if (a == b) {}
5. if (a is b) {}

As if that isn't confusing enough, these methods and operators behave
differently depending on:
whether a and b are reference types or value types
whether they are reference types which are made to behave like
value types for these purposes (System.String is one of these)

This article is an attempt to clarify why we have all these versions of equality, and what they all mean.


Lambdas in Java: An In-Depth Analysis
With the acquisition of Sun Microsystems out of the way, Oracle can get down to the serious business of revitalising what many have come to see as a stagnant language. High on many people's requirements is the ability to be able to pass functions around that are independent of classes, so that functions can be used as arguments to other function or method calls. Functional languages like Haskell and F# exist purely using this paradigm, and functional programming goes back eight decades to the Lambda Calculus, leading to the term Lambda being used in many languages to describe anonymous functions.


lundi 28 juin 2010

Veille technologique semaine 25

Pour le bulletin de la semaine 25, je vous propose les sujets suivants :
  • sortie de la version 3.6 d'eclipse : Helio avec des compléments, entre autre, sur les outils Java.
  • Les méthode agiles : comment intégrer le changement, comment accepter le changement pendant le développement. Il ne fait pas résister au changement ou le supprimer, il faut le prendre en compte dans le processus de développement.
  • La modélisation du domaine : les 10 commandements.
  • Le HTML 5 : la nouvelle plate-forme de développement ? Le browser devient une machine virtuelle.
  • Java et le threading : c'est toujours un exercice très difficile. Comment être thread safe ? C'est d'abord une question de définition.
  • Les évolutions du langage Java du JDK 7 : ce qui est déjà implémenté. Il reste plusieurs évolutions à compléter, en particulier l'Automatic Resource Management : comment gérer automatiquement les ressources d'entrée / sortie (déjà présent dans C#.
  • Le logging : c'est toujours d'un usage à préciser.
  • Comment la réduction du nombre de ligne de code augmente la qualité du logiciel :  suppression du code technique inutile.
  • Pour les IHM : le JDK 7 et la décoration des JavaBeans Swing avec le JLayer.

Bonne lecture.


Helios: The Train Has Arrived
The Eclipse Helios release is now available for download. Each year I am amazed how the Eclipse community is release on such a predictable schedule. Congratulations to all that help make it happen.

Helios is the biggest Eclipse release ever! We have over 39 different project teams participating, more than 33 million lines of code, 490 committers, 108 of those committers were individuals and the rest of commiters work for 44 different organizations. The amazing thing is that this is the 7th year in a row the Eclipse platform has been release the last week of June, never missing a schedule release date. What other software organization can make that claim!!



Eclipse 3.6 : Helio Java development tools
Here are descriptions of some of the more interesting or significant changes made to the Java development tools for the 3.6 release of Eclipse. They are grouped into:
  • Java Editor
  • Java Formatter
  • Java Refactorings
  • Java Compiler
  • Java Views and Dialogs
  • JUnit
Justification de l'intérêt des méthodes agiles
On peut définir une méthode agile comme une démarche pour développer du logiciel :
de manière itérative et incrémentale, par des équipes responsabilisées s'appuyant sur un cérémonial documentaire minimal mais pratiquant une collaboration poussée, avec l'objectif de répondre, dans un délai contraint, aux besoins qui peuvent changer des utilisateurs, tout en produisant du logiciel de grande qualité.
  1. Les méthodes agiles, c'est de l'ingénierie du logiciel
  2. L'agilité est un mouvement majeur
  3. L'agilité apporte de la valeur

En résumé
L'agilité est la capacité à répondre au changement, et même à le favoriser, pour mieux s'adapter à l'environnement qui est de plus en plus turbulent : dans notre époque de l'information, l'avantage compétitif vient de la vitesse et de la flexibilité.

How to create a good domain model. Top 10 advices
Domain modeling is the most important part of software design. Having a good model allows developers and business to have a common language, which in turn, makes much simpler the communication of requirements and the maintenance of the application.
Having a good model is synonym of having a low representational gap. Having a low representational gap means that the main concepts and their relationships from the real business model are represented almost identically in the software domain model.
Creating a good domain model is one of the most difficult challenges developers have to face. What follows are some advices to create a good domain model.


HTML5 : la promesse d'un browser qui devient VM
Hier avait lieu une présentation de Peter Lubbers sur HTML5. Une présentation très sympathique qui permettait de repasser en revue les nouveautés d'HTML5, et elles sont nombreuses.

Java theory and practice: Characterizing thread safety
Thread safety is not an all-or-nothing proposition.
Summary: In July our concurrency expert Brian Goetz described the Hashtable and Vector classes as being "conditionally thread-safe." Shouldn't a class either be thread-safe or not? Unfortunately, thread safety is not an all-or-nothing proposition, and it is surprisingly difficult to define. But, as Brian explains in this month's Java theory and practice, it is critically important that you make an effort to classify the thread safety of your classes in their Javadoc.

Project Coin: Small Changes in JDK 7

Implemented Proposals
  • Strings in Switch
  • Improved Type Inference for Generic Instance Creation
  • Binary Literals
  • Underscores in numbers
  • Language support for JSR 292

Yet-To-Be-Implemented Proposals
  • Automatic Resource Management
  • Simplified Varargs Method Invocation
  • Collection Literals
  • Indexing access syntax for Lists and Maps

The Art of Logging
  • Contents
  • Introduction
  • Overview
  • What is logging?
  • A structured approach to logging
  • What should I be logging?

    • The importance of context
    • Logging in a concurrent environment
    • Why not log everything?
    • Not all exceptions are errors
    • Get organised with named loggers
    • Unit test your logging code
    • Conclusions


    Better Software with Less Code
    How to simplify MDD for speeding Java Enterprise Development?

    A notable problem of Java Enterprise Development is its inherent complexity. Either if you use Java EE standard or Spring, your development team will never be as productive as a VisualBasic, PHP, Ruby&Rails, 4GL or even COBOL development team. Complexity of Java Enterprise requires very skilled developers, moreover these developers need to write a lot of code.

    The ideal solution for this problem could be the Model-Driven Development approach. Basically MDD states that just the model part of an application has to be developed, and the rest of the application will be generated from this model. In this way, the developers write less and simpler code, nevertheless a powerful Java Enterprise Application is created.


    Exploring JDK 7, Part 3: Decorating Swing Components with JLayer
    Oracle's release of JDK 7 is expected to occur this coming Fall. This new release will offer a suite of new features for you to learn. In Part 3 of this four-part series, Jeff Friesen focuses on JLayer, a universal decorator for Swing components.