Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update views after enhancements #274

Closed
Riduidel opened this issue Oct 11, 2022 · 5 comments
Closed

Update views after enhancements #274

Riduidel opened this issue Oct 11, 2022 · 5 comments
Assignees

Comments

@Riduidel
Copy link
Owner

Riduidel commented Oct 11, 2022

Currently, views are created at workspace.dsl loading. This prevents enhancements (typically maven ones).

Hopefully, the enhancer already exists : it is ViewUpdater, located into architecture-documentation.

So

  1. Move ViewUpdater into base project org.ndx.aadarchi.base.enhancers.graph package
  2. In ViewUpdater, remove the name based check and only apply view updating on filtered view (https://github.com/structurizr/dsl/blob/master/docs/language-reference.md#filtered-view)
  3. Add in documentation (but where?) the fact that view updating will be based on filtered view
@Riduidel Riduidel self-assigned this Oct 11, 2022
@Riduidel
Copy link
Owner Author

@AcevedoR In this issue we're talking about updating views after having let all enhancers run. What would you prefer ?

  • We update the existing view with all nodes from observed element (that's what the ViewUpdater currently do)
  • We create a new view with added elements ? In that case, we would have to give that new view a name (that's why I was thinking about filtered views, but I don't think they really serve that purpose, I thinkk it would be better to clone the view with a new name)

@Se-C12
Copy link
Collaborator

Se-C12 commented Oct 19, 2022

do I have to include or exclude some elements for the filtered view?

@Riduidel
Copy link
Owner Author

No, you take all elements added during discovery to current diagram. That's exactly what ViewUpdater do. However, if you have any idea on how to have some views updated while others are not it could be very cool.

@Riduidel
Copy link
Owner Author

Riduidel commented Oct 24, 2022

So, steps are

  • Rework ArchitectureEnhancer#enhancerVisitViews(...) to add handling of FilteredView
  • Add support of FilteredView in ViewEnhancer
  • Add default noop implementation in ViewEnhancerAdapter
  • Move ViewUpdater in base module
  • Remove the various if in ViewUpdater
  • Rework the ViewUpdater to process only ComponentViewandContainerViewhaving the propertyaadarchi.update.viewset totrue` (or anything non false)
  • Call the correct view update method

@Riduidel
Copy link
Owner Author

Riduidel commented Nov 3, 2022

Seems like updating structurizr to latest version would allow definition of properties in views (see https://github.com/structurizr/java/releases/tag/v1.16.1) which in turn would allow us to reuse the initial view updated with an aadarchi.auto.include property set to true (or any non-false value).

@Sese-collab Can you take a look at that possibility ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants