samedi 9 juin 2012

Veille technologique semaine 23

Pour le bulletin de cette semaine, je vous propose les sujets suivants :

  • Oracle pert son procès contre Google
  • Les API ne peut pas être "Copyrightées".
  • La journée de IPV6 : avez vous vérifié votre connectivité IPV6 : http://test-ipv6.com/
  • Une lettre de Vauban à son ministre Louvois pour lui expliquer les problèmes qu'il a avec ses entrepreneurs.
  • Intel commence à faire des essais de gravure en 7 et 5 nm ! Il faut compter les atomes ?
  • La programmation fonctionnelle pour la JVM.
  • La modularité en Java : OSGi versus Jigsaw
  • L'utilisation de Hamcrest Core Matcher avec JUnit : l'expression des asserts.
Bonne lecture

Sérieux revers pour Oracle face à Google

Dans le procès qui l'oppose à Google sur la violation de brevets et la copie de fragments de code Java dans Android, Oracle a essuyé il y a quelques jours un nouveau revers, et non des moindres.


En effet, après avoir déjà tranché en faveur de Google il y a deux semaines sur la question des brevets, le juge en charge du dossier, Williams Alsup a également rendu un verdict favorable à Google sur la question de la violation du copyright des API de 37 packages Java reprises par Google dans Android. S'il a bien reconnu que la mise au point de ces API a nécessité un travail créatif, théoriquement couvert par le copyright, Williams Alsup a en effet jugé que les API représentent une "structure de commandes", et entrent donc dans le cadre d'une exception au copyright prévue par la loi pour permettre l'interopérabilité. Le juge indique ainsi que "tant que le code utilisé pour l'implémentation est différent, le Copyright Act permet à n'importe qui d'écrire librement du code pour effectuer exactement les mêmes traitements que n'importe quelle méthode utilisée dans l'API Java", précisant en plus que le nom et la signature des méthodes peuvent être repris.


Il est intéressant de noter que, une fois n'est pas coutume, le dossier est tombé entre les mains d'un juge maitrisant parfaitement le sujet, Williams Alsup ayant indiqué en pleine audience qu'il est lui même développeur, dans une tirade contre l'avocat d'Oracle, pour expliquer à ce dernier qu'une portion de code copiée par Google est particulièrement simpliste, et donc, que cette copie n'a pas pû permettre à Google de prendre un avantage en sortant Android plus rapidement. Baptisée rangeCheck, la fonction en question sert simplement de vérifier qu'un entier est compris entre deux bornes, ce qui est à la portée de n'importe quel étudiant selon le juge, même si l'avocat d'Oracle prétend qu'il ne serait pas capable de le faire lui même en six mois...


Ces quelques lignes de codes sont d'ailleurs le dernier point en suspens dans ce dossier. Mais compte tenu des déclarations du juge sur le sujet, qui a qualifié cette question de "cas de copiage innocent et sans importance" (9 lignes dans une classe en contenant près de 3200), il serait surprenant que la décision finale soit très favorable à Oracle. Au maximum, Oracle pourrait espérer des dommages et intérêt à hauteur de 150 000 dollars, une goutte d'eau par rapport aux plusieurs milliards de dollars initialement exigés par Oracle, qui a déjà revu ses prétentions à la baisse plusieurs fois.


Bien entendu, il reste à Oracle la possibilité de faire appel, ce que l'éditeur a d'ores et déjà annoncé qu'il fera... en espérant probablement tomber sur un juge dominant un peu moins le sujet...

APIs Cannot be Copyrighted
In a decisive legal ruling yesterday, the judge in the Oracle vs Google case declared that APIs are not copyrightable, and Oracle cannot claim anything for the SSO – structure, sequence and organisation of those methods, classes and packages. From the summary judgement:

World IPv6 Launch gets 27 percent of pageviews on IPv6
Today, 3,000 websites have made themselves reachable over IPv6 in order to participate in World IPv6 Launch. (Some have enabled IPv6 prior to today.) The 3,000 includes the top four in the Alexa Web ranking: Google, Facebook, YouTube, and Yahoo. Other notable converters include Bing, AOL, Netflix, Comcast, AT&T, Microsoft, NASA, Sprint, the US Geological
Survey, Sony Japan, and Porsche.
Last year, many websites also enabled IPv6, but turned the new version of the Internet Protocol off again after 24 hours. After that test flight, the Internet Society and other organizers now deem IPv6 permanently ready for prime time: "the future is forever."

L'autorité reconnue de Vauban : lettre à Louvois
Il y a quelques queues d'ouvrage des années dernières qui ne sont point finies et qui ne finiront point, et tout cela, Monseigneur, par la confusion que causent les fréquents Rabais qui se font dans vos ouvrages, car il est certain que toutes ces ruptures de marché, manquements de parole et renouvellement d'adjudications ne servent qu'à vous attirer comme Entrepreneurs tous les misérables qui ne savent où donner de la tête : les fripons et les ignorants, et à faire fuir tous ceux qui ont de quoi et qui sont capables de conduire une Entreprise.

Intel commence à travailler aux gravures en 7 et 5 nm
Aujourd'hui Intel est la seule société au monde à pouvoir produire en masse des puces gravées en 22 nm alors que ses concurrents les plus proches peinent à fabriquer en masse en 28 nm et se contentent le plus souvent d'une gravure en 32 nm.

