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.

Aucun commentaire: