vendredi 29 février 2008

Veille technologique semaine 9



Pour le menu de cette semaine, je vous propose une carte panachée de sujets industriels et techniques :
  • Adobe propose la version 1 de la technologie AIR qui succède au Flash pour le Web bien connu.
  • Microsoft publie ses technologies pour l'interroperabilité : http://www.microsoft.com/interop/principles/default.mspx
  • Première utilisation de la plate-forme Java Android de Google pour les applications de mobilité (smart phone, etc...) ,
  • La suite du cours sur UML 2 : la mise en oeuvre. Je vous rappel que ce cours est disponible à l'adresse suivante : http://laurent-audibert.developpez.com/Cours-UML,
  • Un langage de plus qui commence à être populaire Scala. Il est nativement interroperable avec les plate formes Java et DotNet. On constate, que devant la prolifération des technologies (langages de programmation inclus), il faut essayer de s'en abstraire le plus possible. Il est donc indispensable, plus que jamais, que l'architecture et l'implémentation de nos systèmes logiciels soit indépendante de ces technologies (technologie agnostique).
  • Le péril du typage faible, ou le contraire du Fail Fast : comment trouver les erreurs au plus tôt. THALES a mesuré que le coût de la correction d'une erreur est multiplié par 10 lorsqu elle est trouvé dans la phase suivante celle qui l'a introduite. La moyenne sur les projets logiciels THALES est de 20 fois (avec des pointes à 50 ou 100 fois). Pour la maîtrise des coûts et des délais, il est vital d'avoir un ensemble de technologies qui nous permettent de détecter les erreurs au plus tôt (Model Driven, Composants, typage statique). Ceci est d'autant plus important que THALES a 80% du code développé qui part en maintenance,
  • Quelques réflexions sur le type statique versus le typage dynamique.

Bonne lecture.


Adobe Releases AIR 1.0 and Flex 3.0 - Continues Move to Open Source
12 months after the initial SDK alpha of AIR, Adobe has released Flex 3.0 and the 1.0 version of AIR (Adobe Integrated Runtime). Flex leverages Adobe's Flash player to provide a framework for building interactive rich internet applications (RIAs). AIR in turn allows developers to build desktop applications using either Flex or a combination of HTML/CSS/JavaScript. AIR currently supports Windows XP, Windows Vista, and Mac OS X. Linux support is targeted for AIR 1.1.


Microsoft's Open Protocol Announcement
Microsoft announced a commitment to publishing its document formats this past week under the umbrella of Interoperability Principles
, including document formats for Word, Excel, PowerPoint, and more - with an intent to document most if not all of their communication formats.


La plate-forme ouverte de Google fait ses premiers pas
Trois mois après sa présentation, Android de Google prend forme au Mobile World Congress de Barcelone. Aucun fabricant n'a dévoilé de combiné exploitant la plateforme mais deux grands fondeurs de la planète mobile, ARM et Texas Instruments, ont présenté leurs prototypes.


Mise en oeuvre d'UML
Comme nous l'avons déjà dit, à maintes reprises, UML n'est qu'un langage de modélisation, ce n'est pas une méthode. En effet, UML ne propose pas une démarche de modélisation explicitant et encadrant toutes les étapes d'un projet, de la compréhension des besoins à la production du code de l'application. Une méthode se doit de définir une séquence d'étapes, partiellement ordonnées, dont l'objectif est de produire un logiciel de qualité qui répond aux besoins des utilisateurs dans des temps et des coûts prévisibles. Bien qu'UML ne soit pas une méthode, ses auteurs précisent néanmoins qu'une méthode basée sur l'utilisation UML doit être :

  • Pilotée par les cas d'utilisation
  • Centrée sur l'architecture
  • Itérative et incrémentale

What is Scala?
Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way
. It smoothly integrates features of object-oriented and functional languages. It is also fully interoperable with Java and .Net.

Scala is the successor of Funnel, a language based on join calculus.

Scala is object-oriented
Scala is a pure object-oriented language in the sense that every value is an object. Types and behavior of objects are described by classes and traits. Class abstractions are extended by subclassing and a flexible mixin-based composition mechanism as a clean replacement for multiple inheritance.

Scala is functional
Scala is also a functional language in the sense that every function is a value. Scala provides a lightweight syntax for defining anonymous functions, it supports higher-order functions, it allows functions to be nested, and supports currying. Scala's case classes and its built-in support for pattern matching model algebraic types used in many functional programming languages.

Furthermore, Scala's notion of pattern matching naturally extends to the processing of XML data with the help of right-ignoring sequence patterns. In this context, sequence comprehensions are useful for formulating queries. These features make Scala ideal for developing applications like web services (external link).

Scala is statically typed
Scala is equipped with an expressive type system that enforces statically that abstractions are used in a safe and coherent manner. In particular, the type system supports:

  • generic classes,
  • variance annotations,
  • upper and lower type bounds,
  • inner classes and abstract types as object members,
  • compound types,
  • explicitly typed self references,
  • views, and
  • polymorphic methods.

A local type inference mechanism takes care that the user is not required to annotate the program with redundant type information. In combination, these features provide a powerful basis for the safe reuse of programming abstractions and for the type-safe extension of software.

Scala is extensible
The design of Scala acknowledges the fact that in practice, the development of domain-specific applications often requires domain-specific language extensions. Scala provides a unique combination of language mechanisms that make it easy to smoothly add new language constructs in form of libraries:

any method may be used as an infix or postfix operator, and closures are constructed automatically depending on the expected type (target typing). A joint use of both features facilitates the definition of new statements without extending the syntax and without using macro-like meta-programming facilities.

Scala interoperates with Java and .NET
Scala is designed to interoperate well with popular programming environments like the Java 2 Runtime Environment (JRE) and the .NET Framework (CLR). In particular, the interaction with mainstream object-oriented languages like Java and C# is as smooth as possible. Scala has the same compilation model (separate compilation, dynamic class loading) like Java and C# and allows access to thousands of high-quality libraries.


THE PERILS OF DUCK TYPING
The idea behind "Duck Typing", which has recently be made popular again by Ruby and other script languages, is to make the concept of types less restrictive.

STRUCTURAL TYPING VS. DUCK TYPING
A while ago, I explained why I thought that Duck Typing was dangerous. More recently, Scala
popularized a different type of typing called Structural Typing, which is often described as
being "type safe Duck Typing". Let's take a closer look at Structural Typing and see if it
delivers on this promise.
With Duck Typing, you send a message to an object in absolute darkness
. You don't know whether this object knows this message and you just trust the caller to have passed you an object that does.


Dependency Injection and Type Safety
I've had a couple interesting discussions recently about dependency injection and type safety. In
particular there is a new article up discussing type safety in the Butterfly DI framework. I think
Jakob makes some good points and argues well that perhaps too much is made of the lack of
type safety in Spring XML config
. (And yes, I know you don't have to do it in XML.)

Type Safety when using Butterfly Container (or Spring XML)
It is often claimed that dynamic reflection based dependency injection (DI), like Spring's XML configurations or Butterfly Container Script, are not type safe, and therefore bad, error prone etc.