martes, abril 18, 2006

Una evaluación integradora de MDA/SF

En septiembre de 2005, Vicente Pelechano y Javier Muñoz, de la Universidad Politécnica de Valencia, publicaron un trabajo que compara, evalúa, y trata de sacar elementos positivos e integradores, de las estrategias de diseño dirigido por modelos y las factorías de software. El trabajo fue presentado en el II Taller sobre Desarrollo de Software Dirigido por Modelos, MDA y Aplicaciones (DSDM), en Granada (España).
En resumen, lo principal de la comparación:
Las Factorías de Software proporcionan una mayor guía para llevar a cabo el desarrollo de software, ya que recomiendan explícitamente el uso de líneas de producto, frameworks de implementación, patrones de diseño, etc.; mientras que MDA se centra en diferenciar entre la descripción del sistema de manera independiente de plataforma y las posibles realizaciones de esa especificación. MDA no proporciona indicaciones sobre cómo se deben diseñar los sistemas, se limita a recomendar que la generación del código se realice a partir de modelos.
Las Factorías Software promueven el uso de Lenguajes de Dominio Especifíco, mientras que MDA promueve el uso de UML, que es de propósito general. Esta es una de las diferencias más importantes entre los dos enfoques y la que, sin duda, es más polémica. Las Factorías de Software recomiendan la creación de lenguajes (de modelado) que permitan a los desarrolladores utilizar las primitivas más adecuadas para cada tipo de sistema. La OMG defiende que debe usarse UML, utilizando sus capacidades de extensión (profiles), cuando sea necesario, para expresar conceptos que no pueden representarse de forma directa en UML.
MDA proporciona lenguajes para la gestión de los modelos (UML, CWM, MOF, QVT), mientras que las Factorías de Software se limitan a describir técnicas que pueden utilizarse para este fin. Por ejemplo, en [6, cap. 8] se describe la posibilidad de especificar la sintaxis abstracta de los lenguajes específicos de dominio utilizando BNF o metamodelos, para estos últimos utiliza una notación similar a la propuesta por MOF. Sin embargo en el apéndice B de [6] se critica MOF desaconsejando su uso sin proponer ninguna alternativa.
MDA promueve explícitamente elevar el nivel de abstracción a la hora de especificar los sistemas, las Factorías Software permiten la creación de DSLs que representen directamente elementos de plataformas de implementación. En varios ejemplos, por ejemplo algunas figuras de [6, cap. 7], se muestran modelos que utilizan primitivas como ASP.NET Service o Windows Application. Siguiendo la estrategia MDA, un sistema debe especificarse utilizando modelos independiente de plataforma (PIM) que, posteriormente, podrán ser transformados o anotados para convertirse en modelos específicos de una plataforma (PSM).
Ventajas de MDA:
Define de manera clara la tecnología que recomienda utilizar para aplicar su enfoque: UML, MOF, QVT, etc. Esto facilita la tarea de construcción de un método a los desarrolladores que quieren aplicar este enfoque. Podemos contar con lenguajes ampliamente conocidos que, en gran parte, no necesitan de descripción y disponen de abundante documentación.
Está más tiempo en el mercado, ya que fue presentado con anterioridad a las Factorías de Software. Debido a esto, MDA ha sido más estudiado, discutido y
aplicado. Este aspecto facilita la aceptación de un método por parte de la comunidad de la Ingeniería del Software.
Ofrece un mayor soporte de herramientas que están empezando a madurar. Esto ocurre debido a dos causas: (1) OMG está compuesto por muchas empresas que desean ofrecer productos que sigan las especificaciones de OMG, y tal y como se ha dicho en el punto anterior, (2) MDA es conocido desde hace más tiempo. Por ejemplo, Eclipse es un entorno de desarrollo extensible, libre y promovido principalmente por IBM. Este entorno tiene una amplia comunidad que desarrolla extensiones para proporcionar funcionalidad muy diversa. Entre estas extensiones destaca EMF, una extensión para el metamodelado basado en el estándar MOF de OMG capaz de almacenar los modelos en formato XMI 2. También existe una extensión que proporciona una implementación del metamodelo de UML utilizando EMF, disponiendo en estos casos de implementaciones libres de los estándares de OMG. Por otra parte, las Domain-Specific Language Tools que Microsoft propone para construir Factorías de Software todavía se encuentran en fase de desarrollo, por lo que no son muy robustas y no pueden aplicarse en entornos de producción industrial.
Ventajas de Software Factory:
Proporcionan una completa guía metodológica a los desarrolladores. Con las Factorías de Software se definen de forma más clara y precisa los pasos que deben llevarse a cabo para construir un método que siga esa aproximación. Esto ha quedado patente en la sección 4.2, donde se ha descrito cómo se deberían aplicar cada una de las estrategias para crear un método para el desarrollo de sistemas pervasivos. La cantidad de información para la construcción de métodos que proporciona el enfoque de las Factorías de Software es mayor que la proporcionada por MDA, ya que éste último no da ninguna pauta sobre cómo se deberían implementar los sistemas.
Integra muchas áreas de la Ingeniería del Software que ya han sido investigadas y puestas en práctica (líneas de productos, patrones de diseño, construcción de frameworks, etc.). De este modo, este enfoque no parte desde cero, sino que integra el conocimiento de estos temas.
El principal promotor es Microsoft, por lo que su posición dominante en el mercado puede conseguir que el enfoque de las Factorías de Software acabe implantándose en la industria. Pese a ello, se debe tener en cuenta que OMG también auna un número importante de multinacionales del desarrollo de software, por lo que esta ventaja puede ser relativa.

MDA + Factorías de Software?
Cada uno de los enfoques discutidos hace énfasis en ciertos aspectos del proceso de desarrollo de software. Esto les confiere ciertas ventajas respecto al otro en aspectos específicos y claramente diferenciados. Una cuestión que surge rápidamente es ¿sería posible integrar los dos enfoques? Para ello deberíamos seguir las recomendaciones de ambos e integrar de algún modo líneas de productos, modelos de alto nivel de abstracción, frameworks de implementación, lenguajes de dominio especifico, los lenguajes de OMG, etc.
Seguir este enfoque integrador tiene una serie de ventajas:
1. La estrategia general del método está definida: línea de producto + framework de implementación + lenguaje de dominio específico.
2. Las técnicas a utilizar están definidas:
MOF + QVT.
3. Existen herramientas de soporte: EMF de Eclipse o MDR de NetBeans, por ejemplo.
4. Se pueden aplicar técnicas conocidas propuestas por las factorías de software, como los "feature models"para la construcción de la línea de producto o los patrones de diseño para el desarrollo de framework de implementación.

Por lo tanto, para desarrollar una método que integre MDA y Factorías de software habría que:
• Hacer uso de la estrategia metodológica que proponen las Factorías de Software; es decir, seguir un enfoque basado en:
1. el desarrollo de una línea de producto,
2. la construcción de un framework de implementación para los sistemas
que serán desarrollados siguiendo la línea de producto, y
3. la definición de un lenguaje de dominio especifíco (DSL) que permita capturar los requisitos específicos de cada uno de los sistemas utilizando las primitivas conceptuales más adecuadas para ese tipo de sistemas.
Construir el DSL de manera que:
1. proporcione primitivas conceptuales independientes de plataforma.
2. se especifique siguiendo las técnicas que propone OMG (creación de un
profile UML o definición de un metamodelo con MOF).

viernes, abril 14, 2006

Cuando Software Factory no es una marca comercial

