vendredi 30 avril 2010

Veille technologique semaine 17

Pour le bulletin de la semaine 17, je vous propose les sujets suivants :
  • la fin de la disquette 3,5 pouces : c'est la fin d'une époque.
  • il reste encore les icons, pour l'enregistrement d'un document, sous forme de disquette ?
  • RIA : ou est en JavaFX 1.3 ?
  • Une sortie majeur du compilateur LLVM : Low Level Virtual Machine : une machine vrituelle pour tous. Le compilateur Clang se compile lui-même.
  • La JSR 292 et le multi-langage pour la JVM : 240 langages qui génèrent du byte code pour la JVM.
  • Josh Bloch et l'avenir de Java : interview.
  • Les cinq erreur des manageurs d'équipe de développement logiciel.
  • Les transactions mémoires et le framework DotNet 4.0 :
  • Quel sont les problèmes des applications multi-threadées pour les processseurs multicores.
  • Les notifications par événements dans WebKit : le push pour HTML5
  • Deuxième article sur HTML 5 le push coté serveur.
Bonne lecture


Sony to end floppy disk production
The floppy disk, already abandoned by most computer users, has been pushed closer to extinction by a Sony decision to end manufacturing of the storage media this early next year.
Sony, one of a handful of companies that still sells floppy disk media in Japan, will end sales of floppy disks by March 2011 due to dwindling demand.
The Japanese domestic floppy disk market amounted to about 12 million disks last year, of which Sony had a 70 percent share, it said. A 10-pack of Sony 3.5-inch floppy disks costs ¥570 (US$6) at a central Tokyo electronics store.
Many of the remaining customers are legacy equipment users in the education and research sectors, said Sony.
Demand for the disks peaked in the mid-nineties when the most popular type of floppy, the "HD" disk, offered 1.44MB of storage space, but it began to fall in the latter part of the nineties when the more durable and higher capacity CD-R and CD-RW formats reached the mass market. In contrast to the small capacity of the floppy disk, a CD could hold 650MB so offered obvious benefits to users. In recent years USB memory sticks have become popular for transporting data between computers.
To put the floppy market in perspective, consider those 12 million disks sold in Japan last year. Together they can hold about 17TB of data, enough to fill about 700 single-sided Blu-ray discs.


The Art of the state
Now in this day and age the floppy disk is an anachronism - have any of the myspace generation even ever seen one? It is certainly a few years since the average family PC came with a floppy drive as standard equipment and an online life requires little in the way of
tangible media - and yet the iconography persists.


RIA : Où l'on reparle de JavaFX

JavaFX a beaucoup fait parler d'elle après sa sortie fin 2008. Elle n'avait guère convaincu : on lui reprochait de ne pas être mature, de ne pas offrir de composants graphiques de haut niveau, de ne pas tenir ses promesses de déploiement sur plusieurs plates-formes puisqu'il n'était alors pas possible de l'utiliser sur TV et sur mobile comme cela devait être le cas.

En février 2009, la version 1.1 avait permis le déploiement des applications JavaFX sur mobile (tout du moins théoriquement). La version 1.2, sortie en juin dernier, avait été une autre étape majeure en introduisant enfin des composants graphiques évolués.
Lors de la conférence Devoxx de novembre dernier, il avait été amusant de constater que les sessions et keynotes dédiés à JavaFX, si présents lors de la précédente édition, avaient été remplacés par leurs équivalents Flex avec l'annonce en grande pompe d'Adobe Catalyst. JavaFX disparaissait peu à peu de l'actualité.

Oracle vient d'annoncer l'arrivée de la version 1.3. Les nouveautés sont incontestablement conséquentes :
  • Support étendu de CSS pour le design des widgets : JavaFX supportait déjà CSS, il va maintenant plus loin dans l'intégration de ce langage de style.
  • Nouveaux widgets : une liste déroulante (ChoiceBox), un champ de saisie de mots de passe (PasswordBox), une vuescrollable (ScrollView), un séparateur (Separator) et une bulle d'information (ToopTip).
  • Amélioration de widgets existants : divers améliorations des composants ListView, TextBox et Slider
  • Le support des TV fait enfin son apparition : les TV faisaient historiquement partie des plates-formes de déploiement possibles pour JavaFX mais n'étaient pas accessibles jusqu'alors. Un émulateur de TV vient compléter ce support.
Pour rappel, l'équipe de développement de JavaFX expliquait que leur vision était qu'après une certaine période de développement, les différentes plate-formes RIA convergeront vers un niveau de fonctionnalités similaire et que JavaFX pourrait alors briller du fait de son intégration native à Java. Cette version 1.3 semble bien une étape pour rattraper le (grand) retard face à l'environnement RIA d'Adobe en terme de fonctionnalités, il sera alors intéressant de voir si JavaFX pourra maintenant rattraper son retard en terme d'adoption.


Major LLVM Release!
After a solid six months of development, the next version of the Low-Level Virtual Machine (LLVM) compiler infrastructure is live and ready to download. The new release showcases core infrastructure improvements along with better debug information and code generation. In 2.7, the LLVM front-end, Clang, is now able to bootstrap itself, which is a big deal for any compiler.


Low Level Virtual Machine
The Low Level Virtual Machine (LLVM) is a compiler infrastructure, written in C++, which is designed for compile-time, link-time, run-time, and "idle-time" optimization of programs written in arbitrary programming languages. Originally implemented for C/C++, the language-independent design (and the success) of LLVM has since spawned a wide variety of front-ends, including Objective C, Fortran, Ada, Haskell,
Java bytecode, Python, Ruby, ActionScript, GLSL, and others.


Clang fait ses preuves en s'autocompilant
Le 4 février, les développeurs de Clang, un compilateur pour les langages de la famille du C, ont annoncé qu'il était maintenant capable de se compiler lui-même. Clang, écrit en C++, supportait déjà les langages C et Objective-C. Cependant, il ne gère pour l'instant qu'un sous-ensemble réduit du C++, et n'est pas capable de compiler en entier des projets utilisant toutes les fonctionnalités du langage C++, comme Boost. Le projet vient donc de réaliser une avancée significative, mais ne peut pas encore tout à fait rivaliser avec des compilateurs comme GCC.


