09 August 2016

Moving BootstrapRule to Renraku

At the moment I am refuctoring CriticBrowser to work on Renraku quality model. Renraku is a model that I've developed over the last couple of years. It started as a model for ViDI and now it is used by QualityAssistant.

It's hard to introduce Renraku in one go. It's a metamodel, a concept, an idea… It has to be used and bring value. This is why I decided to tell one story.

There is a Pharo bootstrap rule that checks if the core packages of Pharo depend on external packages. This rule is important to ensure that there is a minimal Pharo kernel that can work autonomously. What critic browser was doing is to ask a rule #isArchitecturalRule. If so — display a menu entry to open a dependency browser. This also means that the main superclass rule had to return false for #isArchitecturalRule and the same method was overridden somewhere in the hierarchy to return true. As the result CriticBrowser had to be aware about the types of rules that are in the system. And this is not what we want. We want tools to be aware about the model, and allow developers to create whatever rules they want.

The solution was simple. I created a new critic type for architectural rules, which has an action to open the dependency browser:
RePropertyAction new
    icon: #smallWindow asIcon;
    description: 'Open dependency analyzer';
    action: [ :crit :package | self openDependencyAnalyzerOn: package ];
    yourself
Then I made sure that the bootstrap rule will generate architectural critiques. Previously I also refactored CriticBrowser to include all the actions in the critique's context menu. As the result one can launch the dependency browser from the context menu of CriticBrowser:
or from QualityAssistant:
and none of the tools have any knowledge about what is an architectural rule. One can even go much further: there is a possibility to report multiple critiques where each will represent a single dependency going from the package in question. Then another action can take developer directly to that dependency. But that's another book…

It is Renraku which allows rulemakers to build their own critiques. And there are tools that convey the critiques to the developers.


P.S. Yes it is not perfect. Because previously we could open the dependency browser on multiple packages at once and now it can be done only per-critic and so per single package. But this is something Renraku has to evolve into.

1 comment:

  1. You can even play video games and benefit of|benefit from|reap the benefits of} bonus rounds and common particular events to try and win. When you play video games, bet extra 1xbet korea to cover extra profitable prospects, since these games work like buy-a-pay slots. Unlike most different playing games, slot machines have been designed to persistently supply small rewards to gamers to keep them engaged and coming back.

    ReplyDelete