En algún momento, en otro sitio, se ha discutido sobre Software Factories, discriminando los dos conceptos involucrados en este nombre, devenido marca en manos de Jack Greenfield y otros. Pero la primera definición de SF fue la de la construcción de software siguiendo procedimientos "industriales". Repitiendo la definición comentada en otro lugar:
la Fábrica de Software refiere el sentido de producir con rapidez y calidad a través de procesos conocidos, repetibles y gerenciables, y principalmente, mejorables continuamente, no sólo por la incorporación de técnicas y herramientas en el desarrollo del software, sino porque se mantiene constantemente el foco sobre el mejoramiento del proceso de producción y cada uno de los pasos que esto acarrea. Aaen, Bøttcher y Mathiassen indican que el "término fábrica indica un compromiso a largo plazo, esfuerzos integrados - por encima de proyectos individuales- para mejorar las operaciones relativas al software".
Entre los significados de la fábrica de software, mencionan Aaen, Bøttcher y Mathiassen, "mejorar la efectividad del proceso, reducir la cantidad de retrabajo y reusar el ciclo de vida de los productos". De forma tal que se puedan obtener mejores resultados en menor tiempo y con menos costos, pero agregan que además sea una industria en la cual las actividades del desarrollo de software sean "predecibles lo que significa que los costos estimados y compromisos de cronograma pueden ser satisfechos, confiables lo que significa que la capacidad del proceso es conocida, mejora continua significa que la atención constantemente se concentra en mejorar el proceso y que el conocimiento y las habilidades para mejorar están establecidas. Todo esto debería ser logrado a través de la atención al proceso (mejoramiento) y no a los métodos o herramientas", lo que supone la utilización de métricas y técnicas aplicadas al proceso del software y apuntaría a la satisfacción de las dimensiones de la calidad enunciadas por Falconi Campos.(calidad intrínseca, entrega del producto, costo, motivacion de sus productores, seguridad). Falconi Campos, Vicente. TQC: Control de la Calidad Total (al estilo japonés). Bloch Editores S.A., Rio de Janeiro, 1994.)
Así, la utilización de métodos repetibles, mejorables, seguros y confiables, están entre los objetivos básicos de la construcción de software "industrial". El concepto de desarrollo basado en modelos de OMG (y otros) procura justamente la construcción de software confiable, no dependiente de la pericia de cada desarrollador integrante del proyecto, y que sea capaz de ser sostenible en el tiempo. A pesar de lo que Greenfield y otros sostenedores de la versión MS de Software Factories afirman, MDA (y otros proyectos relacionados) son excelentes conductores de estas ideas. Thales Research & Technologies de Francia muestra que es posible encarar un proceso SF basado en conceptos MDA. Participante activo en OMG, sostiene varios proyectos conducentes al desarrollo de aplicaciones basados en modelos convertidos luego en código, y uno de estos proyectos en curso trata de sostener una Fábrica de Software por medio de un constructor MDA. Un papel expuesto por Benoît Langlois y Daniel Exertier en OOPSLA 2004 detalla el proyecto a esa fecha. Su análisis puede servir para estudiar cómo usar el desarrollo basado en modelos para la construcción de sofware a gran escala:
A major issue in software engineering is software production improvement. This paper studies the objectives and the features of a model-driven software factory contributing to automate the production of software systems in evolving environments (specifications, standards, technology, and tools). Through these considerations, this paper introduces MDSoFa, a Model-Driven SOftware FActory tool developed at THALES meeting this need, and a set of technical and methodological lessons learned from this tool implementation and usage.(...)
In this paper, we analyze the combination of two approaches, model-driven engineering and software factory, to rationalize software production. The main interest of model-driven engineering is that model is the primary type for developing systems, e.g. from requirements down to code, and this in different perspectives, as domain, technical, or process. The main interest of software factory is software production automation, for going from a handcrafted to an industrialized software production and for allowing development time reduction and software quality improvement. In this vision, a model-driven software factory is a software factory where models are central with the main objective to ease and industrialize software production.(...)
A clear and predictive method of work needs standard domain, technical or process assets. Standardization can be international, enterprise, or project wide. Besides, a rationalized process implies not only rationalized activities but also engineering tools adapted to the defined engineering processes. The common denominator is to develop a systematic method of work, the way for automation. The interest is to create a synergy between standards, processes and tools, raising together the software production maturity level.(...)
A model-driven software factory is a combination of metamodels, expertise, tools and frameworks for producing output assets in an industrial way, that can be also metamodels, expertise, tools and frameworks, i.e. recursively, a model driven software factory can produce a model-driven factory. Depending on the focus of the produced assets, a software factory has the following functions:
  • Model factory. In this case, models are produced automatically from models. For instance, a model transformation can be deduced from the application of a model transformation pattern on a domain metamodel.
  • Expertise factory. In this case, the software factory produces specific or generic expertise from specific or generic expertise. For instance, model checks and wizards can be produced from a methodological metamodel and a generic expertise for model checking and assistance.
  • Tool factory. In this case, the software factory produces tools or executable environments in a tool, as a tool-specific modeling chain.
  • Framework factory. In this case, the produced asset is a framework.
  • Software factory factory. As mentioned above, this specific case covers the reflective approach when all types of asset are involved in input and output of the software factory for producing a software factory.(...)
We focus now our interest on software factories producing modeling software factories, involving cooperation of heterogeneous domains and pieces of expertise, with development qualities to be respected. In the model-driven perspective, a software factory production can be seen as a mapping execution: the modeling environment is modeled at the metamodel level and the result of the software factory is the modeling environment that will be used by modeling users. (...)This software factory mapping is comparable to an abstract to concrete syntax mapping, or, in MDA terms, to a PIM (Platform Independent Model) to PSM (Platform Specific Model) mapping. A further step consists in instantiating the same software factory for different modeling tool platforms, each having its own specificities (tool-vendor UML metamodel, language, packaging, deployment protocol…) where target platform becomes a parameter to be considered during the software production. This is key for large companies where methodologies and practices are similar with different modeling tools.
Este es un proyecto en curso. No necesariamente es la única solución, pero sin duda sugiere mejores vías de construcción del software.

domingo, abril 09, 2006

Más sobre MDA vs SF

Continuando una discusión abierta hace algún tiempo en The Server Side, Jack Vaughan expone sobre Software Factories brevemente, sólo para recordar que parecería que el principal objetivo de hablar sobre SF es desacreditar la iniciativa Model Driven Architecture. Sin embargo, en el marco de usuarios esperanzados en Visual Studio 2005 Team System, un puñado de observaciones críticas apuntan a la inconsistencia de este concepto en su desarrollo actual: en primer lugar, simplemente el remate del comentario de Vaughan.
Not discussed here, of course, is the idea that a key goal behind MDA is to create models that are high-level enough to be platform independent. Frankly, and for obvious reasons, this is not too often a driver in the MS camp
...es decir, evidentemente un punto fundamental en la discusión es la posibilidad de modelar con independencia de la plataforma, bajando el diseño a código, sea en Windows, Linux, Unix o AS400.
Pero es en la pequeña lista de respuestas, casi todas ellas desde el propio campo, donde se puede sacar más sustancia:
Dice Tad Anderson:
My frustration is with today, and the tools we are being handed today. With VSTS 2005 I lose XDE, I gain a DSL roundtrip class diagram modeling tool, and a bunch of Data Center modeling tools. So now I am stuck with the choice between Sparx, Borland, and some other tools to be able to do my job today. I don't have time to write a DSL UML tool so I can architect this project, and I wouldn't even if I had the time.
My frustration is not with your Software Factory movement, my frustration is with the gap that has been put in place by MS making us wait for your Software Factories movement to produce the tools and process frameworks we need to do our job. So I am not against your movement of Software Factories, I am against Microsoft's position of promoting it as what will be available, while providing nothing to us today
Otras intervenciones incluyen una defensa de SF de Aidas Ozelis, respondida detalladamente por Jon Kern, de OptimalJ.

domingo, febrero 19, 2006

The C Family of Languages

A propósito de los comentarios sobre John Vlissides , me interesé por el blog Lambda the ultimate, sostenido por Ehud Lamm, que también le dedicó una breve referencia. El caso es que Lambda...reúne un gran número de entradas de interés sobre lenguajes de programación, abiertos por paradigmas (Funcionales, Objeto-Funcionales, Lógico-Declarativos, Orientados a Objeto), y otros asuntos de fundamentación teórica. Agendarlo y seguirlo...
Viene al caso de la visión irónica de Billy Hollis sobre la "familia de lenguajes C", la republicación de un reportaje a Ritchie, Stroustrup y Gosling de julio del 2000, sobre el suceso de la familia, sus puntos de contactos, y sus diferencias, y reeditado en 2005 por Herb Sutter:
Among technical factors, C and C++ benefited from their closeness to machine and absence of artificial restrictions on what can be expressed. That allows low-level systems work to be done in these languages and for the full performance of a machine to be delivered to its users. Java benefited from running in its own virtual machine and from coming with a large set of libraries that decrease the time needed for a programmer to become productive. Unix gave a similar boost to C. In contrast, the C++ world suffers from fragmentation of its huge base of libraries, many of which are proprietary and supplied by competing vendors.(Stroustrup)
Qué hubiera hecho distinto?
There are a bunch of things that I'd do differently. There are a number of things that I'm not entirely happy with and it's not clear what the right answer is. I'm not really happy with the schism between interfaces and classes; in many ways it feels like the right solution wouldn't get in the way.

There have been a number of things -- like, for example, multiple return values -- that these days I kind of wish I had added. That was one where I really liked the feature and most other people just sort of went, "Huh?" Another one that sort of went that way was that I had been going down this route of having a bunch of stuff to do with preconditions and postconditions and assertions in an Eiffel-like way, and actually in the community of people who were using it at the time the average answer was, "Huh? Why would I ever want that stuff?" I think that the average developer today would say that too. But then there's a pretty reasonable crowd of people who believe in things like Design By Contract, and it's one of these things where a lot of people feel like, "If only the rest of the world was educated enough to understand what this is about, they'd be better off." And I actually kind of agree with that. The problem is that most of the world could actually care less.

There are some things that I kind of feel torn about, like operator overloading. I left out operator overloading as a fairly personal choice because I had seen too many people abuse it in C++. I've spent a lot of time in the past five to six years surveying people about operator overloading and it's really fascinating, because you get the community broken into three pieces: Probably about 20 to 30 percent of the population think of operator overloading as the spawn of the devil; somebody has done something with operator overloading that has just really ticked them off, because they've used like + for list insertion and it makes life really, really confusing. A lot of that problem stems from the fact that there are only about half a dozen operators you can sensibly overload, and yet there are thousands or millions of operators that people would like to define -- so you have to pick, and often the choices conflict with your sense of intuition. Then there's a community of about 10 percent that have actually used operator overloading appropriately and who really care about it, and for whom it's actually really important; this is almost exclusively people who do numerical work, where the notation is very important to appealing to people's intuition, because they come into it with an intuition about what the + means, and the ability to say "a + b" where a and b are complex numbers or matrices or something really does make sense. You get kind of shaky when you get to things like multiply because there are actually multiple kinds of multiplication operators -- there's vector product, and dot product, which are fundamentally very different. And yet there's only one operator, so what do you do? And there's no operator for square-root. Those two camps are the poles, and then there's this mush in the middle of 60-odd percent who really couldn't care much either way. The camp of people that think that operator overloading is a bad idea has been, simply from my informal statistical sampling, significantly larger and certainly more vocal than the numerical guys. So, given the way that things have gone today where some features in the language are voted on by the community -- it's not just like some little standards committee, it really is large-scale -- it would be pretty hard to get operator overloading in. And yet it leaves this one community of fairly important folks kind of totally shut out. It's a flavor of the tragedy of the commons problem.(Gosling)