Functional Programming on the JVM
In recent times, many programming languages that run on JVM have emerged. Many of these languages support the concept of writing code in a functional style. Programmers have started realizing the benefits of functional programming and are beginning to rediscover the powerful style of this programming paradigm. The emergence of multiple languages on JVM have only helped to reignite the strong interest in this paradigm.

OSGi vs. Jigsaw: Kirk Knoernschild on Modularity
Kirk Knoernschild is one of the leading experts when it comes to the OSGi community. DZone recently had a chance ot interview him about his thoughts on modularity in 2012 and his new book is "Java Application Architecture: Modularity Patterns with Examples Using OSGi." The book introduces 18 patterns that will help you design more modular software.

JUnit's Built-in Hamcrest Core Matcher Support
In the post Improving On assertEquals with JUnit and Hamcrest, I briefly discussed Hamcrest "core" matchers being "baked in" with modern versions of JUnit. In that post, I focused particularly on use of JUnit's assertThat(T, Matcher) static method coupled with the Hamcrest core is() matcher that is automatically included in later versions of JUnit. In this post, I look at additional Hamcrest "core" matchers that are bundled with recent versions of JUnit.

samedi 12 mai 2012

Veille technologique semaine 19

Pour le bulletin de la semaine 19, je vous propose les sujets suivants :
  • après la première semaine de procès Oracle contre Google, le jury a retenu, pour l'instant, 9 lignes de code avec copyright.
  • Un article au sujet du remplacement de la mémoire actuelle DDR3 par la DDR4 remplacée elle-même plus tard par l'Hybrid Memory Cube.
  • La machine virtuelle IKVM.NET est capable d'exécuter du byte code DotNet (écrit en C# par exemple) mais également du byte code JVM (écrit en Java par exemple). Il est donc possible de faire interopérer des objects Java avec des objets C#. Il est d'utiliser les méta-données C# (les custom attributes) en Java et inversement d'utiliser les méta-données Java (les annotations) en C#.
  • Un outil de compilation statique traduit le code Ruby en binaire pour iOS. Cet outil est basé sur MacRuby.
  • Les règles de conception objet proposent d'utiliser l'agrégation plutôt de l'héritage. Le problème est que l'agrégation demande de la délégation. Le langage Groovy (ainsi que Ceylon, etc..) propose nativement de la délégation : @Delegate. Explications.
  • Sortie de la première version de l'implémentation de la modularisation du JDK 8 : le projet jigsaw. Le concept de module est connu du compilateur, de l'installeur et du runtime. Ce sont des concepts de haut niveau qui sont intégrés au langage Java. Avec les expressions lambdas, c'est l'évolution la plus importante du JDK 8. Oracle confirme d'ailleurs que le JDK 8 (2013) sera la plus grande évolution de Java depuis le JDK 5 (2005).
Bonne lecture.


Jury Finds Only 9 Lines of Copyrighted Code in Oracle vs Google Case
The Google versus Oracle trial completed the copyright phase last week, with the jury sent out to debate on the merits of the copyright infringement claims of Google's use of Apache Harmony's source code. By the end of last week, the jury had already decided unanimously on three out of the four questions but took the
weekend to decide on the fourth.

Judge Alsup created a Special Verdict Form, asking:
  1. Has Oracle proven that Google has infringed the overall structure, sequence and organisation of copyrighted works?
  2. Has the documentation of the 37 Java API packages as a group been proven as infringed?
  3. Has Oracle proven that Google's use of code is infringing in (A) the rangeCheck in the TimSort class,
(B) the seven Impl files and ACL file or (C) the comments in CodeSourceTest and CollectionCertStoreParametersTest?


Microsoft rejoint l'initiative Hybrid Memory Cube
A court terme, d'ici 2014 pour les serveurs et 2015 pour les ordinateurs grand public, l'avenir de la mémoire vive passera par l'adoption de la DDR4. Cette mémoire augmentera encore de manière significative la bande passante dont les besoins augmentent aussi vite que les coeurs se multiplient. Au delà, certainement pour la fin de la décennie on passera à un système radicalement différent, l'Hybrid Memory Cube.


Running Java on NET/Mono: Jeroens Frijters Discusses IKVM.NET
IKVM.NET (IKVM) is a JVM for the .NET and Mono platforms which allows users to execute Java applications directly. Microsoft's Erik Meijer recently sat down with IKVM creator Jeroen Frijters to discuss several different aspects of the project. The interview is wide-ranging, from discussing the internals of IKVM to the project's goals for the future. Here are some highlights:

.NET developers can use custom attributes in Java code if this code will be run on IKVM. Both platforms (Java and .NET) can use attributes both ways if the code is run on IKVM. So one can use .NET custom attributes in Java code and one can also use Java annotations on C# classes and members.


A Statically Compiled Ruby for iOS
A statically compiled variant of Ruby is now available for building applications that target iOS devices. Known as RubyMotion, this language and tool chain from HipByte fully conforms to Apple's App Store guidelines. In order to do this they had to eliminate any sort of JIT-compiler or interpretation, which some Ruby developers may find limiting.


Practically Groovy: The @Delegate annotation
Exploring the frontiers of duck typing in a statically typed language
In Groovy 1.6, a @Delegate annotation was added to the language. (See Resources for a list of all of the new annotations added to Groovy 1.6.) This annotation allows you to add one or more delegates to any of your classes — not just ExpandoMetaClass.
To gain a full appreciation of the @Delegate annotation's power, consider a common but difficult proposition in Java programming: creating a new class based on a final class. The composite pattern and final classes


