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".

vendredi 30 mars 2012

Veille technologique semaine 13

Pour le bulletin de la semaine 13, je vous propose les articles suivants :
  • un article de saison.
  • La relation entre les oeuvres (cinéma, musique) et le support : Quand les supports influaient sur les oeuvres.
  • La norme OSGi version 5 est annoncé en draft.
  • Le deuxième article sur le threading en C++11 : la protection des données.
  • Le garbage collector et la gestion automatique des resources avec le JDK 7.
  • Les NIO du JDK 7 : la scalabilité
  • La préparation du JDK 8 : les expressions lambda (les closures) et les modules.
  • Un article sur les myths du langage Scala.
  • Les différents cas d'usage de JUnit : le framework de tests unitaires pour Java.
Bonne lecture.


Goto for the Java Programming Language
Work on JDK 8 is well-underway, but we thought this late-breaking JEP for another language change for the platform couldn't wait another day before being published.

Summary
Provide the benefits of the time-testing goto control structure to Java programs. The Java language has a Goto for the Java history of adding new control structures over time, the assert statement in 1.4, the enhanced for-loop in 1.5,and try-with-resources in 7. Having support for goto is long-overdue and simple to implement since the JVM already has goto instructions.


Quand les supports influaient sur les oeuvres
L'avènement de la dématérialisation des médias a eu des conséquences plus discrètes en apparence que dans leur utilisation et leur distribution : la création même en a été bouleversée. En effet, le support physique a été une contrainte en tant que telle, qui devait être prise en compte dans le processus créatif, et qui a eu une influence sur la forme. Certaines contraintes sont évidentes, par exemple pour la musique : la durée totale d'un album n'a désormais virtuellement plus de limites imposées. D'autres sont plus subtiles pour le consommateur, mais pas moins sans conséquence pour les créateurs.


OSGi Provides Early Access Specifications for Release 5
Today at OSGi DevCon, the OSGi Alliance announced the availability of the early access for Release 5 of OSGi Core and Enterprise specifications. The final release of OSGi R5 is expected later this Summer.
What's new in OSGi R5?


C++11 Concurrency Tutorial – Part 2 : Protect shared data
This post is the second of the C++11 Concurrency Series. See the end of the posts for links to the others. In the previous article, we saw how to start threads to execute some code in parallel. All the code executed in the threads were independent. In the general case, you often use shared objects between the threads. And when you do it, you will face another problem: synchronization.
We will see what is this problem in a simple code.



Garbage Collection with Automatic Resource Management in Java 7
This post provides a brief overview of a new feature introduced in Java 7 called Automatic Resource Management or ARM. The post delves how ARM tries to reduce the code that a developer has to write to efficiently free the JVM heap of allocated resources.
One of the sweetest spots of programming in the Java programming language is automatic handling of object de-allocation. In Java world this is more popularly known as garbage collection; it basically means that developers do not have to worry about de-allocating the object allocated by their code. As soon as a
developer is finished with using the object he can nullify all references to the object and then the object becomes eligible for garbage collection.


JDK7: Part 1- The power of java 7 NIO.2 (JSR 203) (important concepts)
This is a 2 parts series of article, focuses on JSR 203 java 7 NIO.2 API.
1. Part 1 will introduce the main concepts involved in the new JSR.
2. Part 2 will covers the important aspects involved in developing NIO.2-based applications by examples and case studies for the concepts introduced in part 1, this will spice up your Java 7 applications with the new I/O capabilities. You will learn to develop NIO.2 applications, beginning with simple but essential stuff and gradually moving on to complex features such as sockets and asynchronous channels. In this article part 1 I will introduce the new and powerful IO API, packaged & delivered in Java SE 7 NIO.2. Also I will cover all the important aspects involved in developing NIO.2-based applications in brief.


What's Cooking in Java 8 - Project Jigsaw
What is Project Jigsaw: Project Jigsaw is the project to make the java compiler module aware. For years java API has been monolithic, i.e. the whole API was seen from any part of the code equally. There has also not been any way to declare a code's dependency on any other user libraries. Project Jigsaw attempts to solve these problems along with others in a very eligant way. In this article, I will highlight the basic concepts of Jigsaw module systems and also explain how it would work with the commands so as to provide a real feel of it. Currently, Jigsaw is targetted to be included in the release of Java 8. In my opinion, this is a change bigger than generics that came with verion 5 of java platform.