y mucho más...

miércoles, febrero 15, 2006

Oracle: interés en Open Source

Dana Blankenhorn comenta en los blogs de ZDNet el incremento de la presión de Oracle sobre nuevos objetivos de control: Recursos de la comunidad de código abierto, MySql en primer lugar. Primero, la compra de InnoDB, y ahora la compra de SleepyCat Software, soporte de Berkeley DB, que tambien puede ser usado como motor de MySql:
Sleepycat, too, can be used as a storage engine with MySQL. Shimp said that its acquisitions of Innobase and Sleepycat do not change Oracle's relationship with MySQL and that both companies will operate as stand-alone entities within Oracle.
Blankenhorn menciona lo que Sarah Lacey comenta en Business Week:
Oracle is in talks to buy at least three open-source software companies in deals that could be valued at more than $600 million, BusinessWeek Online has learned. The transactions would extend the 18-month, $18 billion spending spree by Oracle Chief Executive Larry Ellison that has engulfed PeopleSoft and Siebel Systems. They would also put Oracle in control of some of the most sought-after open-source projects. Overnight, Redwood Shores [Calif.]-based Oracle would rival IBM (IBM) as the prime evangelist of a movement that's revolutionizing how software is developed and distributed [see BW Online, 2/6/06, "Open Source's New Frontiers"].
Sin embargo, aunque Blankenhorn califica la situación del mercado ERP como duopolio, con Oracle y SAP como controlantes, estima que el código Open Source es de todas formas incontrolable:
In the end open source is a bit like water. It flows no matter what you do. Oracle is going to learn that, but it will take time.

martes, febrero 14, 2006

John Vlissides

El 24 de noviembre del año pasado, siendo muy joven aún, murió John Vlissides, coautor de Design Patterns, y por lo tanto parte de la fundante Gang of Four. Un cáncer cerebral a los 44 años causó su desaparición. Me enteré sólo por un comentario en comp.object, el foro de OOD en Google. Quizá porque tuve demasiado que hacer en estos meses, esta fue la primera noticia que tuve de su muerte; luego encontré que incluso el Washington Post le dedicó un obituario. En particular, Ralph Johnson (GoF), le dedicó un recuerdo en su blog. Ironicamente, el resumen de su actividad en IBM, no es localizable en este momento...(Sólo un reportaje).
The Server Side también le dedicó una serie de memorias de personas que se formaron en el seguimiento de sus investigaciones (enlace en el título de esta nota).

miércoles, enero 25, 2006

Qué patrón de diseño usar para versionamiento?

Un interesante hilo de discusión se acaba de abrir en comp.object, el sitio de discusión sobre OOD en Google:
I need to implement a history/revision system. Such that there will be an object and as it's values change, the revision changes and there is a history of the old values. What is the correct design pattern to use to implement something like this?
HS Lahman y otros abren ideas sobre cómo tratar el versionamiento como objetos con historia. Para seguir, y si se anima, aportar.

CSS para principiantes

En Techrepublic, entre los cientos de recursos disponibles, un buen manual de aprendizaje de CSS y XHTML.

Mas sobre Google Talk y Open Federation

Sean Michael Kerner dedica un breve artículo a Open Federation, destacando la implementación del protocolo Jingle , base para un salto hacia VOIP:
The Jingle specification extends the XMPP protocol for VoIP and other P2P communications and uses.
Enlace al artículo en el título de esta nota.

sábado, enero 21, 2006

Una visión irónica de la polemica C++/Java

Suelo encontrar entre los devotos de C++ y Java una oposición calurosa que tiende a elogiar sin críticas el bando propio, y negar todo en el lenguaje o arquitectura ajenos. Billy Hollis ofrece un resúmen sarcástico de la evolución de C a C++ y C#, que (no sin razón) incluye a Java en la familia. Al menos, puede ayudar a poner sobre la mesa los lados flacos de "la famila"...
Aunque ya pocos se sorprenderían, también se puede ironizar con BASIC.

jueves, enero 19, 2006

CORBA-web Services: closely/loosely/thightly coupled?

En Middleware Matters, el blog de Steve Vinowsky (IONA), existe una discusión sobre CORBA y servicios web, acerca de un punto en común entre ellos: El intento de articular aplicaciones en ambientes heterogéneos, en forma de componentes, que ofrezcan servicios capaces de ser tomados sin necesidad de conocer detalles internos de implementación. ¿Por qué falló CORBA? (no hay duda sobre esto). ¿Corren el mismo riesgo los servicios Web? ¿Loosely Coupled está realmente logrado?.
Ver los comentarios de Michi Henning:

I agree with Mark that CORBA has failed on the Internet. We simply don't see public integration using CORBA among companies. Instead, CORBA is typically used for communication among application components that are developed by the same team, but is not used by companies to offer a public remote API that anyone could call. Sure, I can send CORBA messages over the Internet. But that's not the crux of the question. It's much more a question of whether unrelated parties use CORBA (or WS) to communicate: one party provides the server, and an unrelated party then uses the server, much like a person using a web browser accesses a web server. And I don't see either CORBA or WS being used that way (other than for trivial toy applications).

I also agree with Mark that WS is no more loosely coupled than CORBA. WS proponents claim that loose coupling is achieved by using XML, because XML can be parsed without a priori knowledge of the contents of a message. This is the famous "the receiver can ignore what it doesn't understand" argument. I see many problems with this argument:

- This idea of loose coupling passes the buck to the application. Basically, the sender sends a message that can have all sorts of data in it, and then the application, at run time, has to make sense of it somehow. This is a recipe for bugs because type checking is not enforced by a compiler, and not enforced by the distribution infrastructure.

- We have WSDL. But WSDL ends up creating type definitions that are just as tightly-coupled as IDL ones. (And everyone seems to agree that WSDL is important.) But, where does that leave loose coupling? We have XML at the protocol level, which is loose, and we have WSDL at the application level, which is not loose. There seem to be contradictory messages and intents here.

- Yes, I can define WSDL that makes things optional and types them "loosely", in some sense (just as I can define IDL that does that). But if I do this, the value of having a type system in the first place diminishes, and I'm back to passing the buck to the application, which then again has to figure out at run time (instead of at compile time) whether a particular received message actually makes sense. And note that it is the *application code* that is responsible for this, not the distribution technology, so I get to write type checking code in my applications over and over and over again...

- Even if I do define WSDL that is "loose" and makes lots of things optional, that typically doesn't help me. Loose coupling isn't of interest just for its own sake, but is of interest because people are looking for a way to solve the versioning problem: how can I evolve a distributed application over time without breaking everything that is deployed already, and without having to recompile and redeploy the universe? If I define WSDL that is "loose" to start with, so I get the loose coupling I so much need, by implication, I know in advance how the application will evolve: I put the "loose" bits in the WSDL definitions where I expect future variation in the data. But real life doesn't work that way. None of us is prescient and, as a rule, what makes the versioning problem so hard is that we *don't* know how an application will evolve in the future. In other words, people who say that I can solve the problem by writing "loose" WSDL are kidding themselves: the real world is not cooperative enough for this to work.

- The old argument of "the receiver can ignore what it doesn't understand" is fallacious. For one, versioning and loose coupling are not about just being able to send additional data, but also about changing existing data, operations, parameters, and exceptions. Moreover, real-world versioning is sometimes not about changing interfaces or data types but about changing *behavior*: it is common for someone to want to change the behavior of an operation for a new version of the system, but without changing any data types or operation signatures. Second, the assumption that things will work just because the receiver can "ignore what it does not understand" is very naive. What I don't know can hurt me as much as what I do know. (Would you sign a contract that I put in front of you when several paragraphs are written in a language you cannot understand?)

- Trying to achieve loose coupling at the protocol level is simply the wrong place in the abstraction hierarchy: the protocol is about moving bits back and forth, and about doing this reliably and efficiently. Loose coupling is about dealing with application-specific data types and interfaces and whether it's possible to gracefully evolve these over time. I don't see why I have to have a "loose" protocol in order to enable loose coupling.

If we are interested in loose coupling, multiple interfaces are a far better approach. Instead of trying to define one interface that is loose enough to accommodate all the possible variations, I define several interfaces, each of which accommodates exactly one variation. That way, each interface is strongly typed, but, collectively, all the interfaces together are loosely typed because they offer several alternatives for sending a message. Given that, what I need is a mechanism to select the interface that best suits my job, and a mechanism that lets the receiver of a message know which version is being addressed by the sender. Put those mechanisms into the distribution platform, so applications don't have to reinvent them all the time, and you have a workable answer to the "loose coupling" dilemma that doesn't require me to sacrifice static type safety, and that doesn't throw on-the-wire bandwidth and CPU cycles around as if they were growing on trees.

This idea works very well, and isn't new either: COM supports multiple interfaces, where a single object with a single object identity can present different personas to the world, and Ice has a mechanism called "facets" that allows versioning of distributed applications.