JSR 292 and the Multi-lingual JVM
Both Microsoft, through .NET 4 and the DLR, and Oracle, through the Da Vinci Machine project and Java 7, are looking to improve support for alternative languages that target their respective virtual machines. In doing so they reflect a growing trefnd amongst language developers and implementers, who are increasingly using pre-existing runtime environments to host their languages since developing a new runtime from scratch represents such a significant investment. The strengths of the JVM platform, such as efficient garbage collection, a robust security model and the wide availability of the JRE, coupled with the extensive selection of existing libraries and tools, has seen the JVM platform widely adopted for this purpose, with around 240 different languages implemented on top of it.


A Discussion with Josh Bloch on the Future of Java
Sun for many years, currently a Googler, author of the award winning books "Effective Java" and "Effective Java Second Edition" - gave a talk at the recent web-based Red Hat Middleware 2020 conference. The thrust of the talk was guarded optimism and concern about the future of the Java platform under Oracle's stewardship. InfoQ contacted Josh to see if he would be interested in expanding upon these ideas. The discussion - particularly apropos of the increasing exodus of Sun talent from Oracle and concerns over Oracle's handling of the community and the Java Intellectual Property looming - is reaching a fever-pitch of late because it intersects many different, going concerns. We were glad to be able to talk to Mr. Bloch about some of these.


Making Good Software : Top 5 mistakes made by software development managers.
Many times, software development projects fail because of bad project management. From my experience, these are the 5 most common and dangerous mistakes made by software development project managers.

1.- Believing that productivity is mainly associated with man power and working hours.
2.- Not managing customer expectations.
3.- Ignoring feedback from developers.
4.- Controlling as opposite of empowering.
5.- Being afraid of making decisions.


Scaling Up with STM.NET (Software Transactional Memory)
Abstract
Every developer that spent enough time with concurrent applications must have learned that producing a reliable, high performance application that scales gracefully to many core hardware is extremely difficult to do.


Solving 11 Likely Problems In Your Multithreaded Code
This article discusses:
  • Fundamental concurrency concepts
  • Concurrency problems and mitigations
  • Patterns for achieving safety
  • Cross-cutting concepts

Contents:
  • Data Races
  • Forgotten Synchronization
  • Incorrect Granularity
  • Read and Write Tearing
  • Lock-Free Reordering
  • Reentrancy
  • Deadlocks
  • Lock Convoys
  • Stampeding
  • Two-Step Dance
  • Priority Inversion
  • Patterns for Achieving Safety
  • Immutability
  • Purity
  • Isolation

Desktop Notifications with WebKit
Chrome now supports desktop notifications using WebKit's webkitNotifications API.

Why is this awesome? Because it gives online tools like e-mail clients, calendering software, task managers, monitoring systems, etc. an elegant and consistent way to notify users without having to resort to annoying and invasive hacks like window.alert.


HTML5 Server-Push Technologies, Part 2
In the conclusion to his two-part series, Gregor Roth covers the new HTML5 WebSockets protocol.

Contents:
  • 2.2 WebSockets
  • Conclusion
  • Resources
The upcoming HTML5 specification includes a lot of powerful and exiting features which turn web browsers into a fully capable ich internet application (RIA) client platform. Part 1 of this article series presented an overview of the history of the web, and investigated the new HTML5 Server-Sent Events communication standard.

vendredi 23 avril 2010

Veille technologique semaine 16

Pour le bulletin de cette semaine, je vous propose les sujet suivants :
  • Un article sur la dette technique et l'architecture logicielle.
  • Le JDK 6 update 19 et le mélange des Heavyweight et Lightweight Components : les spécialistes IHM apprécierons.
  • Une série d'article au sujet de JavaFX qui sort en version 1.3 : compléments, amélioration de perf, ... ainsi que le top 10 des nouveautés.
  • Google Chrome supprime l'affichage du http:// dans l'URL : premier navigateur grand public ?
  • Le logiciel et la complexité : d'où vient la complexité ? C'est un point de vue apparemment relatif ?
  • Les tests automatique des IHM : il ne faut pas se tromper d'objectif ? C'est un sujet d'actualité.
  • Une Refcard sur le GUI en Java : Swing et SWT.
  • La programmation concurrente en Java : ou en est-on ? Interview.

Bonne lecture.

Scala :
La soirée Scala du Paris JUG a eu lieu ce Mardi 13 Avril, et à ce titre nous tenions à
remercier les organisateurs de cet événement ainsi que les personnes présentes dans la salle.


Philippe Kruchten on Architecture and Technical Debt
If you ignore architecture and rush into software development by trying to drive software development solely with the functional visible part of it, you are running very rapidly into technical debt.


Mixing Heavyweight and Lightweight Components
Historically, in the Java language, mixing heavyweight and lightweight components in the same container has been problematic. However, as of the JDK 6 Update 12 and JDK 7 build 19 releases, mixing heavyweight and lightweight components is easy to accomplish. This article explains some details you might need to know.

A Bit of History
There are two kinds of graphics components in the Java programming language: heavyweight and lightweight. A heavyweight component is associated with its own native screen resource (commonly known as a peer). Components from the java.awt package, such as Button and Label, are heavyweight components. Third-party heavyweight components, such as the following, are also becoming increasingly popular:
  • Java Binding for the OpenGL API
  • JDesktop Integration Components (JDIC) project
  • JRex , a browser component created in the Java language

A lightweight component has no native screen resource of its own, so it is "lighter." A lightweight component relies on the screen resource from an ancestor in the containment hierarchy, possibly the underlying Frame object. Components from the javax.swing package, such as JButton and JLabel, are lightweight components.