What's Cooking in Java 8 - Project Lambda
What is project lambda: Project lambda is the project to enable lambda expressions in java language syntax. Lambda expressions are major syntax in functional programming languages like lisp. Groovy would be the closest relative of java that has support for lambda expressions, also known as closures.
So what is a lambda expression? It is a block of code that can be assigned to a variable or passed as an argument to a method or passed as an argument to another lambda expression just like any other data. The code can also be invoked whenever required. The main motivation behind supporting this in java is to remove a lot of boiler plate code in using certain API that require some code from the API user, but end up using inner classes just because of java's syntax
requirements. The most common such API is the java threading API where we need to be able to tell the API which code to execute in a new thread, but end up implementing Runnable.


Scala or Java? Exploring myths and facts
The popularization of the Scala programming language, noticeable by the abundance of opinions and criticism on blogs and social networks (like this one by Nikita Ivanov from GridGain and the popular Yammer case), greatly increased the amount of information about the language. However, the quality of such information often leaves much to be desired.


Test: JUnit 4 Do's and Don'ts
DEFINITION:
A unit test examines the behavior of a distinct unit of work. Within a Java application, the "distinct unit of work" is often (but not always) a single method. By contrast, integration tests and acceptance tests examine how various components interact. A unit of work is a task that isn't directly dependent on the completion of any other task. A JUnit 4 test case class skeleton:

vendredi 23 mars 2012

Veille technologique semaine 12

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • Siemens étudie les architectures logicielles pour les voitures électriques : avez vous la dernière version du plugin "trafic routier" ?
  • Le club Java de Paris a invité Rémi Forax pour une présentation sur les expressions Lambda en Java pour le JDK 8. Très intéressant.
  • Oracle parle déjà du JDK 9 et du JDK 10 : respectivement pour 2015 et 2017.
  • Un premier article sur les threads (enfin) normalisé en C++ version 2011.
  • Un démonstration de VMWare qui utilise un navigateur HTML 5 pour afficher (à distance) un écran d'une machine virtuelle ! WSX: Virtual Machines in Your Browser. Cela montre le potentiel du HTML 5 mais confirme également une convergence vers cette plateforme HTML 5.
  • Une proposition d'ajouter les "values type" dans la machine virtuelle Java : la manipulation d'objet par valeur. C'est l'équivalent des structures de C# qui permet d'avoir les primitifs, sous-classe d'Object, sans pénalité de performance de gestion de mémoire de ces objets. A suivre.
  • Deux articles au sujet du langage Groovy pour les programmeurs Java. Groovy est un langage normalisée pour la plateforme Java qui est très adapté à construire des DSL (Domain Specific Langage). Un exemple avec un Hello World.
Bonne lecture.


Software Architecture for the eCar of the Future
In a recent news release the Siemens AG addressed how important new information and communications technology will be in future electric cars. A German government funded project investigates in appropriate software architecture for such cars.
Currently, a lot of software is already deployed in cars such as functionality for the emergency braking system, proximity-controlled cruise control, or actice parking aids. However, all the´se features are making the introduction of new features increasingly labor-intensive and expensive. For instance, some components need to be connected with various data transmission systems. Thus, it is almost impossible to add new functions that were not planned before the manufacturing system starts. According to the Siemens researchers, electromobility offers the opportunity to rework the ICT architecture and to quickly integrate new functions.
The central research division of the company is participating in a project funded by the German Government called RACE (Robust and Reliant Automotive Computing Environment for Future eCars). Goal of the project is :


Rémi Forax au Paris JUG
Mardi 13 mars 2012, Rémi Forax est venu au Paris JUG (Java User Group). Au coeur des expressions Lambda en Java La présentation de ce soir porte sur les expressions Lambda. Un sujet passionnant, une fonctionnalité que C# a déjà depuis quelques temps, mais que Java n'a pas encore.


Java News Flash! Oracle Lays Out Java 9, 10 Roadmap
Java 9 and 10 will tackle big data, multi-language interoperability, cloud and mobile and ship in 2015 and 2017 respectively, Oracle said Wednesday.
For the Java Development Kit (JDK) 10 or after, a fundamental change is being discussed: making the Java language Object Oriented. This might see the introduction of a unified type system that turns everything into objects and means no more primitives.


C++11 Concurrency – Part 1 : Start Threads
This post is the first of a series of posts about the new thread library of C++11. C++11 introduced a new thread library. This library includes utilities for starting and managing threads. It also contains utilities for synchronization like mutexes and other locks, atomic variables and other utilities. In this serie of posts, I will try to explain most of the features provided by this new library. To compile the samples of this article, you will need a compiler with C++11 support. In my case, I used GCC 4.6.1 (you need to pass the -c++0x or -c++11 option to get the C++11 support activated).