La discusión ofrece también una reseña de los problemas que atravesó CORBA, que no solo fueran técnicos, sino también comerciales, el mismo conflicto que sigue acompañando la elaboración de estándares hoy (los comentarios de Tom Welsh).
Un comentario de erwin enfría los entusiasmos:

I've done a limited nr of CORBA-based solution architectures and implementations a while ago. My feeling is that CORBA definitely is not a failure. I even see 2 big success areas: technological and analytical.

Technologically speaking, CORBA offers a robust and complete stack with a clear and well-documented approach on designing and implementing distributed solutions.
Only disadvantage : tool/server providers were not really interested in providing true interoperability...

The firewall issue is a fake argument.

One of the great values of OMG/CORBA that hasn't been mentioned yet, is the extensive analysis of what's needed for distributed applications. I have the feeling that lots of "new" paradigms arriving later can be seen as re-implementations of the CORBA standards/services etc.

Of course, with some specific variations, e.g. messages with some arbitrary text format that happens to be parseable by an XML-parser (and where lots of other acronyms can be applied to flabbergast any interested reader) i.o. a binary format.

In the web services domain, people are only starting to discover what's needed for a complete architecture stack.

There's a big chance that the result will indeed be a system that has similar services as CORBA, but this time with human-readable messages and the ability to flow through port 80.

Humans can imagine valid semantics for these messages. But is this really valuable? I agree with Michi Henning that in applications, semantics can not be derived/invented at run-time anyway, they have to be a-priori known (and coded), whether the msg is binary or text-based (with or without standard tools to parse the text).

The fact that people now seem to be willing to wait for a nr of years for this web services platform to stabilize and become more complete, and for tool/server providers to build more-or-less interoperable systems (e.g. MS and rest-of-world), seems to be more a new mindset in the SW-world than to be based on technological reasons.

I'm sure it would have been much easier/faster to provide interoperability on IIOP, but at the time MS could not do that as they were still positioning (D)COM as the holy grail.

But now, XML has such a huge mindshare that everyone is willing to invest in technological interoperability...

Byte-streams didn't have the same sex-appeal... ;-)

Loose coupling will never happen, at least not before we have application components with reasoning capabilities.

Ken Horn extiende la discusión en sus comentarios de su blog.
El debate se produce entre activos participantes de la construcción de medios de soporte de arquitecturas heterogéneas: Michi Henning propone ICE. Mark Baker propone REST. Harold Carr propone PEPt, y otros más...
La discusión, en el enlace del título de este artículo.

Google Talk toma vuelo

Google Talk se convierte en un sistema federado, y marcha a ser también multiplataforma: un sistema capaz de aceptar usuarios de otros sistemas de mensajería instantánea, siempre que mantengan un protocolo común, en este caso XMPP, usado por "Earthlink, Gizmo Project, Tiscali, Netease, Chikka, MediaRing, and thousands of other ISPs, universities, corporations and individual users". Por este camino se acaban los estancos de la mensajería instantánea (Messenger, Yahoo), sin otros requisitos que soportar el protocolo. En el futuro, soportará también SIP (VOIP, Video conferencia). Pero además, Google anuncia clientes de mensajería para Linux y Max OSX, además de aceptar clientes de otros proveedores: "The Google Talk service is built to support industry standards. You can connect to the Google Talk service using Google's own client, as well as many other IM clients developed by third parties".

martes, diciembre 27, 2005

Uno más que encuentra SilkTide

Encontré un proveedor de servicio que se testeó con SilkTide a modo de calificación, y busqué el sitio para ver cómo pudiera ser de útil. Lo usé para testear mi página y luego para hacerlo con este blog. Finalmente, busque el sitio con Google para observar hasta qué punto llegué tarde a conocerlo...
Un buen diagnóstico para quien quiera construír una página. Para más observaciones y recomendaciones, le quedan dos posibilidades: siga el enlace de Google, o visite el sitio. Por mi parte, trataré de seguir sus consejos, que en algunos casos coinciden con los lados flacos que ya conocía, y en algún momento resolveré...

jueves, diciembre 08, 2005

Control de cambios explicado por Jim Johnston

Johnston explica en dos artículos en CM/Crossroads, acompañado de gráficos y de algunos de los papeles de registro, distintos escenarios de control de cambios y configuración, útiles para armar un camino de control de cambios para quien lo necesite. Parte I; Parte II

Domain Specific Modeling explicado en tres palabras

Artículo publicado en Methods & Tools. Por ahora, ubicable en su lista de artículos corrientes. Luego, habrá que recurrir a los archivos por su título ("Domain-Specific Modeling for Full Code Generation", para los artículos de fin de 2005). Una discusión sobre el uso de UML para generación de código, y la presentación de la alternativa DSM con varios casos prácticos de ejemplo. Finalmente, la comparación con MDA.
En alguno de los artículos anteriores sobre DSM aquí, algún enlace apunta a éstas ideas. Pero bien, aquí está el original.

miércoles, noviembre 23, 2005

ITToolbox: un blog de interés en EAI

Un blog de interés para un integrador y para el desarrollo de aplicaciones de empresa de gran alcance: provee de pequeñas entradas acerca de temas críticos. Sea a nivel de middleware, de manejo de proyectos, estimaciones de costos, mediciones y manejo de calidad, desarrollo de documentación...y muchos otros. Pequeñas indicaciones, que en todo caso pueden representar una guía básica ante múltiples problemas. (Observations from a Tech Architect: Enterprise Implementation Issues & Solutions).

miércoles, noviembre 16, 2005

A propósito del debate sobre educación en España


Existe en España en estos días un fuerte debate debido a una proposición del partido de gobierno de modificar su actual ley de educación. Si bien no conozco todos los términos de la discusión -nadie lo podría pretender en un mes de estadía- el conjunto de elementos resulta de interés para cualquier país latinoamericano.

Tomo datos de www.quealicante.com (15-11-05):

Sin entrar en otros detalles de modificaciones, algunas semejantes a otras que pasáramos en Argentina, se cuestiona en particular la inestabilidad de la legislación de educación: se cambió en España cuatro veces el sistema de educación en 25 años. Guiándome por la memoria, desde la década del sesenta en Argentina, el número de cambios puede haber sido de uno por cada ciclo político, quizá unos cinco o seis. El resultado de esta inconsecuencia fue el progresivo deterioro, con estudiantes que comienzan un ciclo educativo en un sistema y lo terminan en otro, y profesores que ya no saben cuál es el que están aplicando, remitiéndose finalmente a la mecánica de las exigencias burocráticas curriculares, vacías de contenido educativo.
Qué hacen los países que tienen éxito en sus resultados educativos:

"Finlandia, Japón y Corea son los países con mejor nivel educativo del mundo, según los últimos informes internacionales. Mientras que los japoneses no cambian su ley desde 1984, los finlandeses tienen un récord de permanencia, su ley educativa lleva vigente 35 años."

"A los partidos finlandeses les costó diez años ponerse de acuerdo pero al final lo consiguieron y aprobaron la ley en 1970. Hicieron una reforma educativa que han respetado los diferentes gobiernos y ninguna autoridad duda de que es una de los más eficientes del mundo."

"Los dos países asiáticos se han situado a la cabeza en desarrollo educativo en los últimos años. Ambos tienen leyes con más de veinte años de antigüedad. Son sistemas consolidados y muy eficientes, sobre todo en las ramas técnicas y científicas."

"La última reforma educativa del Reino Unido se hizo en 1987 y fue calificada en su momento como “agresiva política e ideológicamente”. Después de más de quince años, ahora se están planteando hacer una ley nueva."

"Canadá tiene vigentes algunas leyes que no cambia desde hace más de cien años"

Otros aspectos destacables:
Cómo maneja Finlandia la comprensión de la enseñanza:
"El sistema educativo finés es muy exigente y saben que “no se pueden permitir el lujo de perder a un alumno por el camino”. Los malos estudiantes repiten y tienen exámenes de control en diferentes cursos que les ayudan a mejorar. Hablan dos o tres idiomas y desde los siete años saben leer perfectamente."
Canada y la universalidad de la educación:
"Hay diez sistemas educativos diferentes en todo el país y ni siquiera tienen un Ministerio de Educación. Algunas leyes educativas tienen más de un siglo y nadie se plantea cambiarlas. Es completamente gratuita y obligatoria desde los 5 años. No tienen exámenes de acceso a las carreras . Para entrar en la Universidad los aspirantes no tienen que pasar un exámendel tipo de la selectividad. Las propias universidades hacen sus exámenes y eligen, por sus propias capacidades, a los alumnos."
Lo mismo en Nueva Zelanda:
"Hay unas pocas instituciones religiosas o filosóficas que se dedican a la educación pero la mayoría de los niños acuden a colegios públicos. De hecho la consideran un asunto de Estado. Es gratuita desde los 5 hasta los 18 años. Los padres vigilan de cerca a sus hijos .En el sistema educativo de Nueva Zelanda se crean ‘comisiones de padres’ para que sean éstos los que estén pendientes de sus propios hijos. Así ellos participan de su formación."
Presupuesto dedicado a educación:
"El porcentaje del Producto Interior Bruto que gasta España en educación es de un 4.7%. Estamos todavía muy lejos de la media de los países de la OCDE que gastan un 6%. Todos los países nórdicos superan esa media."
Porcentaje dedicado a becas:
"En España se gasta más o menos un 8% del presupuesto de educación en becas o ayudas. La media de los países de laOCDE es un 17%. Los alumnos de estos países tienen más oportunidades."
El reconocimiento y la formación de los educadores:
"En España, los profesores están pagados como la media de los países de nuestro entorno según los últimos datos de la UNESCO. Cobran en su año de ingreso 24.460 euros cantidad similar que en Australia, donde cobran 25.565 euros o en Holanda, donde se les paga 25.864. La media europea está en 25.700 euros, mientras que en el conjunto de la OCDE, que agrupa a los países más desarrollados la media baja hasta los 22.358. En todo caso, los sindicatos de enseñanza han puesto siempre énfasis en el desprestigio de la profesión."
"(en Finlandia) ...La figura del profesor, por tradición, es respetada mucho más que otras profesiones liberales en el país escandinavo. Al fin y al cabo les confían la formación de sus hijos. Quizá por eso el ciclo formativo de los profesores, dependiendo a las especialidades llega a durar siete años, los mismos que en España tiene que dedicar un futuro médico. Forman un auténtico equipo con los padres y se llegan a comunicar con ellos a través de SMS."