The JavaFX 1.3 release is a significant update featuring:
  • New and enhanced support for UI controls, CSS, and programmatic layout
  • A native JavaFX font family called Amble
  • Support for the development of TV applications, including a new TV emulator
  • Enhancements for mobile applications, with the availability of the mobile emulator on the Mac platform
  • Support and improved editing features in NetBeans IDE 6.9 Beta
  • New features and enhanced performance in JavaFX Production Suite
  • Bind performance: 2-3x faster
  • Applet start-up time: 20% faster (with Java SE 6u18+)
  • Text Animation: 5-10x faster (frames per second)
  • Highly complex animations: up to 10x faster (frames per second)
  • Memory usage: 20-33% reduction (real-world apps, with Java SE 6u18+)
  • UI Controls: 50% faster, 33%-50% less memory (typical)

JavaFX 1.3 Top 10
JavaFX 1.3 has just gone live on JavaFX.com. This release is deceptively small, but
has an enormous number of changes under the hood. In this post I will take you
through the Top 10 major features, giving you background information I learned from
working with the JavaFX team, and flooding you with details on interesting tidbits
you might otherwise miss.


Google Removes http:// from Chrome
posted by Thom Holwerda on Sun 18th Apr 2010 11:57 UTC, submitted by Anonymous

Now this is something that I find really interesting. We all know and love Google Chrome/Chromium (and if you don't, you're demonstrably wrong), but Google recently made a change in the developer version that ruffled some feathers: the URL field will no longer show the "http://". This made a lot of people very upset.

For a while now, Mobile Safari has been doing something similar, although I do think in that case, it's about saving space. On Mobile Safari, the scheme is hidden until you tap the URL field to edit. The developer version of Google Chrome takes this a step further, and omits the scheme completely. Bug reports were filed, and in true internet fashion, discussion ensued.

A few things need to be made clear about Chrome's implementation of this feature. The first thing that jumped into my mind was this: some applications, whether they be web or real ones, actually require you to add the scheme (for instance, to autoparse URLs). Google claims to have solved this issue by adding the scheme to your clipboard when you copy and paste URLs from the URL field, however, this behaviour is currently broken in many clipboard implementations. Another thing that you should be wondering about now is what they do with other schemes like ftp, https, and gopher. The solution here is decidedly simple: those will still be shown.

The reason behind this change is obvious: the URL scheme bears little meaning to most people using a browser - they know it's there and how to type it, but it doesn't indicate anything to them. Since computing has been about abstracting away complexity for a while now, it was only a matter of time before browser makers started removing this piece of web history.

That being said, I'm not at all in agreement with the "solution" Google is presenting here. Hiding complexity is not a solution - it's just hiding something. It's like Mac OS X hiding away the UNIX file system layout madness with a layer of kid-friendly directories; it only makes things look pretty - it doesn't actually solve the underlying problem. You can cover up that pile of mangled corpses in your bedroom with a flower-patterned table cloth, but that doesn't actually address the problem of there being a pile of mangled corpses in your bedroom.

Since 99.999% of the people only ever encounter http://, ftp://, and https:// (did I forget any?), why not create a standard set of easy-to-understand icons to replace them, in cooperation with other browser makers? I mean, if Mozilla and Microsoft can agree on the RSS icon (2005, people, that's how far back my OSNews memory goes!), surely we can all get along and do something similar here? Most browsers show a lock icon anyway when browsing to an https site, so this shouldn't be too big of a deal, right?


URL bar no longer shows http://



Complexity is the Problem
Who really believes that complexity is not a problem?
The complexity of modern software is a problem. Some say that it might be THE problem.


From the Editors: OSGi is too complex
Any Java developer, especially one who works with open-source software, will tell you that being the build monkey is a thankless job. You spend all of your time digging through Ant XML files and pulling down the proper classes and methods from constantly updated libraries and packages around the Internet and your internal repositories. Isn't there anything that can save Java from the endless complexity of dependencies?

Well, there's the OSGi development model, which was hailed as the enterprise developer's way to make a modular Java server application without the never-ending burden of dependency wrangling. OSGi promises sane dependency injections with tightly integrated modular code—and the ability to hot-swap code in and out of a running application server without the need for a restart. It's everything Java developers have asked for, right?

Well, yes and no. Yes, in that OSGi is supported by the Java industry, and in that software companies have begun building OSGi support into their servers and development tools. No, in that few enterprise developers seem to be adopting OSGi.
Why is that? We believe that OSGi, rather than simplifying server application development, has actually made it more complex, and there aren't sufficient benefits to justify the added complexity.

The industry seems to understand the problem. SpringSource donated its DM Server to the Eclipse Foundation earlier this year to spur enterprise uptake of OSGi, and even Eclipse Foundation director Mike Milinkovich admits there's a lot of work left to be done to expand enterprise uptake of the OSGi development model.


OSGi: Complexity is NOT The Problem
The editors at SD Times have proclaimed that OSGi is too complex. Unfortunately, they miss the mark, and the following statement taken from the article is misleading.
We believe that OSGi, rather than simplifying server application development, has
actually made it more complex, and there aren't sufficient benefits to justify the
added complexity.

This statement should have been tempered with context. It is not universally applicable, though is made to sound as if it were. OSGi may face challenges, but complexity of the OSGi framework is not one of the long-term inhibitors to adoption.


Comment faire des tests d'IHM sans se tirer une balle dans le pied ?

