Why Mildred's Fallback are very important

Pierre-Alexandre Voye ontologiae at gmail.com
Wed Nov 26 14:42:27 UTC 2008


Mildred presented us fallback mecanism this summer. I was interested by this
idea beacause of all crazy idea it offers me (like generate code with slot
name, etc...).
You certainly remember I talked you about Spring FrameWork. Spring is very
important and massively used in IT company.
I'm currently working on a J2EE server with the last Spring MVC, webflow,
etc...
Spring is Rube Goldberg machine (Translation of french's "Gas Plant") but
manage to work sometime.

Spring is used to cut software sectors, the goal is to avoid direct link
between them. In Java, interface are used to glue, to permit object discuss
between them.

The structure is always a kind of :
-  Business domain sector which is a persistant sector on the DB. In this
sector, there are simple object which represent each table of the DB, with
annotations to tell if the link is one to many are other...
- Business Data Acces is a sector which access to the domain and perform
some research functions
- Business Service use the DA sector to offers Business specific function.

For instance, when you code a Service object, you set a DA object in your
service object. You call method of this DA object, like List<foo> =
objectDA.findByName("toto")
But with Spring, you have not create your DA Object in your service object.
You have just to set standard getter and setter, like getObjectDA and
setObjectDA, and Spring inject a created object in your setter.
Because you have just use an interface, and not an implementation, with code
in, you can define in a configuration file what specific implementation you
use.
You can thus change your database, but more usualy test each object, Spring
create all the nececary environment for your test.
It's very important for the quality of the software.

So, Spring is a great step in software developpement because it forced to
uncouple your software and permit to test each part in a seemly true
environment.

Spring, internaly, use Aspect Oriented Programming : when your object is
created, it inject needed objet in seters. When you call a methode, it make
a lot of thing before calling the true code, and it make it with
transparency.

In Lisaac, we can do that with contract, but it force hacker to explicitely
type the call. Hacker will use a generic object with deffered slots to
replace java interface

With Mildred's fallback, we can define a generic object which have been
created the implementation object defined in the configuration file. With
fallback mechanism, it calls the true code after have been done his stuff.
This generic object is injected in the target object with some configuration
information...


La flemme de le refaire en français ;-)

Greetings,

Pierre-Alex


-- 
---------------------
Isaac Project - http://isaacproject.u-strasbg.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20081126/2127f658/attachment.htm 


More information about the Lisaac-devel mailing list