¿Es realmente imposible proponerse este tipo de objetivos? O se trata de un esquema de prioridades irracional y egoísta el que sufrimos en nuestros países?

martes, noviembre 15, 2005

Serena Software cambia de manos

Serena Software, uno de los participantes fuertes en el software de administración de cambios, cambia de manos, pasando todo su paquete accionario a Silver Lake Partners.
"Our decision to partner with Silver Lake to take the company private represents the culmination of a thorough review of our standalone plan and strategic alternatives and we believe this is the best value proposition for our shareholders", dice su jefe ejecutivo, Mark Woodward.
Parecería ser la renuncia a proseguir en el proyecto independiente. Se simplifica el campo?

jueves, noviembre 10, 2005

Cómo prototipar un juego por semana

Un grupo de estudiantes, dentro de un proyecto del Entertainment Technology Center de la Universidad Carnegie Mellon, (Experimental Gameplay Project), logró construír alrededor de 50 juegos en un semestre de trabajo, a un promedio de uno por semana. ¿Cómo?

Here's a crazy game idea: Drag trash-talkin' gobs of goo to build a giant tower higher and higher. They squirm and giggle and climb upward over the backs of their brothers, but be careful! A constant battle against gravity, if you build a tower that's too unstable, it will all fall down.

"Tower of Goo" was downloaded over 100,000 times within months of hitting the net, it was dubbed “Internet Game of the Month” in one magazine, it was demoed on G4 and at the Experimental Gameplay Workshop at GDC, and it was one of over fifty games we made as a part of the Experimental Gameplay Project at Carnegie Mellon's Entertainment Technology Center.

And like the rest of them, it was made in under a week, by one person.

The project started in Spring 2005 with the goal of discovering and rapidly prototyping as many new forms of gameplay as possible. A team of four grad students, we locked ourselves in a room for a semester with three rules:

1. Each game must be made in less than seven days,
2. Each game must be made by exactly one person,
3. Each game must be based around a common theme i.e. "gravity", "vegetation", "swarms", etc.

As the project progressed, we were amazed and thrilled with the onslaught of web traffic, with the attention from gaming magazines, and with industry professionals and academics all asking the same questions, "How are you making these games so quickly?" and "How can we do it too?"

We lay it all out here. Through the following tips, tricks, and examples, we will discuss the methods that worked and those that didn't. We will show you how to slip into a rapid prototyping state of mind, how to set up an effective team, and where to start if you've thought about making something new, but weren't sure how. We hope these well-tested guidelines come in useful for you and your next project, big or small!

¿Interesado?
Vea las recomendaciones de Gabler, Kucic, Gray, y Shodhan, y el experimiento mismo...

miércoles, septiembre 28, 2005

Ultimos días en La Serena...

En pocos días más, viajamos de Santiago a Madrid. Tres años en Chile, entre La Serena y Santiago. De ahora en más, la Comunidad Valenciana...
Durante un mes no creo que tenga prácticamente tiempo para nada que no sea organizarnos. Posted by Picasa

viernes, septiembre 09, 2005

ECMDA: Consistencia en el desarrollo de software conducido por modelos

La Conferencia Europea en Arquitectura Dirigida por Modelos (ECMDA) tendrá en Noviembre una reunión de trabajo enfocada en el análisis de la consistencia de modelos creados con UML, en el contexto de su uso para la generación automática de código:

A number of artefacts are produced during the software developments process and MDA in particular. Those artefacts are usually expressed in UML and should be related in different way to each other. One of the most important relationship between artefacts is that they should be consistent. Putting this question into the discussion and trying to find answer to this question is the main topic to be addressed during the workshop. (...)

The following issues fall within the scope of the workshop:

  • Understanding consistency in the context of MDA and UML in particular – informal consistency from different points of views, static and dynamic consistency.

  • Definition of consistency in MDA and UML – set of properties or other techniques,

  • Checking consistency,

  • Ensuring consistency,

  • Model transformation preserving consistency,

  • Practical realization,

  • Tools support for checking and ensuring consistency,

  • Relationship between consistency and formal techniques and languages,

  • Consistency driven development process,

  • Merging models and consistency (PIM + PM ->PSM).


El material de las reuniones previas de los años 2002, 2003, y 2004, se puede consultar a partir de ésta página (link en el título de esta nota).
Todo el material es de interés no sólo para abordar el propio problema convocante, sino para entender el uso de OCL, las operaciones de transformación de modelos, y los metamodelos en UML, y aún más en general, el uso de artefactos capaces de generar código.
Un tema que particularmente estimulante, es planteado por Robert Wagner, Holger Giese, y Ulrich Nickel, de la Universidad de Padeborn, Alemania; Flexibilidad en las reglas de consistencia aplicadas:
In most CASE tools, the consistency checks being performed are rather static and predefined as they are hard coded into the tool . Thus, new consistency rules neither can be added nor can existing consistency rules be adapted to special user, enterprise, project, target language, or domain specific demands. However, during large projects you will never obtain a complete set of rules covering all relevant inconsistencies. In fact, the set of consistency rules will be expanded and refined through the whole lifecycle of a project. Thus, for a tool developer it becomes infeasible to identify all consistency rules in advance.
In this paper we present a plug-in for a flexible and incremental consistency management realized within the FUJABA TOOL SUITE. FUJABA itself is an Open Source UML CASE tool project. It was started by the software engineering group at the University of Paderborn in fall 1997 and has a special focus on code generation from UML diagrams resulting in a visual programming language. Hence, consistency management was an important issue from the beginnings since consistent specifications are a required prerequisite for an error-free implementation.
Más sobre ECMDA.
Herramientas Comerciales y Open Source participantes. FUJABA.
Historial de conferencias sobre MDA de la asociación.

sábado, septiembre 03, 2005

Una comparación sobre ambiente de seguridad entre Java y .NET

Mencionado en The Server Side (.net) por Paul Ballard, un papel de dos estudiantes, Nathanael Paul y David Evans, de la Universidad de Virginia, compara la implementación de políticas de código seguro en Java y en .Net. Con un punto de vista algo "virado al .Net", el documento es minucioso y consistente, por lo que contribuye a alcanzar dominio sobre los potenciales problemas o puntos débiles de las plataformas. Su conclusión es que .Net ofrece un mejor marco de seguridad que Java:
Java and .NET have similar security goals and mechanisms. .NET’s design benefited from past experience with Java. Examples of this cleaner design include the MSIL instruction set, code access security evidences, and the policy configuration. .NET has been able to shield the developer from some of the underlying complexity through their new architecture.

Where Java evolved from an initial platform with limited security capabilities, .NET incorporated more security capability into its original design. With age and new features, much of the legacy code of Java still remains for backwards compatibility including the possibility of a null SecurityManager, and the absolute trust of classes on the bootclasspath. Hence, in several areas .NET has security advantages over Java because of its simpler and cleaner design.

Most of the lessons to learn from Java’s vulnerabilities echo Saltzer and Schroeder’s classic principles, especially economy of mechanism, least privilege and fail-safe defaults. Of course, Java’s designers were aware of these principles, even though in hindsight it seems clear there were occasions where they could
(and should) have been followed more closely than they were. Some areas of design present conflicts between security and other design goals including fail-safe defaults vs. usability and least privilege vs. usability and complexity. For example, the initial stack walk introduced in Java has evolved to a more complex stack walk in both architectures to enable developers limit privileges. In addition, both
platforms default policies could be more restrictive to improve security, but restrictive policies hinder the execution of programs. .NET’s use of multi-level policies with multiple principals provides another example of showing the principles of least privilege and fail-safe defaults in contention with usability and
complexity. Several of the specific complexities that proved to be problematic in Java have been avoided in the .NET design, although .NET introduced new complexities of its own. Despite .NET’s design certainly not being perfect, it does provide encouraging evidence that system designers can learn from past security vulnerabilities and develop more secure systems. We have no doubts, however, that system designers will continue to relearn these principles for many years to come.
No obstante, es necesario recordar que la similitud está en el uso de una máquina virtual, pero que .Net ejecuta múltiples lenguajes sólo sobre Windows, y Java sólo un lenguaje sobre múltiples plataformas. En una decisión de arquitectura, las alternativas por ahora son más amplias sobre Java, sin mencionar la confiabilidad del sistema operativo huésped.