HTML5 roundup: access a virtualized desktop from your browser with VMware

VMware is developing an impressive new feature called WSX that will allow users to access virtualized desktops remotely through any modern Web browser. VMware developer Christian Hammond, who worked on the implementation, demonstrated a prototype this week in a blog post.


WSX: Virtual Machines in Your Browser
Virtual Machines have always been a great way to work with different operating systems, carry your desktop around with you, and manage lots of servers or configurations. In the past, you'd run the virtual machine on your computer and then use a product like VMware Workstation or Player to interact with them.
In Workstation 8, we introduced the ability to share VMs across a network with other copies of Workstation, and to use VMs running on ESXi/vSphere. You could use any computer in your network to reach any other VM and to manage your servers. I covered this in a previous post, and as I said there, we were very proud of this release.


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.


A quick introduction to the Groovy language (part 1)
Before I start talking about using Groovy's capabilities to create a DSL (mostly in Java), let's take a few minutes to go over what Groovy is.
Groovy is a general purpose scripting language which runs on the JVM, and can largely be viewed as a superset of Java. Take the following program:


A quick introduction to the Groovy language (part 2)
In my previous post, I started with a simple Java program (which also worked in Groovy), and slowly stripped out the cruft until I was left with the following Groovy script:

vendredi 16 mars 2012

Veille technologique semaine 11

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • L'encyclopédie Britannica abandonne la version papier et se concentre sur le version électronique.
  • Un article au sujet du rôle de l'architecture logiciel dans l'industrie du logiciel : elle est très souvent négligée ou dénaturé.
  • Un article au sujet du standard JEE versus le framework Spring.
  • La spécification de JEE7 pour la fin 2012 : le cloud et HTML5 (+JCache).
  • Un résumé des fonctionnalités du framework Akka en version 2, puis une interview de Jonas Bonér au sujet de ce framework Akka : performance et tolérence aux pannes en Scala ou Java dans la même JVM.
  • Une comparaison des deux standards de persistance en Java : JPA (Java Persistance API) et JDO (Java Data Object).
  • Les dix commandements relatif à la gestion de configuration.
  • Instanciation d'un object en Java : savez vous répondre à la question avant de regarder le résultat : quel est le texte affiché ?
Bonne lecture.



L'Encyclopædia Britannica abandonne le papier
L'Encyclopædia Britannica, le pendant anglophone de l'Encyclopædia Universalis, a annoncé qu'elle mettait fin à son édition papier. Son ultime édition, datant de 2010, comprend 32 volumes et coûte 1840 €. C'est un tournant symbolique pour le monde des encyclopédies : l'illustre ouvrage était paru depuis 244 ans, c'était la plus vieille encyclopédie en langue anglaise toujours publiée.


The frustrated architect
Software architecture has a bad reputation

The thought of "software architecture" conjures up visions of ivory tower architects doing big design up front and handing over huge UML models or 200 page Microsoft Word documents to an unsuspecting development team as if they were the second leg of a relay race. And that's assuming the architect actually gets involved in designing software of course. Many people seem to think that creating a Microsoft PowerPoint presentation with a slide containing a big box labelled "Enterprise Service Bus" *is* software design. Oh, and we mustn't forget the obligatory narrative about "ROI" and "TCO" that will undoubtedly accompany the presentation.


Java EE wins over Spring
The past 1-2 years since the release of Java EE 6, you've seen a lot of articles like this latest on TSS that talk about the niceities of Java EE 6!s component model over Spring and how Spring is now legacy. Yup legacy. Who would have thought it? (other than me of course ) I remember internal JBoss emails 4-5 years ago arguing whether we should give up on promoting Java EE as a component model (aka on EJB) and just concede to Spring. Now, 4-5 years later, Java EE 6 has answered the challenge and is a viable, rich, integration technology. So what happened?


JEE7: Looking ahead to a new era
With the release of Java EE 7 scheduled for the second half of 2012, projected JSRs are all up and running. The Java EE 7 release, which will reflect the evolving needs of the industry as it moves into the cloud, is date driven: anything not ready will be deferred to Java EE 8.
Here is an update and summary of the key features of different specifications in the Java EE 7 platform.