L'automatisation des tests d'IHM est souvent une mauvaise idée. Le constat est très souvent le même : bien que simple à mettre en place en général, leur apport est souvent mineur par rapport à leur coût (je vous dirige vers l'excellent article de Robert Martin pour creuser le sujet). Comment faire si l'on veut cependant s'engager dans cette voie?


Dans
cet article, Gojko Adzic (commiter fitnesse et auteur du livre passionnant "Bridging the communication gap"), nous livre des pistes pour maximiser le retour sur investissement sur ceux-ci. Tout d'abord, ne surtout pas partir sur de l'enregistrement brut des cas de tests les uns après les autres (avec Selenium IDE par exemple). C'est dans ce cas-là que l'on se tire une balle dans le pied. Les coûts de maintenance explosent et l'intérêt des tests est remis en question au fil du temps.


La clé est de représenter les tests d'IHM sur plusieurs niveaux :

  • Règles métiers
  • Worfklows
  • Technique
Les niveaux supérieurs sont plus stables dans le temps et sont plus compréhensibles que ceux du dessous. Les niveaux supérieurs s'appuient bien évidemment sur les niveaux du dessous pour fonctionner.
Le but de cette approche est de faire en sorte que les tests restent compréhensibles (bon courage pour aller comprendre la règle métier cachée derrière une centaine d'instructions Selenium) et surtout de promouvoir la réutilisabilité afin de garder la main sur la maintenance des tests.


Ruining your Test Automation Strategy.
Everybody wants a test automation strategy nowadays. The reason is clear. It take a lot of effort to run a suite of manual tests; and that effort has be be repeated several times per year. Consider the fate of this poor customer of mine. The picture you see here is simply the Table of Contents of his manual test plan. That plan has tens of thousands of individual manual tests. It costs them millions of dollars to execute, and they must execute it many times each year.


How to implement UI testing without shooting yourself in the foot
I'm currently interviewing lots of teams that have implemented acceptance testing for my new book. A majority of those interviewed so far have at some point shot themselves in the foot with UI test automation. After speaking to several people who are about to do exactly that at the Agile Acceptance Testing Days in Belgium a few weeks ago, I'd like to present what I consider a very good practice for how to do UI test automation efficiently.

I've written against UI test automation several times so far, so I won't repeat myself. However, many teams I interviewed seem to prefer UI level automation, or think that such level of testing is necessary to prove the required business functionality. Almost all of them have realised six to nine months after starting this effort that the cost of maintaining UI level tests is higher than the benefit they bring. Many have thrown away the tests at that point and effectively lost all the effort they put into them. If you have to do UI test automation (which I'd challenge in the first place), here is how do go about doing it so that the cost of maintenance doesn't kill you later.


Getting Started with Java GUI Development
For standalone Java desktop application, developers have two main options. You can use Java Swing, built into the JDK, or you can use the Standard Widget Toolkit (SWT) from Eclipse. Both approaches share some commonality, but each has its own advantages and methods. This DZone Refcard provides a reference on how to use both technologies; the first half of the Refcard will cover Swing, with SWT forming the second .half.


Billy Newport Discusses Parallel Programming in Java
There are several approaches right now to doing parallelism, there is the actor model, there is message passing, there are many different languages that are doing many different things. Which do you think is most likely to be the best match for Java?

vendredi 16 avril 2010

Veille technologique semaine 15

Pour le bulletin de cette semaine, je vous propose les sujets suivants :
  • un article au sujet de la gestion de la dette technique : il vaut mieux la payer au plus tôt plutôt que de la payer plus tard plus chère, avant que l'application s'écroule.
  • Une vague de départ de chez SUN après la convergence avec ORACLE.
  • La programmation par contact en C# : vous avez dit contrat ? Comment éviter l'interprétation d'une interface.
  • La sortie de Visual Studio 10 par Microsoft : en synchrone avec DotNet 4.
  • Le challenge du Model Driven Developpement et les erreurs de compréhensions.
  • Une check liste pour le codage d'une classe.
  • La différence (parfois pas très connue) entre une HashMap et une IdentityHashMap.
  • un article très technique sur la classe ForkJoin du JDK 7 : sur la longue route de la programmation concurrente.
Bonne lecture


Maîtriser votre dette technique
La dette technique est généralement introduite à cause de raccourcis
pris lors d'un développement pour tenter de gagner du temps
, en lieu
et place d'une conception propre, simple et évolutive
. L'évolution et
la maintenance de ce code se feront au prix d'efforts supplémentaires
que l'on peut assimiler à des intérêts financiers.


Dans Monetizing the technical debt, Vikas Hazarati nous explique que
la dette technique doit être maîtrisée faute de quoi, l'application risque de péricliter. En effet, au delà d'une certaine dette
technique, la modification du code risque d'entraîner des
comportements hasardeux (régressions) dans l'application
. La
diminution de la dette (capital) se fera en refactorant le code avant
d'atteindre un niveau de dette trop élevé.
L'article nous explique les
bénéfices de monétiser notre dette technique et donne quelques
éléments pour déterminer le niveau d'endettement (
notamment via
l'emploi d'un plugin Sonar).


La détermination d'un montant de dette technique pertinent semble
difficile à mettre en œuvre et la détermination d'un seuil de maîtrise
semble aussi particulièrement subjective.
Le ressenti de l'équipe de
développement sur le niveau (qualitatif) de la dette technique semble plus pertinent.


Comme l'explique Ward Cunningham, l'
introduction d'une petite dette
technique peut accélérer le développement à condition que celle-ci
soit remboursée rapidement après sa souscription
. Une bonne pratique
pour vous aider à maîtriser votre dette technique est d'identifier le
code à améliorer au moment où vous
l'introduisez et de planifier les
corrections nécessaires lors des itérations suivantes.


Monetizing the Technical Debt


Vague de départs chez Sun/Oracle
Le rachat de Sun par Oracle constitue un changement de politique et
d'identité majeur pour l'entreprise qui avait créé Java. On pouvait
donc s'attendre à un certain nombre de départs de quelques personnes
clé de Sun. Ces dernières semaines ont vu notamment les démissions de :

James Gosling : le créateur du langage Java. Après avoir passé 20
ans chez Sun, James Gosling quitte Sun/Oracle. Son départ a
logiquement fait beaucoup de bruit au sein de la communauté Java.


Simon Phipps : le directeur de la stratégie Open Source de Sun. Il
avait rejoint Sun 10 ans auparavant et était devenu Chief Open Source
Officer il y a 5 ans.


Tim Bray : le co-rédacteur de la spécification XML et directeur des
technologies Web chez Sun. Il rejoint Google dès à présent.
Ces départs retentissants, accompagnés de disparitions de produits et
de changements de politiques, marquent bien la fin d'une époque…


Code Contracts in C#
This article is taken from the book C# in Depth, Second Edition. The author explains different approaches to using Code Contracts.
According to the author, to some developers contracts indicate the expected input states under which the method guarantees to operate correctly. To others, he says, contracts are a firmer guarantee, ensuring also that the code won't execute at all if they fail. The author then describes how to get started with contracts. Lastly, the author discusses failure mode options and contract types based on the needs and context of code use, rounding up the article with a brief overview of validation.

Unless you happen to have used a language supporting Design by Contract before, you may sometimes find yourself unsure of how to proceed with Code Contracts. If you're using it in conjunction with Test Driven Development, what should you write first - the contract or the implementation? Should you write unit tests for the contracts? When is it appropriate to let ContractException be thrown, and when you should throw a standard .NET exception such as ArgumentNullException? Should your release builds check contracts or not?
  • Philosophy: what's in a contract?
  • How do I get started?
  • Unit testing contracts
  • Code contracts in C#: Rewriting binaries with ccrewrite and ccrefgen
  • Simple rewriting
  • Contract inheritance
  • Contract reference assemblies
  • Failure behavior
  • Options, options everywhere
  • Choosing a failure mode
  • Contract types
  • Build configurations
  • Why not validate everything?
  • Summary and prospects

Visual Studio 2010 and .NET Framework 4.0 arrive
As expected, Microsoft today announced the general availability of Visual Studio 2010 and .NET Framework 4. To celebrate, the company is hosting a launch consisting of more than 150 developer-focused events around the world. In
time for the release, Microsoft made sure that developers have access to popular partner extensions earlier than before; approximately 50 partners already announced availability of products and solutions built on the two technologies.

Coming back to .NET Framework, version 4 adds additional support for industry standards, inclusion of the Dynamic Language Runtime for more language choice, new support for high-performance middle-tier applications (including parallel programming, workflow, and service-oriented applications), and side-by-side installation with .NET Framework 3.5. With the .NET Framework 4 Client Profile, the size of the runtime has been decreased by over 80 percent, making it easier for developers to get applications, and therefore users, up and running faster.


Model Driven Development Misperceptions and Challenges
After many years, it still seems that the level of adoption of MDD is not what would be expected. There are a number of inhibiting factors that limit the usage of MDD, such as the lack of awareness of practical MDD success stories, doubts on how it can be used on a daily basis, lack of funding model for up-front investment, or lack of focus for strategic initiatives.

1 - Challenge: The method was not in place and not consumable
2 - Challenge: The right infrastructure and tools weren't in place to reap the benefits of MDD
3 - Misperception: MDD == UML?
4 – Misperception: MDD is a one size fits all solution.
5 – Misperception: The diagrams are the model
6 – Misperception: The code is the model and the model is the code
7 – Challenge: Platform independence is challenging
8 – Challenge: Keep coders creative
9 – Challenge: There was no content to be leveraged
10 – Misperception: MDD is just for Development


The class design checklist
Given the good reception of the TDD checklist [1], I've decided to put together a similar one with suggestions for the generic class and interface design. These entities are the basic artifacts of object-oriented programming, thus this checklist is used at a lower level than the TDD one.
  • Naming
  • Structure
  • Length

Difference between HashMap and IdentityHashMap
Most of the time I use HashMap whenever a map kinda object is needed. When reading some blog I came across IdentityHashMap [1]in Java. It is good to understand the differences between the two because you never know when you will see them flying across your code and you trying to find out why is this kinda Map is used here. IdentityHashMap as name suggests uses the equality operator(==) for comparing the keys. So when you put any Key Value pair in it the Key Object is compared using == operator.


ForkJoin : Bienvenue dans les mondes parallèles
L'API ForkJoin issue de la JSR166y, menée par Doug Lea, sera intégrée à la prochaine version majeure de Java (Java 7) dont la date de sortie devrait être en 2010. Elle va apporter aux développeurs un ensemble de classes permettant à moindre coût de tirer partie des architectures multi cores et/ou multi processeurs sur lesquelles les développements sont exécutés. Ce tutoriel va présenter quelques cas d'utilisation mettant en avant forces et faiblesses de la chose.

vendredi 9 avril 2010

Veille technologique semaine 14

Pour le bulletion de cette semaine, je vous propose les sujet suivants :
  • Toyota utilise un processus en "waterfall", et les méthode agiles ?
  • Taylor : le MDA pragmatique,
  • La convergence des client RIA et RDA,
  • Le portage de Quake II en HTML 5 avec Google Web Toolkit (GWT) : très étonnant !,
  • Les machines virtuelles sont de partout,
  • Une wish list pour GWT,
  • Une synthèse de la programmation par contrats : comment éviter l'interprétation d'une interface ? En définissant un contrat !
  • Les services sur le système Androïde,
  • Les tests unitaires et le langage hamcrest,
  • Les exceptions internes et externes : c'est quoi la différence ?
  • Les tests automatiques d'IHM,
  • Le framework Spring : les annotations pour vous simplifier la configuration,
  • La sérialization en Java.


Bonne lecture.


Toyota Using Waterfall?
Lean software development has been inspired by lean manufacturing and specifically the work that Toyota pioneered in the field. It is then very surprising to find out that the software development arm of Toyota has been traditionally working with waterfall and is in it's infancy in lean software development. Henrik Kniberg reported on this on his blog describing a lean study tour he undertook last year. Henrik and the members of his group had the opportunity to visit Toyota and their head of software development.


Taylor : Model Driven Architecture on rails
Taylor implements MDA. Model Driven Architecture (MDA) is the concept of first defining a Platform Independent Model (PIM) and then using the PIM to generate a Platform Specific Model (PSM). Taylor's simplified UML business models represent the PIM and its customizable templates generate the PSM.

Taylor also applies Convention-based Development. There are many ways to build the same application.
But, if proven conventions are followed then code generation and development can be much more productive and can put you on the fast track to success. Hence MDA on rails. Taylor's simplified UML models embody these conventions.


Clients RIA/RDA : chronique d'une convergence annoncée
Les RIA et RDA sont respectivement les successeurs des applications web et des applications client-serveur. Schématiquement, les RIA offrent un supplément d'ergonomie aux pages web grâce à des interfaces sophistiquées, mais souffrent de l'absence de gestion du mode déconnecté : lorsque l'on perd le réseau ou que l'on ferme le navigateur, tout est perdu. Il en existe deux types : les basiques (Ajax) et celles qui apportent des effets de transparence et multimédias (Adobe Flash et Microsoft Silverlight).

Les RDA, elles, sont des applications embarquées sur le poste de travail, mais déployées et mise à jour sur HTTP, selon le principe des mises à jour Windows. Elles savent gérer le mode déconnecté grâce à un stockage local. Ce distinguo, assez clair il y a encore un an, tend aujourd'hui à devenir un peu flou après les récentes annonces faites par différents éditeurs.


Quake II GWT Port
The Quake II GWT port brings the 3d gaming experience of Quake II to the browser.
In the port, we use WebGL, the Canvas API, HTML 5 the possibilities of pure web applications in modern browsers such as Safari and Chrome.

The port is based on the Jake2 project, compiled to Javascript using the Google Web Toolkit (GWT). Jake 2 is a Java port of the original Quake II source code, which was open sourced by id software.

To make the Jake 2 code work with GWT, we have :
  • Created a new WebGL based renderer
  • Ported the network layer for multiplayer games from UDP to the WebSocket API
  • Made all resource loading calls asynchronous
  • Created a GWT implementation of Java nio buffers based on WebGL arrays (to be ported to ECMAScript Typed Arrays)
  • Implemented a simple file system emulation for saving games and preferences using the Web Storage API

L'invasion des machines virtuelles…
J'ai assisté la semaine dernière à une introduction à SilverLight chez Microsoft. Cette présentation m'a permis de comprendre que SilverLight est une CLR (Commun Language Runtime, c'est-à-dire une machine virtuelle .NET) en version allégée :
Elle ne pèse que 4 Mo (à comparer au 50 Mo du Framework .NET 3.0).

Elle est dédiée à la couche de présentation et exploite une version simplifiée de XAML (Extensible Application Markup Language), le fameux langage de description d'interface de Microsoft. C'est une version simplifiée de WPF (Windows Presentation Foundation) sans gestion de la 3D, et dédiée aux applications en ligne (RIA).

On constate donc une explosion des machines virtuelles chez Microsoft, avec :
  • Le Framework .NET 3.0 pour l'exécution d'applications serveur
  • WPF pour l'exécution d'applications embarquées (RDA)
  • SilverLight pour l'exécution d'applications en ligne (RIA)
  • le Compact Framework pour l'exécution d'applications mobiles embarquées (RMA, Rich Mobile Application)

De son côté, Adobe aura bientôt trois machines virtuelles :
  • Apollo pour l'exécution d'applications embarquées (RDA)
  • Flash pour l'exécution d'applications en ligne (RIA)
  • Flash Lite pour l'exécution d'applications mobiles embarquées (RMA)

Avec l'annonce de Google native Code, je fais suite à ce billet où je parlais des différentes technologies de machines virtuelles/runtimes disponibles.

Panorama des technologies RIA : nous disposons donc aujourd'hui de 5 plateformes RIA :
  • Ajax, la plateforme standard, privée de multimédia
  • Adobe Flash, le standard de fait de l'animation et de la vidéo sur Internet
  • Microsoft Silverlight, la technologie RIA de la plateforme .NET
  • JavaFx, la technologie RIA de la plateforme Java
  • Google Native Code, le dernier né

La convergence des technologies d'interface Tous les acteurs évoqués ci-dessus souhaitent proposer des technologies permettant d'accéder aux applications depuis un PC, un navigateur Web ou un mobile. Ils travaillent donc à créer une plateforme commune pour ces différents environnements (on parle généralement de multicanal).
Ainsi, les applications Java et .NET s'exécutent sur PC, mobile et interface Web : il faut cependant adapter le contenu.
Les technologies Flash (RIA) et AIR (RDA) d'Adobe utilisent la même machine virtuelle et le même contenu.
Google devrait suivre ce chemin. Google Apps est aujourd'hui accessible depuis un navigateur et un mobile. Il est probable que Google annoncera prochainement une forme de convergence technologique.


GWT—An Important Java Technology: Features, Future and Wishes
The Google Web Toolkit (GWT) has become one of the most important Java technologies, as it gives it a credible web platform strategy. I used to be doubtful of the extra compilation step and developed with DWR and Dojo, but have since become a convert.


Design by Contract for Java - Revised
Introduction: Design by Contract (DBC)
• Existing approaches:
. "How to specify / validate / enforce contracts?"
. Summary of existing approaches

• A new approach to implement DBC for Java
. Fundamentals: Java 5 Annotations, Annotation Processing API, Java
Compiler API, Instrumentation API
. "How to specify / validate / enforce contracts? - Revised"
. Demo
. Summary


Article complet: Les services sous Android
En voulant suivre un tutoriel sur le net, j'ai été confronté aux Services sous Android. J'ai donc décidé de m'y intéresser de plus près.
Dans ce très très long billet nous aborderons :
  • Les services (threads, cycle de vie...)
  • LocalService
  • Déclaration du service
  • Implémentation des listeners
  • Implémentation d'un binder
  • RemoteService
  • Déclaration du service
  • Mise en place des Callbacks
  • Démarrer le service au boot du téléphone
  • Exemple : Connexion au service MP3

Using Hamcrest and JUnit
Lately I started using the core Hamcrest matchers bundled with the JUnit framework to create more readable unit tests. Hamcrest matchers were created to improve the readability of unit testing code. It's a framework which facilitates the creation of matcher objects to match rules specified in unit tests.


Internal and External Exceptions
Perhaps the continuing confusion over the difference between checked and runtime exceptions in Java is because we haven't named them properly. Mosts texts and teachers, including myself, have traditionally focused on how and when you handle the exceptions (compile time or runtime) rather than on what causes each. I propose a modification, not in code, but in terminology and teaching. Specifically I think
we should should start calling checked exceptions "external exceptions" and runtime exceptions "internal exceptions".

The idea is this: a checked exception is a response to some external event the program does not have control over.


Testabilité des IHM : commençons (déjà) par Swing!
Tester l'IHM n'a jamais été chose aisée et globalement deux approches s'opposent :

- Tester avec du code. Le principal inconvénient est que cela repose principalement sur le nommage ou l'agencement des composants et – suivant le framework utilisé – peut être assez sensible au refactoring et notamment au modification d'imbrication des composants.

- Tester en mode recorder. Le principal inconvénient reste que ces tests ne peuvent être réalisés que très tardivement (et souvent pas par les équipes de développements) et sont sensibles aux modifications d'IHM (repositionnement d'un bouton etc…). Tout refactoring de ce type de tests est impossible et ces outils sont souvent croisés dans des contextes de pure non regression – ie. des contextes où le développement IHM est stable et où l'on souhaite facilement savoir si quelque chose a été cassée ou non.


Why You Should Use Spring's Annotations-Based Autowiring
Some people find value in having centralized, declarative configurations of XML files.
However, many of the things in those files are not configuration and they do not change after
development. Having a centralized configuration is usually only valuable in small projects. Still, some people find comfort in knowing how the configuration is wired together as a whole, even though the same "wirings" are mainly just duplicated by the dependencies in the code.

Developers who use full autowiring with the @Autowired annotation for Spring have no problems leaving their external XML configs behind.




5 things you didn't know about ... Java Object Serialization
Java Object Serialization is so fundamental to Java programming that it's easy to
take for granted. But, like many aspects of the Java platform, Serialization rewards
those who go digging. In his first article of this new series, Ted Neward gives you five
reasons to look twice at the Java Object Serialization API, including tricks (and code)
for refactoring, encrypting, and validating serialized data.

A few years ago, while working with a software team writing an application in the
Java language, I experienced the benefit of knowing a little more than your average
programmer about Java Object Serialization.

vendredi 2 avril 2010

Veille technologique semaine 13

Pour le bulletin de cette semaine 13, je vous propose les sujets suivants :
  • la conférence EclipseCon 2010 : Oracle, la NASA, ...
  • JavaFX et les outils de design des IHM : photoshop, illustrator, SVG, ...
  • JavaFX arrive-t-il trop tard ?
  • La loi de Conway's : comment l'organisation industrielle du développement d'un système logiciel peut influencer l'architecture de ce système logiciel.
  • Le HTML 5 et le push : enfin pour disponible en standard pour le web.
  • Mise à jour du JDK 6 en update 19 : liste des bugs corrigés.
  • Présentation de la spécification OSGi Enterprise 4.2 :
  • La version 2 de SONAR : ajoutant un septième axe d'analyse de qualité logiciel. A utiliser en urgence.
  • L'histoire de la stratégie de la société en charge du framework Spring.
  • La sortie de EHCache en version 2.0 : version majeure.
  • Analyse des nouveautés de IE 9.
  • Le projet Akka et le challenge de la programmation concurrente.
  • Suite de la présentation de scala.
Bonne lecture.


EclipseCon 2010 roundup
Eclipse-related technologies and tutorials; so, what was there?
The introductory keynote was on Community and Adaptation, by Steve Harris and Jeet Kaul of Oracle. This was Oracle's first opportunity to discuss publicly about where the Java community will be headed; in particular, what Oracle will be focussing on.

The takeaways from the presentation are:
OSGi is important. Integration with Jigsaw will happen; it looks like Qwylt is the interoperation layer JavaFX will continue to be funded and integrated in to both NetBeans and Eclipse The JCP is a process which needs to be remediated, but no plans on what should replace it. (Ed Burnette has an interview on this topic) Updates to the Java platform need to come faster.


Getting Started With JavaFX Production Suite
JavaFX Production Suite is a set of tools for designers that facilitates the process of incorporating rich graphic assets into JavaFX applications. This tutorial shows designers how to export graphics from Adobe Illustrator or Adobe Photoshop, and how to view exported JavaFX graphics. It also provides some useful information about Production Suite.


Is it too late for JavaFX to succeed?
Nearly three years after its introduction, the JavaFX multimedia application development platform that Oracle inherited from Sun Microsystems remains just another entrant in a crowded field, with questions looming about how much momentum the platform can gather.

Unveiled at the JavaOne conference in May 2007 [1], JavaFX is intended to provide a Java-based entrant into the growing market for development of multimedia whiz-bang applications for desktops and mobile devices. JavaFX 1.0 was released in December 2008, and as of June 2009, there had been more than 400,000 downloads of the JavaFX tools and SDK, according to the official JavaFX Web page [2]. JavaFX is available on more than 250 million desktops, the page says. The platform features the JavaFX Script scripting language, a rich client platform and tools, and integration with the Java runtime.


Conway's Law Revisited: Successfully Aligning Enterprise Architecture
For investments in enterprise architecture to pay off, they must be based on a clear understanding of the organization. Whatever approach you choose to implement your enterprise strategy, an understanding of Conway's Law can help to make your alignment efforts successful.*

Conway's Law
In a landmark 1968 article, Melvin Conway stated that the structure of a system reflects the organization that designed the system [Conway68]. This has come to be known as "Conway's Law".


HTML5 Server-Push Technologies, Part 1
The upcoming HTML5 specification includes a lot of powerful and exiting features which turn web browsers into a fully capable ich internet application (RIA) client platform. This article takes a deeper look into two new HTML5 communication standards, Server-Sent Events [9] and WebSockets [10]. These new standards have the potential to become the dominant Server-push technologies for helping developers to write real-time web applications.

Contents :
  • The evolution of the web
  • HTML5
  • Server-Sent Events

Java SE 6 update 19
Please see the Update Release Notes Index for links to Release Notes for each update and a link to the initial Java SE 6 Release Notes. Changes in 1.6.0_19 (6u19).


OSGi Enterprise Spec 4.2 released
Today, the OSGi announced the release of the Enterprise OSGi 4.2 specification, along with the corresponding JavaDoc.
The Enterprise OSGi spec covers features that are useful to many developers (like Remote Services and JDBC) as well as more enterprise-level services (like JNDI, JTA and JPA).

To understand how these OSGi services fit in – and avoid the "OSGi is too complex" rant – it's useful to take a look at how the specs work. Each OSGi service is provided by a package (or packages) with a specific version number, which is independent of the OSGi release number. For example, OSGi 4.2 contains the OSGi org.osgi.framework version 1.5, whilst OSGi 4.1 contained the OSGi org.osgi.framework version 1.4. Packages are versioned using the OSGi versioning scheme, which uses a major number to signify backward compatible breaks, minor numbers to signify forward compatible enhancements, and micro numbers which add no new functionality other than bug fixes etc.


Sonar 2.0
Dans cette première release de 2010, l'équipe Sonar élargit le champs d'analyse de leur outil en y ajoutant un septième axe d'analyse de qualité logiciel. Pour rappel, les six premiers axes déjà supportés par Sonar sont:

  • La couverture de code par les tests unitaires
  • La distribution de la complexité (par classe et par méthode)
  • La recherche de bugs potentiels (avec FindBugs)
  • La détection des codes dupliqués
  • L'insuffisance des commentaires
  • Le respect des normes du langage
Le septième et dernier axe, propose d'évaluer la conception objet à l'aide: Ces nouveaux outils vont nous permettre, d'une part, de détecter et résoudre les cycles de dépendances, et, d'autre part, de surveiller l'étendue des responsabilités de nos classes. L'équipe Sonar reste donc très active, elle prévoit d'ailleurs une nouvelle version pour le courant du mois de mai avec notamment la détection de code mort dans la roadmap.

Les rendez-vous manqués de Spring
Le 10 décembre 2009, après plus de 3 ans de travail du JCP, les spécifications Java Enterprise Edition 6 sont sorties de leur longue maturation. Cette dernière mouture très prometteuse apporte enfin une solution d'injection de dépendance légère et élégante pour des architectures modernes : la spécification CDI (Context and Dependance Injection) qui permet de travailler avec des « managed beans » (pojos
gérés par un conteneur léger) et des EJB 3.1.
Une révolution ? Pas vraiment, puisque depuis près de 6 ans le Framework Spring proposait déjà une solution de ce type.
Sachant que Spring source (VMware) est un membre actif du JCP et a participé à l'élaboration certaines JSR, il est légitime de se demander pourquoi l'implémentation de référence de la solution de CDI de Java EE 6 n'est pas Spring. S'agit-il d'une erreur de stratégie de la part de l'éditeur ou d'un calcul délibéré pour rester le challenger d'un standard très proche en terme de simplicité et de fonctionnalités ?

EHCACHE 2.0

Ehcache est une solution de cache Open Source qui est restée pendant longtemps très basique : aucun mécanisme de réplication n'était proposé. Le projet se limitait alors une table de hachage enrichie d'une logique d'éviction et d'offload sur disque. La réplication du cache sur plusieurs nœuds par RMI est apparue tardivement, et fut suivie d'autres technologies de réplication telles que JGroups ou JMS. Plus récemment, l'acquisition du projet par Terracotta fut assez logiquement suivie de l'introduction d'une réplication par Terracotta en version 1.7.

Ces dernières années ont donc vu un enrichissement (ou une complexification) croissant d'Ehcache. Une nouvelle version 2.0vient d'être annoncée par Terracotta et les nouveautés incluses créent une nouvelle fois la rupture avec les versions précédentes :

  • Support de JTA : Ehcache se comporte maintenant comme une ressource transactionnelle XA. Ce support de JTA place ainsi EhCache face JBoss Cache, maintenant renommé Infinispan, qui se démarquait jusqu'alors parmi les caches Open Source par ses capacités transactionnelles.
  • Write-behind : Ehcache est maintenant capable d'écrire de manière asynchrone et planifiée dans la ressource dont il est la façade.
Les autres nouveautés concernent diverses améliorations liées à la configuration dynamique d'Ehcache ou à l'utilisation de Terracotta.

Il s'agit donc bien d'une version majeure pour Ehcache qui propose désormais de nombreuses fonctionnalités dédiées aux architectures distribuées. Le poids de la distribution s'en ressent puisqu'il est passé de 300 Ko pour la version 1.0 a 14 Mo pour la version 2.0 : une vraie rupture...


Internet Explorer 9 Preview: New Features and Analysis
Microsoft has released a preview version of Internet Explorer 9 with improvements in performance and adoption of standards like SVG, CSS, HTML5
and more.


Akka - Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Actors
Today, the Akka team released version 0.7 of their actors framework for the Java Virtual Machine. The team around Jonas Bonér decided to address the future concurrency challenges instead of the current, shared state and lock based approaches on the JVM with a solution relying on message based actors, software transactional memory and appropriate fault handling strategies.

Akka's sources are available from github. It is Open Source and available under the Apache 2.0 License. InfoQ talked to Jonas Bonér about the intent behind Akka, its current state and adoption, and future plans. His answers start the different sections covered here.

A Scalable Solution to the Concurrency Challenge


Scala, case, Option, None et Some
Après un article d'introduction sur Scala puis un autre sur les Traits et les Collections, nous allons parler un peu de Pattern Matching. Options, Some et None : éviter les nulls Pattern Matching et les listes