viernes, septiembre 02, 2005

Apuntes sobre performance en Java

Jack Shirazi sostiene una página dedicada a dar consejo en hacer ajuste fino al uso de Java, mejorando su performance. Un buen sitio no sólo para tener guía en aspectos críticos del uso del lenguaje, sino para hacerse una idea realista de cómo encarar Java con posibilidades de éxito. Acumula al día de hoy cuarenta y siete cartas sobre performance.

lunes, agosto 29, 2005

Le interesan a todos los estándares y la compatibilidad?

Developer publica un artículo sobre el test de conformidad Acid2, del Web Standards Project:

While it would seem that getting your browser to display the grinning face is simple, getting it to pass the Acid2 test is anything but. Currently there are 90 recommendations within the W3C, ranging from Cascading Style Sheets 2 (CSS 2) and HTML 4.01 to XML-binary Optimized Packaging.

WaSP's test doesn't try to incorporate all 90 recommendations, just the ones the group believes should be in all browsers based on Web developer input. It looks for basic support of HTML 4, CSS 1, data URLs and Portable Network Graphics (PNG), as well as particular implementations from these and other specifications.

The goal of the test is to get browsers to implement the Web standards tested in a consistent fashion, so what the Web surfers see using IE is the same as what another views in Safari, for example.

Lo probé con Mozilla Firefox 1.06 y con IE 6.02. El resultado es frustrante. IE 7.0 no lo soportará, según señala el artículo, y, en fin, solo tres browsers lo consiguen: Safari, iCab, y Konqueror.

UML no es OOD: cómo se relacionan

Un artículo de Craig Larman explica con algún detalle por qué UML no es igual a OOD, y por qué su uso no garantiza un diseño orientado a objetos.

viernes, agosto 26, 2005

MDA en la empresa: Visto desde múltiples perspectivas

Mikko Kontio, finlandés, presenta un breve documento en IBM Developer Works sobre las conveniencias de una arquitectura dirigida por modelo (MDA). Tanto desde el punto de vista de la conducción de los negocios, como desde el punto de vista de los diversos actores del area de TI. En pocas palabras, da un buen conjunto de argumentos en favor del estándar.

Para directivos:
MDA allows you to get more work done with the same people, or to do the same amount of work with less people. The time to completion on new projects will diminish radically, as will the time to make changes on existing systems.
La principal objeción:
In terms of cost, management will need to consider more than the price of tools. The biggest cost will be education, because not everyone in the organization will be familiar with MDA. Others may need time to become comfortable with the new approach. Therefore, the cost of the transition must be measured in time as well as money, but the end benefits should add up favorably.
Para analistas y diseñadores:

Analysts capture business requirements into a formal model. Because the work of capturing requirements is people-driven, most of it is the same regardless of approach. In MDA the formal model is Unified Modeling Language (UML), so your analysts will need to have a working knowledge of UML to implement MDA.

For the most part, the designer's job isn't affected by the transition to MDA. Designers turn analyst's models into more evolved ones, encompassing classes, state diagrams, detailed method actions, and so on. Because the designer's models are used to generate code, they must be detailed and precise. If your organization's UML tool uses executable UML, the designer will be able to more easily demonstrate the behavior of the model to customers.

Para arquitectos:
Company architects will likely be excited by your proposal to transition to MDA. MDA makes it much easier for architects to ensure that a system is implemented the way they designed it, from start to finish. As the system evolves, it will be easy to add new technologies, re-use existing code, or plug-in third-party modules. Performance tuning will be a snap using existing mappings, and documentation will always be up to date. As a result of these factors the overall quality of the system will improve, and fine-tuning it will be easier than ever. Most architects like to design and specify things before they are implemented, so for them MDA is a welcome change.
En todo caso, no suscribiría ciento por ciento la posibilidad de que la documentación esté siempre actualizada. No conozco (quienquiera puede desmentirme) herramientas del tipo MDA que puedan mantener como una colección integrada toda la documentación asociada. Por eso es interesante el concepto de Software Factory de Jack Greenfield, si el caso fuera que SF puede lograr esta integración.

Para programadores:
Every programmer knows how stupid it is to write the Customer class and its functions over and over. MDA cuts out much of that redundant work so that programmers can focus on more productive tasks like writing mappings to different platforms and fine-tuning existing mappings for specific reasons. Programmers put their platform expertise to better use this way, and they also get to concentrate on tough coding jobs that even the best MDA tools can't handle. With all the busy work cut out, programming can become more fun and also more challenging: programmers need to know their tools and languages well in order to work efficiently in an MDA environment.
Para testeadores:
Testing and maintaining are the grunt work of the development cycle, and MDA cuts out much of the worst of both. With the right tools, testers can generate test scripts directly from a system's UML model. This obviates the necessity of writing endless nearly identical test scripts and code fragments, allowing testers to focus on more crucial tasks.
Para mantenedores:
When not hunting down missing documentation, maintainers can usually be found frowning over out-of-date, poorly written documents that fail to yield the exact information they require. Not so with MDA, where the model is always current and applicable to solving real problems. MDA documentation is built in, which cuts down significantly on both frustration and high maintenance costs.
Agregaría que no sólo la documentación está integrada -aquí entendida en el sentido estricto del diseño del modelo-, sino que la inserción de cambios es simple, mucho más que la que se pueda pensar basado en un sistema no dirigido por modelo, dado que las partes están intrínsecamente integradas y articuladas, y un cambio se propaga en forma automática, reduciendo el alcance del problema a seguir la ruta del impacto, verificando conflictos que se pueden localizar en todos los casos, y a planificar las transformaciones que se deban implementar al ejecutar los cambios. (Hablando en términos generales; siempre puede haber excepciones).

Finalmente, adhiero a las recomendaciones de Mikko sobre la transición a la adopción de la arquitectura:

Convincing your organization to make the transition to MDA is only half the game: implementing the new approach is the second half. After you've adopted the MDA approach and settled on the tools you need to implement it, you'll want to embark on your first-ever MDA project together. Before you even launch the project, you should clearly spell out your goals. Admit that there is hype around MDA and explain its benefits, using the proposed project as an example. Make sure that everyone on the development team understands what you're aiming for. For example, if you want to generate a complete application, provide one or two examples so that people see it can be done. If you have a different intention, then clearly state it and provide examples to back up your goal.

Start with a good project that is small enough to process quickly. It's always best to introduce a new technology or approach with a project that is quick and relatively simple. After you've done a few smaller projects, everyone will have learned the basics and executing larger ones will be easier.

Make sure that everyone who needs support gets it. Project managers might be concerned about the amount of work involved in the new approach, the duration of certain tasks, and so on. Developers may be challenged by the unfamiliar techniques and tools. Having a knowledgeable expert or consultant on the job could be helpful in this phase of the transition.

Follow up is important. After the project is finished, make a final report detailing the successes and failures of the project. Be sure to record both -- plenty of praise for what worked as well as a clear discussion of problems and how they may be resolved in the future.

lunes, agosto 22, 2005

"la apabullante Corea"

Nora Bär, el 17 de agosto pasado, publicó un breve artículo en La Nación sobre los números de Corea: Exportaciones: 2000 millones de dólares en 1960, 557.000 millones en 1996. Producto Bruto: 8000 millones en 1960, 253.000 millones en 1996. Patentes: en 2003, 22.943.

Dice Bär :
Semejante pujanza, que a ojos de un argentino parece sencillamente "milagrosa", se debe -para Deok- a las bondades de su sólido Sistema Nacional de Innovación. Para hacerse una idea de las dimensiones de esta organización basta con mencionar que en 2003 había en Corea 297.060 personas dedicadas a actividades de investigación y desarrollo -198.171 eran científicos, alrededor de siete por cada mil personas económicamente activas-. Para mantenerla activa, Corea invierte unos 19.400 millones de dólares anuales en ciencia, el 2,64% de su PBI, una cifra en aumento año tras año.
Nuestros números, por el contrario, son innombrables. No lo podemos explicar por riqueza natural, porque Corea tiene escasas, no lo podemos explicar por la diferencia de tradición histórica, porque otros países "jóvenes" tienen buenos números. Tampoco porque hubieran permitido el ingreso del capital externo a su país, porque también nosotros lo hacemos. Ni siquiera por las historias políticas recientes, porque Corea tiene antecedentes con algunos parecidos a los nuestros. ¿No sería mejor poner el ojo en cada asunto de importancia que esté estancado, y crudamente terminar con las falacias con que los encubrimos?

jueves, agosto 18, 2005

IBM: Clasificación ortogonal de defectos

Gracias a Pablo Sánchez, que en algún momento refirió el blog de Prasanna Kumar, dí con la clasificación de IBM, actualizada por última vez en febrero de 2002 (link en el título de esta nota).
Así se introduce el problema en el Center for Software Engineering, de IBM:

Traditionally, defects represent the undesirable aspects of a software's quality. Root Cause Analysis (RCA)and Statistical Growth Modeling (e.g. S-curves) have played useful roles in the analysis of software defects. Effective RCA, while yielding exhaustive details on each defect, takes substantial investment of resources for completion and points to too many actions as a result. Growth modeling, on the other hand, provides an easy way to monitor trends, but is not capable of suggesting corrective actions due to the inadequate capture of the semantics behind the defects.