Modules in the Java Language and VM
Language changes
1.1. Example
1.2. Rules
1.3. Grammar
1.3.1. Lexical grammar
1.3.2. Syntactic grammar
1.1. Example

module a.b @ 1.0 {

   requires c.d @ /* Use v2 or above */ >= 2.0 ;
   requires service e.f;
   provides g.h @ 4.0;
   provides service i.j with k.l;
   exports m.n;
   permits o.p;
   class cc.dd;

   view a.b.c {
      provides q.r @ 1.0;
      provides service s.t with u.v;
      exports w.x;
      permits y.z;
      class aa.bb;
   }
}


Jigsaw Quick Start
This document gives a quick demonstration on how to create a jigsaw module, create a module library, and install a module in a module library.

mardi 8 mai 2012

Veille technologique semaine 18

Pour le bulletin de la semaine 18, je vous propose les sujets suivants :
  • la première semaine du procès d'Oracle contre Google au sujet d'Android. Oracle demande 1 milliards de dollars à Google.
  • Android porté sur C# : une solution alternative ?
  • Le JDK 7 update 4 passe en version de Java par défaut sur le site www.java.com
  • Quelle est la valeur ajouté d'une bonne architecture logcielle ?
  • Les values types pour la JVM ? C'est quoi ? C'est déjà présent dans C# dès la version 1.
Bonne lecture.

Google vs Oracle : un feuilleton judiciaire émaillé d'indiscrétions
Le 16 avril 2012 s'est ouvert le procès entre Oracle et Google devant la cour fédérale de Californie. Oracle, spécialiste de la gestion de bases de données, accuse Google de violation de propriété intellectuelle. C'est plus particulièrement Android qui est visé. Oracle affirme que la firme de Mountain View utilise du code Java sans sa permission. Le géant du logiciel a racheté Sun en 2010, inventeur de Java et détenteur de brevets sur ce langage... dont Google s'est servi pour construire Android.


Android Ported to C#
Oracle and Google are currently in a $1 billion wrestling match over Google's use of Java in Android. But Java is not the only way to build native apps on Android. In fact, it's not even the best way: we have been offering C# to Android developers as a high-performance, low-battery consuming alternative to Java. Our platform, Mono, is an open source implementation of the .NET framework that allows developers to write their code using C# while running on top of the Javapowered operating system, and then share that same code with iOS and Windows Phone.


XobotOS: Android Build on C# Instead of Java
Miguel de Icaza, Mono's founder, recently announced the creation of the XobotOS research project. XobotOS is the Android operating system with all Java code removed and C# code put in its place. Miguel offers two compelling reasons behind this research project:

Unlike Sun with Java, Microsoft submitted C# and the .NET VM for standardization to ECMA and saw those standards graduated all the way to ISO strong patent commitments. The .NET framework is also covered by Microsoft's legally binding community promise.


Moving to Java 7 as default
Back in February, I wrote a post on this blog stating that the End Of Life (EOL) of public support and public releases for JDK 6 was extended to November 2012, With the release of Java SE 7 Update 4, the Java SE 7 runtime is now available on java.com as the default JRE.


Java 7 update 4

New Supported Garbage Collector: Garbage First (G1)
Starting in Java SE 7u4 the Garbage First Collector is fully supported. The G1 collector is targeted for applications that fully utilize the large amount of memory available in today's multiprocessor servers, while still keeping garbage collection latencies under control. Applications that require a large heap, have a big active data set, have bursty or non-uniform workloads or suffer from long Garbage Collection induced latencies should benefit from switching to G1. For more detailed information about G1 see the G1 documentation page and command line options.
The G1 garbage collector – though not a real-time garbage collector – provides a much faster throughput of allocation/collection, which significantly limits the amount of full GC pauses that are often seen with prior garbage collectors. A presentation on G1 was available in JavaOne 2008, and is based on the ACM paper A generational mostly-concurrent garbage collector. To enable the G1 garbage collector in Java7u4, the same +XX:+UseG1GC is used as detailed on the VM command line options page, and more information is available via the garbage first collector description page.


Java 7u4 Brings Support for OSX
Last week's update of Java 7u4 brought about a number of minor changes to the runtime, including for the first time a release of JDK and JavaFX SDK for Mac OSX.

