archi
archi copied to clipboard
[Feature request] Create a viewpoint
There are many viewpoints that can exist so if there is a mechanism that enables a custom view to be created.
I've seen a glimpse of the source code like Viewpoint
, IViewpoint
, ViewpointAction
, and there is a nice structure in Archi that makes it flexible.
I'm a programmer in Java and maybe I can work with you, it's a great feature to add.
The main issue around this is where to store the Viewpoint definition. To be portable, it has to be stored somehow inside the model file. But it also needs to be stored somewhere outside the model so it can be re-used.
What do you suggest solutions?
What do you suggest solutions?
I don't have any solutions yet, that's why I haven't implemented it. This feature is low priority so I won't be thinking about it at the moment.
Viewpoints are parts of AD (architecture description) and can be in the model file (it is rational). For export to other models they may be separate files with the same syntax (XML). I don't read the code clearly but I think there is a way. This feature will make a small change but the great ability will be enabled. I can involve in enabling this feature.
You can create custom Viewpoints now by editing the viewpoints.xml
file. You can share that file with others if you want to.
Hi,
My 2cts on this:
- As said by Phil, viewpoints definitions must be local to the model.
- A viewpoint is more than just a restriction on concepts and involves also describing the intent of the viewpoint, the target audience, guidelines...
This means that implementing customizable viewpoints in Archi is a really big topic.
In the meantime, there's a trick I use to customize viewpoints: I create a lang plugin which sole purpose is to replace the viewpoints.xml
file (discussed a bit in this issue). I even created an automated way to create such plugins using a model as input and a jArchi script. I plan to enhance it and share it someday (need some work, so not for the near future).
Yes, It is not just restrictions on concepts but Modeling tools such as Archi, it is concerned about how the modeling will be for the intended purpose. Other things shall be described elsewhere outside the Archi.
Another thing, I tried to add relationships in the viewpoint but it did not work. Is it allowable to be within viewpoint tags?.
Another thing, I tried to add relationships in the viewpoint but it did not work. Is it allowable to be within viewpoint tags?.
No. At the moment, all relationships are allowed in every Viewpoint. Maybe we'll change that one day,
You can create custom Viewpoints now by editing the
viewpoints.xml
file. You can share that file with others if you want to.
Could it be solved as following:
- Create singleton ViewPointsStorage object.
- Basic init of this object is done from viewpoints.xml within basic distro,\
- Model can store viewpoint definition as extension of certain object of viewpoints.xml .
- Viewpoints could be copied within single instance of Archi between models.
Also maybe in this solution there could be done custom concept definitions inside a viewpiont definition, as proposed at 42010.
Hi,
Reacting on #942
Some companies don't allow modifying the program files, of which the viewpoints.xml. Might be interesting to allow user defined viewpoints, defined in a viewpoints.xml stored in user files.
There's a better way to modify this file without admin right: launch Archi with a custom language (even one which doesn't exist, such as custom
) and create a translation plugin for this language containing only a custom version of the viewpoint.xml
file.
That's what I'm doing for my colleagues and it works just fine. I even setup a method for that: I document my viewpoints in a model, then a script generate the plugin based on the model and some metadata.
Hello! I have been working on a viewpoints importer using an XML file, which is then saved into a viewpoint_custom.xml within the tool. With this, it is possible to share the viewpoint, and furthermore, it is also stored within the tool. Is this something that could be considered for inclusion in Archi?
Is this something that could be considered for inclusion in Archi?
It depends on how it has been implemented, but yes, this is the kind of feature that could be added. (Btw, there's some way to import viewpoints using a translation/localization plugin).
Could you share the code somewhere ?
It depends on how it has been implemented, but yes, this is the kind of feature that could be added. (Btw, there's some way to import viewpoints using a translation/localization plugin).
I follow the same basic structure for the viewpoints as Archi, so their names could be translated. Here's an example:
<viewpoint id="test">
<name xml:lang="en">Test</name>
<concept>Location</concept>
<concept>Grouping</concept>
</viewpoint>
Could you share the code somewhere ?
Yes, of course, you can check it here. This is a first version of the development, and I'm willing to refactor and improve it in order to incorporate the feature
Could you share the code somewhere ?
What do you think about code?
Could you share the code somewhere ?
What do you think about code?
Thanks for sharing. I need more time to think about how best to implement this.