viernes, junio 05, 2009

Spring Python

Hoy me pasaba JJ un enlace, sobre Spring Python.
No sabía de su existencia...
He estado leyendo un poco. Se trata de una migración del framework Spring de Java a Python.
Por lo visto Spring fue ha sido un revulsivo en la comunidad Java, ya que puede servir como alternativa a los EJBs.

Así como las cosas mas interesantes que incorpora son AOP, IoC y MVC.
Esto me ha dado pie a empezar la mañana a leer alguna cosilla sobre AOP y IoC. Para refrescar.
En la web de Spring Python hay información,
Continuando y recordado una duda de la semana pasada he indagado un poquillo algunas cosas.
La semana pasada me preguntaron por los Arquitecture Patterns. Y tirando de memoria, tras un ejemplo, logré sacar de la manga el Pipeline. Es lo que tiene el mentar en el CV el tema de los patterns. Luego hay que apechugar...
El tema de los patrones es interesante, pero ya está muy asumido. Cuando apareción era un concepto novedoso y ahora los usas casi sin darte cuenta. Incluso que implementas las cosas usando patrone de una manera natural.
De todas formas no estaría mal, volver a echar una lectur al libro de la GoF. El problema es el de siempre, la falta de tiempo, ya hay que priorizar.

Relacionado con la Application Arquitecture tendríamos la Enterprise Arquitecture [martinfowler]. Es interesante la lectura del link anterior. Las pegas que indica de la Enterprise Arquitecture, lo he visto con mis propios ojos.... Montarte una paja mental para intentar extenderla por la compañia. Es realmente complicado.

¿Que pasa cuando estas centrado en el día a día, implementando tus movidas? Pues que es fácil irte olvidando de algunos conceptos.
Por ejemplo, ¿cuantos me podríais definir claramente lo que es un Programming Paradigm? ¿Y una methodology? ¿Y software design? ¿Y que define que un lenguaje sea OOP?
¿Lo tendrías claro en una entrevista? Deberías.
Ya para nota, ¿sabrías lo que es SoC (Separation of Concerns)?

Para cerrar el tema con lo mismo que he empezado esta divagación, enlazo un post: The case of AOP in python.
Y un par de enlaces relacionados con IoC: DI y DIP.

7 comentarios:

cesarob dijo...

En el artículo de IoC de la wikipedia hay alguos enlaces interesantes para amplicar doc, como este, y los de Martin Flower.

cesarob dijo...

*Tengo* que citar esto:

"Inversion of Control is a key part of what makes a framework different to a library. A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.

A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points."


-- Martin Flower

cesarob dijo...

Ver artículo de la wikipedia sobre AOP para ver más implementaciones en python.

cesarob dijo...

De la wikipedia:
"The following are some standard terminology used in Aspect-oriented programming:

* Cross-cutting concerns: Even though most classes in an OO model will perform a single, specific function, they often share common, secondary requirements with other classes. For example, we may want to add logging to classes within the data-access layer and also to classes in the UI layer whenever a thread enters or exits a method. Even though the primary functionality of each class is very different, the code needed to perform the secondary functionality is often identical.
* Advice: This is the additional code that you want to apply to your existing model. In our example, this is the logging code that we want to apply whenever the thread enters or exits a method.
* Pointcut: This is the term given to the point of execution in the application at which cross-cutting concern needs to be applied. In our example, a pointcut is reached when the thread enters a method, and another pointcut is reached when the thread exits the method.
* Aspect: The combination of the pointcut and the advice is termed an aspect. In the example below, we add a logging aspect to our application by defining a pointcut and giving the correct advice."

cesarob dijo...

Otra definición:
"*Dependency injection* (DI) in computer programming refers to the process of supplying an external dependency to a software component. It is a specific form of inversion of control where the concern being inverted is the process of obtaining the needed dependency."

cesarob dijo...

Otro post muy interesante que envia lasiozillo a la lista de python:
Why use Spring Python.

cesarob dijo...

Y otro: Spring Python isn’t a simple port of the Spring Framework