Sortie de Akka 2.0
Le framework Akka vient tout juste de sortir en version 2.0. Cette version majeure est issue d'une importante ré-écriture du framework notamment connu pour son implémentation du modèle des acteurs.
Le modèle des acteurs et Akka plus spécifiquement permettent de développer de façon simple et efficace des applications concurrentes, distribuées et hautement disponibles. Il utilise pour cela un modèle de développement orienté message permettant des traitements asynchrones et non bloquants.
Cette nouvelle version apporte un lot important de changements :
  • supervision : tout acteur est maintenant supervisé par un autre acteur qui peut prendre des mesures en cas de problème et gére le cycle de vie des acteurs supervisés (démarrage, arrêt, redémarrage d'un ou plusieurs acteurs en cas d'erreur…). Il existe maintenant un ActorSystem à partir duquel d'autres acteurs pourront être créés,
  • configuration modulaire : il est maintenant possible de configurer beaucoup plus finement les acteurs,
  • adresse des acteurs : cette nouvelle version introduit un système permettant de retrouver nos acteurs en leur affectant un chemin d'accès,
  • localisation transparente : la localisation d'un acteur (local ou remote) se fait maintenant par configuration et est donc transparente au niveau de l'implémentation. On accèdera à un acteur de la même manière qu'il soit en local ou à distance sur un autre noeud du cluster,
  • amélioration et nettoyage de l'API : notamment une réécriture complète des TypedActors,
  • bus d'évènement : ajoute la possibilité d'avoir un système publisher/subscriber permettant par exemple de monitorer l'arrêt d'un acteur,
  • redesign de l'API Future : cette API permettant d'invoquer et de traiter les résultats de processus asynchrones (des acteurs par exemple) à été développée conjointement avec l'équipe de développement de Scala puisqu'elle sera intégrée de base dans la future version Scala 2.10,
  • amélioration notable des performances : la taille des acteurs à été divisée par 2 entre les versions 1.x et 2.0 passant à 300 octets par acteur (sans état). Quelques benchmarks ont aussi été réalisés montrant des performances impressionnantes (20 millions de messages/seconde sur une machine 48 coeurs), notamment grâce à l'utilisation des Fork/Join executors.
Les évolutions futures de Akka 2 tournent autour de la mise en cluster des applications développées avec ce framework. Sont notamment au programme :
  • détection de la disparition d'un noeud,
  • réplication des acteurs (stateless dans un premier temps puis stateful),
  • cluster élastique (répartition de charge, migration automatique des acteurs en cas de crash d'un noeud…).

Java Champion Jonas Bonér Explains the Akka Platform
Jonas Bonér is a husband, dad, programmer, teacher, speaker, author and Java Champion. He is the CTO of Typesafe,which was founded in 2011 by the creators of the Scala programming language and Akka middleware, and is an active contributor to the Open Source community. Most notably, he created the Akka Project, the AspectWerkz Aspect-Oriented Programming (AOP) framework, is a committer to the Terracotta JVM clustering technology, and been part of the Eclipse AspectJ team. Akka middleware was a finalist for the JAX Innovation "Most Innovative Java Technology Award" for 2011.

You have argued that writing correct concurrent, fault-tolerant, scalable applications is too difficult, because developers frequently use the wrong tools and the wrong level of abstraction. Could you give us examples of situations in which this applies?


Which Persistence Specification : JPA ou JDO ?
There are several competing persistence technologies available for Java. Two of these are "standardised" (via the JCP). When developing yourapplication you need to choose the most appropriate technology for your needs. Java Data Objects (JDO) has been a standard since 2001 with therelease of JDO1. It was improved with the release of JDO2. Just to confuse issues the Java Persistence API (JPA) was approved in its JPA1 form, and JDO2.1/JDO2.2 provide updates to JDO2 building on some of the new features of JPA1. Since then we have had JDO3 adding on extra metadata and enhancer standardisation, and JPA2 providing criteria queries. Below we show some of the differences of these 2 standards to give you assistance in selecting what you need. Highlighted in bold are the notable differences where one specification provides something not available in the other.


The 10 commandments of good source control management
Ah source control, if there's a more essential tool which indiscriminately spans programming languages without favour, I'm yet to see it. It's an essential component of how so many of us work; the lifeblood of many development teams, if you like. So why do we often get it so wrong? Why are some of the really core, fundamentals of version control systems often so poorly understood?


Comment est construite une instance ?
La construction d'une instance Java s'effectue en plusieurs étapes qu'il est intéressant de connaître. Cela peut avoir des effets de bords non maîtrisés. Je vous propose un petit exercice pour que vous puissiez vérifier si vous connaissez la construction en Java. Il faut deviner, sans l'exécuter, le mot de passe affiché par ce programme.