ODC is a scheme to capture the semantics of each software defect quickly. It is the definition and capture of defect attributes that make mathematical analysis and modeling possible. Analysis of ODC data provides a valuable diagnostics method for evaluating the various phases of the software life cycle (design, development, test and service) and the maturity of the product. This is much like the diagnostics done in medicine using the blood sample from a patient to understand the existing health conditions and arrive at corrective actions. ODC makes it possible to push the understanding and use of defects well beyond quality.

ODC puede representar una buena guía de referencia en el seguimiento de defectos. Probablemente pase a formar parte de mis guías rápidas de trabajo.

sábado, agosto 06, 2005

Simplemente Buenos Aires

Esto no tiene nada que ver con la informática, excepto en el medio de transporte. Simplemente, para no olvidar Buenos Aires. El mercado de San Telmo, Diagonal, Belgrano, los bares, el aire de la ciudad caminando las fotografías...una imágen habla; cien son el espíritu de la ciudad.

miércoles, julio 20, 2005

Cuál es el marco de trabajo de las DSL Tools en VS 2005?

GarethJ (J. Gareth?) mantiene referencias vivas a preguntas y respuestas de soporte en el uso de Visual Studio 2005 (y otros, supongo). Un grupo de ellas se refieren al uso del toolbox de DSL dentro del VS 2005. No quiero desconocer que cualquier esfuerzo de construcción de software es trabajoso, y se puede decir con seguridad que no existen las herramientas automáticas que reemplacen el trabajo de análisis e interpretación de los desarrolladores. Pero intuyo en el intercambio de preguntas y respuestas que este conjunto está distante de los principios que dicen sustentarlo. Evidentemente un IDE hubiera sido una respuesta de automatización en la época en que Bob Bemer explicó sus ideas de una Fábrica de Software, pero, aunque el proyecto esté instalado, parece que todavía estamos en la versión o.1.

Materiales de JavaOne 2005 disponibles

Si le interesa Java, J2EE, o la interoperabilidad entre Java y .NET, puede consultar los papeles técnicos de la conferencia 2005 de la comunidad JavaOne, soportada por Sun. Debo dar gracias al blog de Juanjo Navarro, de donde tomé el enlace (Juanjo en el enlace del título de esta nota).

sábado, julio 16, 2005

EAI-ERP: Parte de situación

El 13 de julio, IStart publica un breve artículo acerca de la evolución de las Aplicaciones de misión crítica en el mundo: "la consolidación continuará".

Bernd Fisher: Generación de código certificable