Prior to this release, Java releases for OSX have come through Apple who in recent years backed away from Java as a runtime platform. With the release of OpenJDK, instead of vendors providing their own variants and customisations on top of the platform, the goal is to have everyone converge on OpenJDK as the reference implementation. One advantage of this is that by moving the support upstream, security fixes will be made available for all platforms at the same time, instead of on a platform-by-platform basis. (Apple was particularly bad at releasing timely updates for its Java runtime; the recent spate of Flashback trojans and viruses were made possible through a Java security hole in Apple's original implementation which had been fixed for a while in OpenJDK.) It is worth noting that it is a 64-bit only build on Lion or later.


Is it worth the effort to design software well?
Design activities certainly do take up time and effort, but they payoff because they make it easier to evolve the software into the future. You can save short-term time by neglecting design, but this accumulates TechnicalDebt which will slow your productivity later.
The problem with no-design, is that by not putting effort into the design, the code base deteriorates and becomes harder to modify, which lowers the productivity, which is the gradient of the line. Good design keeps its productivity more constant so at some point (the design payoff line) it overtakes the cumulative functionality of the no-design project and will continue to do better. We CannotMeasureProductivity nor can we measure design quality.


value types in the vm
Introduction
A value type is a data type which, generally speaking, is designed for being passed by value in and out of methods, and stored by value in data structures. The only value types which the Java language directly supports are the eight primitive types. Java indirectly and approximately supports value types, if they are implemented in terms of classes. For example, both Integer and String may be viewed as value types, especially if their usage is restricted to avoid operations appropriate to Object. In this note, we propose a definition of value types in terms of a design pattern for Java classes, accompanied by a set of usage restrictions. We also sketch the relation of such value types to tuple types (which are a
JVM-level notion), and point out JVM optimizations that can apply to value types.
This note is a thought experiment to extend the JVM's performance model in support of value types. The demonstration has two phases. Initially the extension can simply use design patterns, within the current bytecode architecture, and in today's Java language. But if the performance model is to be realized in practice, it will probably require new JVM bytecode features, changes to the Java language, or both. We will look at a few possibilities for these new features.


Value Types (C# Reference)
Variables that are based on value types directly contain values. Assigning one value type variable to another copies the contained value. This differs from the assignment of reference type variables, which copies a reference to the object but not the object itself.
All value types are derived implicitly from the System.ValueType.
Unlike with reference types, you cannot derive a new type from a value type. However, like reference types, structs can implement interfaces.
Unlike reference types, a value type cannot contain the null value. However, the nullable types feature does allow for values types to be assigned to null. Each value type has an implicit default constructor that initializes the default value of that type. For information about default values of value types, see Default Values Table.

vendredi 27 avril 2012

Veille technologique semaine 17

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • le logiciel comme un service (SaaS)
  • Google propose gratuitement 5Go d'espace disque pour tous avec Google Drive , plus en location.
  • Microsoft met à jour son offre d'espace disque SkyDrive avec 7Go
  • Mise à jour du JDK 7 avec l'update 4 qui propose : première installation de Java par Oracle pour OSX, JavaFX 2.1 avec les éléments multimédia audio et vidéo et son composeur visuel, le garbage collector G1 avec un temps de latence réduit, ...
  • un article sur les très gros logiciel : > 10M Loc : pour doubler la production de code il faut tripler le nombre de développeurs.
  • Le choix des technologies par les développeurs ?
  • Le passage du langage C# (Microsoft) au langage Objectif-C (Apple)
  • Comment faire des IHM "sexy" avec JavaFX
  • JavaFX et le RIA (Rich Internet Application).

Bonne lecture.


SaaS (Software as a Service) : vers un nouveau modèle de logiciel ?
Depuis quelque temps, un nouveau modèle d'informatique se développe : le "logiciel comme-service". Il ne s'agit plus de concevoir le logiciel comme un produit, mais comme un jeu de fonctions évolutives, en lien étroit avec le nuage.
On parle beaucoup de solutions telles qu'OnLive (lire OnLive Desktop fait des jaloux & OnLive arrive en Europe), certains rechignant à la perspective d'une dépendance renforcée auprès des développeurs, mais le SaaS (Software-as-a-Service) est en réalité déjà partout. La frontière entre contenus et fonctions devenant de plus en plus ténue, il peut être difficile de s'en rendre compte, mais des services comme le moteur de connaissances Wolfram-Alpha utilisé notamment par Siri aux États-Unis ou tout simplement la majorité des services de Google (recherche, cartes, mail…) appartiennent à cette catégorie.


Google Drive is here, and you can install it right now
After years of speculation, Google Drive was released today, giving users 5GB of free storage to sync across computers, and finally giving Google a viable competitor to Dropbox, Microsoft's SkyDrive, Apple's iCloud, and the like.
Google announced the new service today and it's available at drive.google.com. Like Dropbox, it makes a special folder in your computer's file system, and any file put in the folder will sync across devices. It's available for Windows, Macs, and Android. Google said it's "working hard" on a Drive app for iOS devices.
On the Web, numerous third-party vendors have already integrated Chrome apps with Google Drive, and Drive has a browser-based file manager as well as integration with Google Docs to display any documents that Docs is compatible with.


Microsoft takes on Dropbox with major SkyDrive update
A couple of years ago we lamented the state of Microsoft's cloud storage services. On the one hand, there was SkyDrive, with gobs of storage. On the other hand, there was Mesh, with file synchronization and remote access. Two separate products, when really there should have been one.
And now there is. Microsoft has rolled out a set of new SkyDrive apps and new online capabilities to make SkyDrive the one-stop shop for file syncing and remote file access. On the software side, there are new clients for Windows and Mac OS X to sync files with the cloud, and updated versions of the Windows Phone and iOS clients (there's no first-party Android app, but Microsoft recommends a couple of third-party programs).


Oracle Releases Java SE 7 Update 4 and JavaFX 2.1

Java SE 7 Update 4
This release marks Oracle's first delivery of both the Java Development Kit (JDK) and JavaFX Software Development Kit (SDK) for Mac OS X. The Java SE 7 Update 4 JDK includes the next-generation Garbage Collection algorithm, Garbage First (G1), which has been eagerly anticipated by the Java developer community. G1 provides predictable garbage collection even for very large applications.

JavaFX 2.1
  • JavaFX 2.1 introduces playback support for digital media stored in the MPEG-4 multimedia container format containing H.264/AVC video and Advanced Audio Coding (AAC) audio.
  • The JavaFX 2.1 release adds enhanced font rendering for modern LCD displays with Windows-style LCD sub-pixel rendering.
  • JavaFX 2.1 is available now for Windows and Mac OS X. A developer preview for Linux is also available.

JavaFX Scene Builder 1.0 Early Access


Java Facts and Figures
  • 97% of enterprise desktops run Java
  • 1 billion Java downloads each year
  • 9 million developers worldwide
  • More than 3 billion devices are powered by Java technology
  • 80% of mobile developers target the Java platform
  • More than 125 million Java-based TV devices have been deployed

Update Release Notes Java™ SE 7 Update 4 Highlights
This update release contains the following enhancements:
  • JDK Support for Mac OS X
  • New JVM (Java HotSpot Virtual Machine, version 23)
  • New Supported Garbage Collector: Garbage First (G1)
  • JavaFX 2.1 Runtime co-installs with JRE 7 during auto-update
  • JAXP upgraded to 1.4.6
  • Java DB upgraded to 10.8.2.2
  • SPARC T4 specific crypto optimizations in the security area
  • New flag to unlock Commercial Features

New JVM (Java HotSpot Virtual Machine, version 23)
HotSpot 23 features JRockit JVM feature convergence. Some of the value-add features of the JRockit JVM are re-implemented in the HotSpot JVM.

New Supported Garbage Collector: Garbage First (G1)
Starting in Java SE 7u4 the Garbage First Collector is fully supported. The G1 collector is targeted for applications that fully utilize the large amount of memory available in today's multiprocessor servers, while still keeping garbage collection latencies under control. Applications that require a large heap, have a big active data set, have bursty or non-uniform workloads or suffer from long Garbage Collection induced latencies should benefit from switching to G1. For more detailed information about G1 see the G1 documentation page and command line options.


100x better approach to software?
Alan Kay speculates in this talk that 99% or even 99.9% of the effort that goes into creating a large software system is not productive. Even if the ratio of overhead and redundancy to productive code is not as high as 99 to 1, it must be pretty high. Note that we're not talking here about individual programmer productivity. Discussions of 10x or 100x programmers usually assume that these are folks who can use basically the same approach and same tools to get much more work done. Here we're thinking about better approaches more than better workers. Say you have a typical stem of 10,000,000 lines of code. How many lines of code would a system with the same desired features (not necessarily all the actual features) require?


Why Developers Keep Making Bad Technology Choices
Today, software developers are faced with a great abundance of options when choosing how to design and implement systems. We are constantly bombarded with choice and are used to dealing with buzzwords like NoSQL, the cloud, REST, Map-Reduce and so on. However, developers in charge of designing systems can be easily seduced into incorporating technologies that don't provide a clear benefit over simpler solutions that aren't as modern or hip. It seems like the KISS principle (Keep it simple, stupid!), while often referenced, is often neglected in favour of more "enterprisey" solutions. Why is this?


From C# to Objective-C
A couple years ago tablet computers were seen mostly as a novelty or consumer toy. But recently a major shift has been occurring in the business world. Many consulting companies that traditionally write line-of-business applications in XAML, Flex, or HTML have suddenly found themselves with an overwhelming demand for iPad applications. Not just toys either, there are a lot of projects gearing up with price tags in the hundreds of thousands or even millions of dollars. While .NET and Java will still be viable back-end platforms for years to come, there are a lot of opportunities for teams that are willing to cross-train.


JavaFX 2: Making Client Apps Sexy Again!
Something strange is happening … Client apps are becoming sexy again!
Wherever we go these days, there is huge interest in JavaFX – developers are getting increasingly excited about the quantum leap that JavaFX 2 provides. Stuff like:
  • Super-fast and eye-popping graphics
  • Feature-rich, styleable, and extensible UI components
  • Full HTML5/JavaScript/CSS integration and interoperability
  • High-definition cross-platform media support
  • Ability to leverage JavaFX with alternate languages such as Groovy, Clojure, Scala,
  • Fantom, and Visage
  • Easy migration from Swing and SWT
  • Full integration into the Java runtime and ecosystem
… and much more
JavaFX 2 is much more than just eye candy – it enables developers to reinvent their client
applications and integrate technologies in ways not possible before. Check out this video
(recording by JavaOne attendee) – especially the last 2 minutes .

JavaFX 2 is coming in rapid-fire succession: JavaFX 2 was released in October of last year, JavaFX 2.2 is now in Developer Preview for Windows/Mac/Linux, and the JavaFX Scene Builder 1.0 is now also available as a Developer Preview. JavaFX 2 is bundled with JDK 7 and
JavaFX will be a standard part of JDK 8 going forward.

For developers, the question is no longer "Is JavaFX real?" but "JavaFX is here to stay – How can we reinvent our client strategy?"


When to use JavaFX 2 instead of HTML5 for a Rich Internet Application (RIA)?
These days, we are starting a new project for realizing a Rich Internet Application (RIA). One of the first questions is: Which technologies and frameworks shall we use? The backend will be Java or another modern JVM language, as we are mainly experienced Java developer. In most use cases, we also prefer web frameworks, which allow to code mostly in Java, as many of us just have basic knowledge regarding HTML and JavaScript.
A decision has to be made for the upcoming project: Shall we use HTML5 or JavaFX 2 for realizing the web client? If you ask Google for "javafx or html5", you do not find much information. In the majority of cases, you end up with a presentation hold at several IT conferences in 2011: "Moving to the Client:
JavaFX and HTML5 Presentation". Here is the Slideshare link (from JavaOne 2011):
http://www.slideshare.net/steveonjava/moving-to-the-client-javafx-and-html5.
Because this presentation does not help much, we took a look at pros and cons, which are listed below in this blog post.
But let's start from the beginning…

vendredi 20 avril 2012

Veille technologique semaine 16

Pour le bulletin de la semaine 16, je vous propose les sujets suivants :
  • la conférence Devoxx qui a eut lieu à Paris, du 18 au 20 avril, a été un succès. L'édition 2013 est déjà prévue.
  • un article sur les choix technologiques : la productivité versus les performances.
  • le modèle économique d'Android :  le casse tête de Google.
  • Les expressions lambdas du JDK 8 : conséquence sur les API des collections : requêtes, filtrage et itérations multi-threadées.
  • Les virtual extension methods du JDK 8 : pour les évolutions des API collections.
  • Le deuxième article au sujet de la programmation concurrente en Java.
  • L'utilisation de JavaFX dans les entreprises : les bonnes pratiques.

Bonne lecture.


Succès pour l'édition 2012 de Devoxx France, annonce de l'édition 2013.
L'édition 2012 de Devoxx France est un succès. Les chiffres viennent de tomber :
• 3 jours de conférence ;
• 133 présentations sélectionnées parmi 488 propositions ;
• 199 orateurs ;
• 36 JUG et UG ;
• 1250 participants (450 initialement prévus).

Du coup l'annonce tombe : Devoxx France 2013 est déjà au programme.


http://www.devoxx.com/display/FR12/Accueil



Modern C++ vs Managed Code: Performance vs Productivity
An interesting discussion about the merits of native code versus Just-In-Time based systems has recently taken place with Herb Sutter of Microsoft and Miguel de Icaza of Mono both providing insightful commentary. Taken together they have provided an informative look at the current state-of-the-art in between native and managed code.
Herb Sutter began by answering the question, "When will better JITs save managed code?" Sutter summarizes his position with the statement that "C++ and managed languages make different fundamental tradeoffs that opt for either performance or productivity when they are in tension." Sutter views C++ as settling the tradeoff by opting for performance whereas managed languages (which he defines as Java/NET) opt for programmer productivity.


Android, le casse-tête économique de Google
Si Android a séduit la majeure partie des consommateurs avec 50 % de parts de marché, le bilan économique est cependant bien moins éclatant pour l'OS mobile de Google. Au point que certains observateurs s'interrogent sur la pertinence de l'initiative de Google : n'aurait-elle pas mieux fait de s'en tenir à un bien plus fructueux partenariat avec Apple ?


State of the Lambda: Libraries Edition
This is an informal overview of the major proposed library enhancements to take advantage of new language features, primarily lambda expressions and extension methods, specified by JSR 335 and implemented in the OpenJDK Lambda Project. This document describes the design approach taken in the rough prototype that has been implemented in the Lambda Project repository. It is intended as a working straw-man proposal; the final version may look different, but there is a working design and implementation that may now serve as a jumping-off point for discussions.


Java 8 virtual extension methods
I've been following the evolution of the Java 8 Lambda expressions project for a while now, and I'm really thrilled by its current state of progress. The latest "easy-to-understand" presentation I've found is this one:
http://blogs.oracle.com/briangoetz/resource/devoxx-lang-lib-vm-co-evol.pdf
Now, as an API designer, I'm particularly interested in the concept of virtual extension methods and I was wondering whether it was also considered to introduce "final" extension methods as opposed to "default" ones. For example:



Introduction à la programmation concurrente en Java (2/2)
Dans un précédent article, nous avons vu comment lancer plusieurs threads pour exécuter des traitements concurrents en Java, manuellement ou via le framework Executor.
Dans cet article, nous étudierons les problèmes qui se posent lorsque plusieurs threads tentent d'accéder simultanément à une ressource, ainsi que quelques techniques simples pour les résoudre.


Best Practices for JavaFX 2.0 Enterprise Applications (Part One)
This article, which is part one of a two-part series, focuses on using best practices for developing enterprise applications in JavaFX 2.0.
JavaFX 2.0 is an API and runtime for creating Rich Internet Applications (RIAs). JavaFX was introduced in 2007, and version 2.0 was released in October 2011. One of the advantages of JavaFX 2.0 is that the code can be written in the Java language using mature and familiar tools.
This article, which is part one of a two-part series, focuses on using best practices for developing enterprise applications in JavaFX 2.0.

mardi 17 avril 2012

Veille technologique semaine 15

Pour le bulletin de cette semaine, je vous propose les sujets suivants :

  • Intel propose des écrans "retina" pour les prochains PC et tablette pour 2013.
  • Microsoft ouvre une division de 75 personnes pour contribuer à des projets open sources.
  • Le site InfoQ a fait une enquête sur les processus et technologies utilisées par la communauté. Résultats : pour les langages de programmation : Java (72%), JavaScript (53%), C# (35%), C/C++ (28%), PHP (21%)
  • Les fonctionnalités d'invocation asynchrone dans le framework .Net 4.5.
  • Un bug d'arrondi dans le JDK 6 corrigé dans le JDK 7 : Math.round (0.499999999999999917) arrondi à 1 avec le JDK 6 et arrondi à 0 avec le JDK 7.
  • Un extrait des slides présenté par Oracle au sujet du JDK 8 et les suivants : jusqu'au JDK 12 pour 2020.
  • Le calendrier du JDK 8 : version finale September 2013.
  • Un article sur l'externalisation de la logique métier avec le moteur de programmation par règles Drools business rules engine.
  • Le troisième article sur le threading en C++11 : les verrous.
  • Le premier article Introduction à la programmation concurrente en Java.
Bonne lecture.

Intel voit des écrans Retina partout en 2013 
D'après le site Liliputing, lors de l'Intel Developer Forum, le fondeur de Santa Clara a donné sa vision des futurs écrans qui équiperont les PC et les tablettes dans les mois à venir. C'est la montée en résolution, à l'instar des écrans Retina de l'iPhone et du nouvel iPad, qui est amenée à voir le jour dès l'année prochaine d'après Intel. Le fabricant de puces voit les tablettes et les smartphones adopter une résolution de 300 ppi, les ordinateurs portables une résolution autour de 250 ppi et enfin les écrans supérieurs à 24" afficher 220 ppi.


Microsoft Births Open-Source Subsidiary
It looks like the folks at Redmond have declared that it's time to wrap their arms around the open source philosophy. Microsoft and open source? Say what? Seems like they're on a streak, with the announcement of ASP.NET MVC, Web API, and Razor being available on CodePlex last week and recent news that Microsoft is ranked as one of the top contributors to Linux.


Results from InfoQ 2012 User Survey
In February, we launched the 2012 InfoQ User survey to gauge community interest in various topics, technologies, and practices. The response was overwhelmingly positive: 2,850 people completed the survey, with thousands of respondents providing very detailed feedback on their areas of interest.
Our aim with this survey was to learn more about InfoQ's readership while testing some of our own assumptions about InfoQ's audience profile and its involvement/interest in specific areas like Cloud Computing, Mobile, NoSQL, and Agile.
The following report summarizes some of our key findings, things that surprised us, and reactions/analysis from members of the InfoQ editorial team.

Table of Contents
1. Programming Languages
2. Practices Being Used for Agile Projects
3. InfoQ Personas
4. Mobile Application Development
5. Cloud Deployments
6. NoSQL Databases
7. Topics of Interest to InfoQ Members
8. Additional Observations
9. Conclusion


New Asynchronous Features Enhance .NET Framework 4.5
Writing asynchronous code has become significantly easier in .NET 4.5, and will no longer require very complex methods or callbacks. The structure of new async tasks will look quite familiar to developers; here's an example of a synchronous method declaration and its asynchronous counterpart:


Why Math.round (0.499999999999999917) rounds to 1 on Java 6 

There are two types of error representation error and arithmetic rounding error which are common in floating point calculations. These two errors combine in this simple example, Math.round(0.499999999999999917) rounds to 1 in Java 6.
Representation error
Floating point is a base 2 format, which means all number are represented as a sum of powers of 2. e.g. 6.25 is 2^2 + 2^1 + 2^-2. However, even simple numbers like 0.1 cannot be represented exactly. This becomes obvious when converting to BigDecimal as it will preserve the value actually represented without rounding.


To Java SE 8, and Beyond!

  • Priorities for the Java Platforms
  • Evolving the Language
  • Java SE 7 Release Contents
  • JDK 8 – Proposed Content
  • Java SE 9 (and beyond…)
  • Vision: Interoperability, Cloud, Language Features, Integration
  • Java SE 2012 to Java 12 (2021)

JDK 8 Milestone and Release Dates 

Oracle has posted in the jdk8-dev mailing list the JDK 8 milestone and release dates for review and feedback. Mathias Axelsson, Oracle's release manager for the JDK, has proposed the following dates for the JDK 8 development milestones.


Externalizing Application Logic 

I originally written this post in our company's blog and I decided to share it here as my first contributed article. This topic is about externalizing application logic through business rules approach using the Drools business rules engine.


C++11 Concurrency Tutorial – Advanced locking and condition variables
This entry is part 3 of 3 in the series C++11 Concurrency Tutorial
In the previous article, we saw how to use mutexes to fix concurrency problems. In this post, we will continue to work on mutexes with more advanced techniques. We will also study another concurrency technique: condition variables.



Introduction à la programmation concurrente en Java (1/2) 

Aujourd'hui, le moindre équipement électronique - ordinateur, téléphone, tablette... - possède plusieurs coeurs, répartis sur un ou plusieurs processeurs. Si l'on souhaite en tirer le meilleur parti, il est nécessaire de se pencher sur les arcanes de la programmation concurrente. Dans cet article, nous verrons ce que sont les threads, et comment les créer et les manipuler en Java.

 

vendredi 6 avril 2012

Veille technologique semaine 14

Pour le bulletin de la semaine 14, je vous propose les sujet suivants :
  • la sortie du composeur visuel pour JavaFX montre l'investissement d'Oracle sur cette technologie. Un rappel de la roadmap, et un zoom sur le builder de scene graph. C'est également un outil qui sépare correctement le rôle de graphiste, de celui de l'informaticien.
  • Une vidéo, sur YouTube, qui montre l'utilisation de ce composeur visuel JavaFX.
  • La mise en page (Layout) avec JavaFX
  • Le planning de sortie du JDK 8
  • Des slides des évolutions du JDK 8
  • Les Virtual Extension Methods du JDK 8 : analyse.
  • Un article sur les objets à options.
  • L'usage de l'annotation @SuppressWarnings en Java

Bonne lecture.


JavaFX Roadmap
At JavaOne 2010, Oracle laid out a long-term roadmap for JavaFX to make it a premier rich client platform. JavaFX 2.0 is a significant milestone towards fulfilling this vision. The following section provides an overview of upcoming features in the JavaFX platform.


JavaFX Scene Builder
A Visual Layout Tool for JavaFX Applications
JavaFX Scene Builder is a visual layout tool that lets users quickly design JavaFX application user interfaces, without coding. Users can drag and drop UI components to a work area, modify their properties, apply style sheets, and the FXML code for the layout that they are creating is automatically generated in the background. The result is an FXML file that can then be combined with a Java project by binding the UI to the application's logic.

Vidéo sur YouTube :

http://www.youtube.com/watch?v=rHcnsEoSK_c


Announcing JavaFX Scene Builder Public Beta
At its heart, the Scene Builder is really a layout tool. One of the most difficult aspects of building apps (and something we see very frequently in the JavaFX OTN Forums) is doing layout and constructing the UI, and this is what Scene Builder needs to be really, really good at.


Laying Out a User Interface with JavaFX 2.0
Learn to use the layout capabilities of JavaFX 2.0 to make nodes in the scene graph appear where
you want them to be and more.
JavaFX 2.0 is an API and runtime for creating Rich Internet Applications (RIAs). JavaFX was introduced in 2007, and version 2.0 was released in October 2011. One of the advantages of JavaFX 2.0 is that the code can be written in the Java language using mature and familiar tools. This article focuses on using the layout capabilities of JavaFX 2.0 to make nodes in the scene graph appear where you want them to be and be the appropriate size as the window is resized.


Proposed dates for JDK 8
First of all I'd like to propose some dates for the implementation milestones for JDK 8 so that there are some high-level buckets that can be targeted for delivering features and enhancements.

Implementation milestones:
- M1: August 2011 - April 24, 2012
- M2: Ends June 14, 2012
- M3: Ends July 30, 2012
- M4: Ends September 11, 2012
- M5: Ends November 26, 2012
- M6: Ends January 30, 2013

General bug fixing from early February till early April 2013
- In early April 2013 the bar is raised to only allow P1-P3 bugs to be fixed
- By mid-June 2013 the bar is raised even higher and only showstopper bug fixes are considered


Java 8: Selected Updates
Warning: Dense Slides Ahead!
  • Modules: Project Jigsaw
  • "Nashorn" JavaScript engine
  • uses invokedynamic; strong Java integration
  • JVM convergence (JRockit + HotSpot)
  • "permgen" removal, manageability hooks, optimizations
  • Project Lambda
  • Better inner classes; defender methods (= no-state traits)
  • Technical debt: going into collections
  • Lambda queries, fork/join integration, immutability, etc.
  • More: APIs, annotations, OS X, Java FX, etc., etc.

La fausse bonne idée des Virtual Extension Methods dans Java 8
Quand on s'intéresse aux évolutions de Java, il faut lire le Touilleur Express (http://www.touilleur-express.fr/) et plus particulièrement son compte rendu "Rémi Forax au Paris JUG" (http://www.touilleur-express.fr/2012/03/16/remi-forax-au-paris-jug/) . Apparemment, les lambda expressions feront leur apparition dans la version 8 du langage, ce dont tout le monde devrait se réjouir.
Je ne suis pas un habitué de Java. Mon premier langage fut le C++ et aujourd'hui celui que je maîtrise le mieux reste C# mais comment résister à l'envie de jeter un coup d'oeil aux évolutions de Java au moment où celui-ci se met à rattraper (un petit peu[1]) son retard sur C# ? Je vais essayer d'expliquer ce que j'ai compris et pourquoi je pense qu'un des choix effectués ne me semble pas être des plus judicieux.


Des Objets À Options
Le modèle objet facilite la réutilisation. Il est possible d'utiliser l'héritage et le polymorphisme pour spécialiser un objet suivant un besoin particulier. Les concepteurs objets conseillent à juste titre, qu'il existe, dans les programmes, une séparation entre les objets métiers et les objets d'interfaces. Cela permet d'extraire un métier sans devoir récupérer une interface gênante. Tout cela est bien joli, mais, à l'usage, ce n'est pas toujours si facile. Étendre un arbre d'héritage pour enrichir un métier ou une interface ne pose pas de problème. Par contre, étendre un métier pour un ou plusieurs usages spécifiques, n'est pas évident.


@SuppressWarnings annotation
The @SuppressWarnings annotation is defined in the Java Language Specification section 9.6.1.5. This section states:
The annotation type SuppressWarnings supports programmer control over warnings otherwise issued by the Java compiler. It contains a single element that is an array of String. If a program declaration is annotated with the annotation @SuppressWarnings(value = {S1, ... , Sk}), then a Java compiler must not report any warning identified by one of S1, ... , Sk if that warning would have been generated as a result of the annotated declaration or any of its parts. Unchecked warnings are identified by the string "unchecked".