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.