En el contexto de la 4ta conferencia de Ingeniería de Componentes y Programación Generativa, (Generative Programming and Component Engineering [GPCE'05]), varios temas de mucho interés, y entre ellos, el propuesto por Bernd Fisher: Generación de código certificable. Así se presenta el tema en la informaión previa:

ABSTRACT Code generators based on template expansion techniques are easier to build than purely deductive systems but do not guarantee the same level of assurance: instead of providing correctness-by-construction, the correctness of the generated code depends on the correctness of the generator itself. We present an alternative assurance approach, in which the generator is extended to enable Hoare-style safety proofs for each individual generated program. The proofs ensure that the generated code does not go wrong, i.e., does not violate certain conditions during its execution.

The crucial step in this approach is to extend the generator in such way that it produces all required annotations (i.e., pre-/postconditions and loop invariants) without compromising the assurance provided by the subsequent verification phase. This is achieved by embedding annotation templates into the code templates, which are then instantiated in parallel by the generator. This is feasible because the structure of the generated code and the possible safety properties are known when the generator is developed. It does not compromise the provided assurance because the annotations only serve as auxiliary lemmas and errors in the annotation templates ultimately lead to unprovable safety obligations.

We have implemented this approach and integrated it into the AutoBayes and AutoFilter program generators. We have then used it to fully automatically prove that code generated by the two systems satisfies both language-specific properties such as array-bounds safety or proper variable initialization-before-use and domain-specific properties such as vector normalization, matrix symmetry, or correct sensor input usage.

Otros trabajos: Patrones en la reingeniería de código OO, por Oscar Nierstrasz

lunes, julio 11, 2005

Cuál es el alcance real de los lenguajes de dominio (DSL)?

Vinculado al tema de Software Factories, tratado antes está el papel que se le asigne a los lenguajes de dominio (Domain Specific Languages). Entrar más en detalle en ellos es útil para valorar el alcance real de su importancia en la formula SF, así como su viabilidad de articulación con una herramienta de diseño conducido por modelos. Martin Fowler ha venido publicando varios artículos sobre DSLs relacionados a MDA y SF que abren interesantes vías de análisis:
Languages Workbenches: the killer-app for Domain Specific Languages?
Languages Workbenches and Model Driven Architecture
Entre ellos, una referencia a LABRI (Laboratoire Bordelais de Recherche en Informatique) ofrece una visión general del tema, e introduce en las características distintivas de los lenguajes, y da una lista de casos.
Un aspecto fundamental discutido es la factibilidad de construír un DSL, y quién está en condiciones de hacerlo. Cito:
(...) However, they also raise a key issue which, if not addressed, could obstruct the use of DSLs (...): how does one design and implement a DSL? Resolving this issue is critical to make the approach profitable since there is no point in reducing the complexity of program development by shifting all the complexity into the construction and maintenance of a DSL programming environment. Another related question is: who will develop DSLs? Even in the programming language community, only a few people have actually designed a language. A fortiori, we cannot expect software engineers to have the full expertise to build up new languages. Thus, it is crucial that a methodology and tools are provided to make the DSL approach widely accessible.
El laboratorio desarrolló una solución (un framework) llamada SPRINT. Ver el método que crearon para construír un Lenguaje de Dominio, da una idea de su real capacidad de ser una herramienta genérica para colaborar en el proceso de armado de un sistema (Específicamente, quiero saber cómo es de posible crear un DSL para un proyecto específico, con un problema específico, como dice la presentación de Microsoft (Think of a DSL as a small, highly focused language for solving some clearly identifiable problem that an analyst, architect, developer, tester, or system administrator must wrestle with. Developers are already familiar with examples of DSLs; SQL for data manipulation, XSD for XML document structure definition, and so on. Another example from Visual Studio Team Edition for Software Architects is a DSL for modeling the logical structure of datacenter hardware and host software configurations. This DSL and its related graphical designer can be used to validate during design time that applications are configured to match their intended deployment targets, alerting the developer to problems when they can be fixed more cheaply.Good ways to find candidate DSLs are to identify the patterns used by developers, and then to encapsulate them into a modeling language, or to surface the concepts in a software framework as abstractions in a modeling language that can then generate small amounts of code that extend the framework. These techniques allow us to control the amount and complexity of generated code, offering real value to the developers, without the hassles that characterized CASE products.)

Sigue la descripción del marco metodológico a seguir para especificar un DSL según Sprint:
Our methodology is based on a framework outlined in an earlier paper by Thibault and Consel and put into practice in several DSL prototypes (GAL, PLAN-P) and publications . It can be summarized as follows. (For the sake of clarity, the phases of our methodology are presented sequentially. In practice, the whole process needs to be iterated.)
Estos son los pasos a seguir:

Language analysis
Assuming a problem family has been identified, the first step is to analyze the commonalities and the variations in the corresponding program family. This analysis is fueled by domain knowledge. The result of this analysis includes a description of objects and operations that are needed to express solutions to the family of problems, as well as language requirements (e.g., analyzability) and elements of design (e.g., notations).

Interface definitions
The next phase is to refine the design elements of the DSL. To do so, the syntax of the DSL is defined and its informal semantics is developed. The informal semantics relates the syntactic constructs to the objects and operations (i.e., the building blocks) identified previously. Additionally, the domain of objects and the type of operations are formalized, thus forming the signature of semantic algebras.

Staged semantics
The semantics of a GPL is typically split between the compile-time and the run-time actions. These two parts are also referred to as the static and the dynamic semantics of a language. We propose to perform the same separation in the semantics of a DSL. With respect to software architecture concerns, this separation makes stages of configuration explicit.

Formal definition
Once the static and dynamic components of the language have been determined, the DSL is formally defined. Valuation functions define the semantics of the syntactic constructs. They specify how the operations of the semantic algebras (i.e., the building blocks) are combined.

Abstract machine
Then, the dynamic semantic algebras are grouped to form a dedicated abstract machine which models the dynamic semantics of the DSL. From the denotational semantics, the DSL is given an interpretation in terms of this abstract machine. The state of the semantics is globalized and mapped into abstract machine entities (e.g., registers) dedicated to the program family.

Implementation
The abstract machine is then given an implementation (typically, a library), or possibly many, to account for different operational contexts. The valuation function can be implemented as an interpreter based on an abstract machine implementation, or as a compiler to abstract machine instructions.

Partial evaluation
While interpreting is more flexible, compiling is more efficient. To get the best of both worlds, we use a program transformation technique, namely, partial evaluation, to automatically transform a DSL program into a compiled program, given only an interpreter. Writing the language definition as an interpreter allows fast prototyping, and easier maintenance and extension. However, it does not compromise efficiency as partial evaluation is able to remove the interpretation layer overhead, yielding efficient DSL implementations.
Como se ve, construír un DSL, aun con el auxilio de una herramienta que encauce metodológicamente y abrevie pasos, no es una tarea trivial. Sin hablar de que existe un paso previo metodológico no cubierto (Assuming a problem family has been identified...)
Ni cuestiono los DSLs, ni mucho menos el desarrollo de esta herramienta, para aumentar el campo cubierto por DSLs específicos. Sólo pongo en duda con fuerza la posibilidad de que una colección de DSLs sea la alternativa a un modelo de herramienta del tipo MDA.
En forma desnuda, las afirmaciones de Greenfield y Microsoft no son sino una promesa o una especulación comercial, y la cruda verdad es que estamos hablando del Visual Studio usando C# u otro lenguaje .NET, para hacer interfaz con aquellos DSL que existan, cuando el problema se presente,...y el resto es C#, es decir, lo mismo.

lunes, julio 04, 2005

El duro trabajo de salir del enfoque procedural

Me inicié en la programación aprendiendo de profesores y mentores que a su vez se iniciaron desde el Assembler y el Fortran hasta el Cobol. Como he reconocido, mi primer contacto con Yourdon fue cuando la programación y el diseño estructurado eran la forma correcta de hacer las cosas. Por lo tanto, a diferencia de los nuevos programadores o analistas o diseñadores, siempre tengo que pensar dos veces un problema: primero la vía "natural" procedural, y luego como mundo de objetos. Andando el tiempo, sin embargo, encuentro que en el mundo diario, es mucho más frecuente encontrar el modo de enfocar un problema orientado a los procesos, que el modo basado en objetos. Dos o tres discusiones en comp.object, el grupo Google que me resulte de mayor interés, me muestran sin embargo que los tropiezos no son sólo míos. En el link que titula esta nota se menciona a uno de estos casos, donde Lahman reenfoca desde el punto de vista de objetos un algoritmo presentado como secuencia de procesos.
Pero el más interesante y valioso de los varios casos sobre lo mismo es el llamado "OOP/OOD Philosopy". Invito a seguir la discusión y poner a prueba sus criterios.

lunes, junio 20, 2005

Otro ejemplo del compromiso europeo con MDA

El ESI (European Software Institute) con sede en Zamudio, España, junto al
Fraunhofer-Gesellschaft de Munich y el IKV++ Technologies AG, de Alemania, y Thales ATM, con sede en varios países, trabajan en común en un proyecto de evaluación temprana de los conceptos de MDA:
The objective of MASTER project (IST-2001-34600) is to perform an early validation of the concept of MDA (Model Driven Architecture) which is currently being promoted by the OMG (Object Management Group). The validation consists in an experimental approach. MDA concepts are to be applied in the Air Traffic Management (ATM) domain and is focused on achieving the following more detailed objectives:
  • Develop a variability specification language and apply it to the ATM domain to improve customising requirements according to the final user needs, and map variability (open decisions) on to the architecture.

  • Provide the mechanisms to derive and analyse the development process activities and project management parameters (such as cost, effort, time, etc.) since the very early stages in contract negotiation and project definition, by using the architecture as the basis for reasoning about this.

  • Implement the MDA concepts of separation of concerns to achieve independence from specific platform technologies and therefore enable the specialisation of resources (business knowledge separate from technological knowledge)

Additionally, the project aims at providing tool support for these activities. Tool support will allow for the modelling of variability among ATM systems using a variability specification language, automate the project management based analysis on the architecture and support the transformation mappings among different levels of abstraction of an MDA approach.

Finally, one very important aim of the project is to contribute to the development of the MDA standard and the consolidation of ATM domain. The project plans to achieve this through active participation in the standardisation groups of OMG.
Vea su esquema de implementación de MDA aquí

viernes, junio 17, 2005

Microsoft y MDA-MDD - Domain Specific Languages

Uno de los pilares de la visión de Microsoft sobre el uso de modelos, señalado en su documento "Visual Studio 2005 Team System Modeling Strategy and FAQ" es el uso, recomendación y soporte de lenguajes específicos de dominio. Los DSL son propuestos como un diferencial respecto al estándar MDA de OMG, sobre el que se señala que

Microsoft has learned from past industry experiences, and plans to avoid the pitfalls of CASE by adopting an approach to model-driven development based on the following ideas:

  • A model should be a first-class artifact in a project—not just a piece of documentation waiting to become outdated. Models have a precise syntax, are often best edited and viewed using a graphical tool, and embody semantics that determine how domain-specific concepts in models map to other implementation artifacts, such as code, project structures, and configuration files. In this way, a model is a lot like a source code file, and the mechanisms that synchronize it with other implementation artifacts are a lot like compilers.
  • A model represents a set of abstractions that support a developer in a well-defined aspect of development. (...)
  • Since models can abstract and aggregate information from a number of artifacts, they can more readily support consistency checks and other forms of analysis. For example, an application connectivity model might support contract protocol validation, security analysis, or performance analysis.
  • Models can be implemented by a process similar to compilation, where the code, configuration files, and other implementation artifacts generated by the compiler are never edited by hand. More often, however, they are implemented by a combination of generated and hand-edited artifacts. In such cases, it is critically important to carefully manage the way the generated and hand-edited artifacts fit together. As mentioned above, the failure to do this effectively was one of the primary shortcomings of CASE products. We have been using several techniques to ensure that generated and hand-edited artifacts are kept separate, and that code added by a developer is never disturbed when boilerplate code required by a tool is generated. These techniques include the use of class delegation and inheritance, and particularly the use of "partial classes," a new feature of the .NET languages in Visual Studio 2005, which has been specifically defined with this task in mind.

We call modeling languages defined in these ways Domain Specific Languages or DSLs. Think of a DSL as a small, highly focused language for solving some clearly identifiable problem that an analyst, architect, developer, tester, or system administrator must wrestle with. Developers are already familiar with examples of DSLs; SQL for data manipulation, XSD for XML document structure definition, and so on. Another example from Visual Studio Team Edition for Software Architects is a DSL for modeling the logical structure of datacenter hardware and host software configurations. This DSL and its related graphical designer can be used to validate during design time that applications are configured to match their intended deployment targets, alerting the developer to problems when they can be fixed more cheaply.

Good ways to find candidate DSLs are to identify the patterns used by developers, and then to encapsulate them into a modeling language, or to surface the concepts in a software framework as abstractions in a modeling language that can then generate small amounts of code that extend the framework. These techniques allow us to control the amount and complexity of generated code, offering real value to the developers, without the hassles that characterized CASE products.

Microsoft recently announced the DSL Tools, which will enable customers and partners to build DSLs using the same technology in Visual Studio 2005 that we used to build the modeling tools that will ship with Visual Studio Team Edition for Software Architects. This technology, which can be thought of as "tools to build tools," simplifies the task of defining DSLs and reduces the effort and skills required to build graphical editors and compilers for them.

La idea de usar lenguajes específicos para problemas específicos es contrapuesta a la idea de los modelos específicos de plataforma (PSM), suponiendo que para una plataforma corresponde un solo modelo de plataforma. Independientemente de que sea corrientemente así o no, no parece esta una razón para oponerlos. Sí es correcto en todos caso que un DSL puede ser el soporte de generación de un modelo dado.
La idea de crear código combinando generación automática y trabajo manual, mantiene al producto dentro del marco que MS cuestiona para los modelos desarrollados desde UML. No hay ninguna diferencia: (Models can be implemented by a process similar to compilation, where the code, configuration files, and other implementation artifacts generated by the compiler are never edited by hand. More often, however, they are implemented by a combination of generated and hand-edited artifacts. In such cases, it is critically important to carefully manage the way the generated and hand-edited artifacts fit together)
El código manual siempre será opaco para el modelo, por lo que fácilmente devendrá desincronizado, y exige seguimiento del desarrollador acerca de la coordinación entre ambos mundos.
Los DSL son productos orientados a la solución de problemas determinados, bien definidos para cada caso, bien probados, y con la solución más adecuada al caso. Así lo indica el artículo, así lo conocemos de otras definiciones. La novedad que ofrece MS es ofrecer una herramienta para la construcción de DSLs. Esto es coherente con ofrecer como contraposición a un PSM (Platform Specific Model) los DSLs en general: es decir, si se va a decir que los DSL son la solución frente al mapeo que se produce entre un PIM y un PSM, debe ser posible construír un DSL para cada problema vinculado a una plataforma que se presente. Es eso posible? Sin duda que se puede construír un generador o mapeador a un problema que tenga reglas que ya se aplicaban manualmente. Pero es viable?. Seguramente, dependiendo de la magnitud del proyecto, o de la continuidad con que el mismo problema deba ser resuelto. Si se dispone de un equipo que pueda dedicar la cantidad de horas hombre necesarias, y el conocimiento correspondiente, para crear todas los algoritmos que interpreten un dominio, y que testeen todos los escenarios posibles, seguramente se logrará crear un DSL que cumpla con todos los requisitos propuestos. Seguramente dedicarse a este objetivo no está en el ámbito de la productividad y reducción de costos que se proponen los desarrollos basados en modelo y generadores. Salvo que estemos hablando de empresas de primer orden mundial. En el resto del prosaico mundo, la exigencia por resolver problemas con el menor costo implica que la búsqueda de herramientas de desarrollo rápido trate de conseguir eso: desarrollo rápido.
Así, el toolbox para crear DSLs, es seguramente una herramienta para empresas de software dedicadas a nichos de software que trabajen con .NET y Visual Studio.
Poco, estrecho alcance para el nivel de la crítica presentada por la visión de Microsoft a la OMG.