I have a question about switching between Ignition Perspective projects. Below is my example:
I decided to divide the project into parts that is, into several projects. For organizational reasons it is easier for me to manage SCADA in this way to make modifications easier.
Let's say I have one frontend interface on which a user logs in. I would like the interface window to show the selected production line. Similar to the principle of embedded view but from another project, let's call it embedded project? The selected production line is part of another project.
I need to find the best way to select the item in the main view but in the sub view refer to another project. I've done it using an Iframe and it works in such a way that when you select a line, e.g. 1, in the subview, a link to the other project is launched and loading occurs.
Do you have a better and clearer way to reazilize this function? The disadvantage is irtiting loading, which was not there when the project was in one place
I will be thankful to all engineers for suggestions!
I hate the behaviour you mention as well... Maybe if the loading process after the initial load was less intrusive (i.e. just a progress bar with the background blurred like a modal popup or something like that), it would be less of a problem. One thing I just thought of as I'm typing this is to try setting the branding background color to your app's default background color and see if that helps - I actually don't know off the top of my head if the loading screen also accepts the Branding values as well.
Since I'm a more UI-focused developer, that loading screen is ugly enough for me to use a very bad practice in my project setup, namely, putting all resources in one project. I hate doing that but I also hate the interruption every time you access a page from a different project.
Consider a chain of inheritable projects instead, if you must. Just make sure the projects closest to the root need no resources from projects further from the root.
Consider the project hierarchy from this comment:
For your case, replace perspective_common with two or three resource projects in a chain, where the UI leaf projects inherit from the last one. Something like this, perhaps:
Also it is hurtful to my eyes due to the fact that I always try to provide operators with the best version of the GUI. That's why I ask for advice from other users. I am working on finding another way, thank you for your feedback
This is a good approach when you plan and create everything from scratch. My problem is that a lot of work has been done before and the concept and equipment have changed. In fact, these projects are already created which I did not mention. I have to combine it, the elements in one project were created on the basis of the other and worked separately.
Newer versions for other clients were created in other projects. Some projects refer to other tag structures in the provider. Now the situation has come up that this needs to be merged. Elements have largely the same names, e.g. script and bainding, but underneath them are different logics.
Combining this into one project is really a big job to standardize it to the level of one project. I guess I'll have to consider getting it done because the priority is to do it right.
If you have that much technical debt, maybe you should start from scratch (in parallel, so you can migrate).
The designer export tool can send resources to other projects. That is a good way to take scattered pieces and push to the right places in a new hierarchy. If your current projects are stand-alone, just change them to inherit from the new common project. Then you can push resources "inward" to the right inheritable project, update, and delete the now-overridden resource from the old leaf.
The fundamental technical limitation you'll keep running into is that Perspective works as a "single page application". On session startup, the loading splash you get is the frontend downloading all required assets for all components for every page in the project, the basic skeleton of those views, etc. Mixing projects as you are is counter to the entire model of how Perspective works, and we're pretty much guaranteed to not change it at this point.
@pturmel brings up a good point (as is his custom, it seems) - to set up inheritable projects in a way that the UI heavy projects are the leaf nodes of the project structure tree. A question that I immediately have, then, is with the SPA loading screen you mentioned, if its a leaf project that inherits from several other projects that all stem from one root, does the Loading screen then load the assets for all the parent projects? In other words, the deeper you go, the longer the loading would take, right?
In truth, there is no inheritance there. When the project for one line is finished I copied the project to a hardcopy and did the required modifications as a result I have several projects that are not inherited from each other.
Now that I have merged projects from different sources and versions I have several projects on one gateway. When I want to run another version in Inline component I put a link to run another project and there is loading etc...
These projects are on other Gateway often completely different clients. The more, the harder it is to control.
In summary, the best way seems to be to do a big clean-up in one project.