Affichage des articles dont le libellé est objective reality. Afficher tous les articles
Affichage des articles dont le libellé est objective reality. Afficher tous les articles

vendredi 17 janvier 2014

The Troll Inception - Objective Reality Php Framework

The Troll Inception is an objective reality php "solution" NOT A FRAMEWORK, based over the CSS (Code Similar Situations) principle, and a strict personal notion of object, all thought by Edouard Kombo.

Because you don't have to learn a framework, but only good development practices, TTI is not a framework, but a concentration of good practices made extremely intuitive and playful!

The initiative behind TTI was to rethink the notion of object based from the CABIN principle (http://le-code-vulgarise.blogspot.fr/2014/01/principe-cabin-pour-la-construction-d.html).
We truly believe a true object is only an interface, implemented by an abstracted shape you can concretely use. That's all!
That means, a concrete class that doesn't have a contract with an abstract class and an interface, can't be considered as real object, but rather as a trait, or "lost son", or anything else, but not as an object.

Based from this notion, we developed two powerfull collection of generic classes that is a standard base for true objects, and, that can be used in any of your projects to fully respect SOLID and GRASP principles.

"InterfaceFactory" and "AbstractFactory" collection of classes, are the heart of The Troll Inception solution.
AbstractFactory is a collection of abstracted classes that have very single responsibilities implemented by specifics and generic interfaces grouped in the InterfaceFactory.

Together, they offer powerfull possibilities and constraints for better closed development practices in your applications development.

Coupled with the CSS principle (http://le-code-vulgarise.blogspot.fr/2014/01/what-is-css-principle.html) and the Objective Reality (http://le-code-vulgarise.blogspot.fr/2014/01/what-is-objective-reality-design-pattern.html), TTI offers you a new generation of framework that can involve agile development.



The Troll Inception STORY (CSS and Objective Reality implementation)

You play Roar, a troll cave, lost in the Breeze forest by his stupidity. To survive, he has to conquer and dominate this forest.
Roar has several tools at its disposal, like a torch, a map, an eagle that will guide him to the best routes he can teleport to, via the magical portal, an ancestral passort...
The goal is to reach all routes and respond, to affirm your territory.
When Roar responds, he may beat the asian forest spirit, "Foucking Law".
Foucking Law has one powerful wild beast, CodeCeption, which will test Roar as many possible times, like a ghost.
Everytime Roar responds successfully to Foucking Law, he wins 5 Chicken points.

These points will help you estimate more precisely the technical debt a project will introduce.



How is it applicable?
 
You start to play with objective reality in the heart of your application, just by renaming variables as living objects or characters of the story telling.
This way, all the application you are designing, is easily printable in your subconscious mind.
You are playing with it, and it is now easier for other developers to play with it too.



How to download the Troll Inception Project?

Go on Github, just here: https://github.com/edouardkombo/TheTrollInception

What is Objective Reality design pattern?

Objective Reality is the fact of coding real and funny situations, in an objective and professional goal.
It is a design pattern based over the CSS (Code Similar Situations) principle, that has also been thought by Edouard Kombo.



Concrete Example

Before, to open a file and send it by mail, you were coding like this:
$parser = new Parser();
$mail = new Mailer();

$file = $parser->open($file);
$mail->send($file);
Now, with Objective Reality design pattern, you should imagine a story and code like this:
$torch = new Parser();
$boomerang = new Mailer();

$file = $torch->open($file);
$boomerang->send($file);

Explanation

In the second example, you added a little bit of creativity in your code, that implies a story-telling creation.
That's it, with a story telling, you are now able to play with your code, and help other developers understand more easily the purpose of your instructions.

The structure of your program doesn't have to change, just rename the variables to begin openning a universe that could revolutionnate the way you develop applications and master it.


Advantages

When you play, you except to win something and earn a reward.

By example, you can establish within your team a reward board for every classes tested and developed that will help you estimate more precisely the technical debt of a project.

In all cases, developers will have the illusion to play with something, rather than building a complex architecture.


What kind of story telling to apply?

The goal of Objective Reality is not to apply fancy things to variables names.
There are rules to make it efficient.

The first and unique rule is to apply CSS (Code Similar Situations) principle.
It could be a movie you liked, a cartoon, a real life experience, it could be anything you imagine, but only a situation the largest number of people may have lived.

This will significantly facilitate code reuse of your applications.


To learn more about CSS principle, click here http://le-code-vulgarise.blogspot.fr/2014/01/what-is-css-principle.html.