enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
200 stars 34 forks source link

ioLib.getResource cannot get resource from another app #10419

Closed rymsha closed 6 months ago

rymsha commented 6 months ago

ioLib.getResource is unusable in case developer needs resources from the app different from a "current application" app. Java API can - this is why this issue was not noticed before. This is quite inconvenient when applications need to share resources - one application uses resources of another.

sigdestad commented 6 months ago

We should not promote / enable such approaches. Relying on assets in others apps is an antipattern.

rymsha commented 6 months ago

Absolutely it is. Ideally this should be solved differently - by injecting resources into an app. In OSGi this is solved by Fragments. It would be App Extensions in XP terms. But we don't have such thing.

rymsha commented 6 months ago

Conclusion is - application developers should not have (easy) access to resources from other apps. We won't fix this issue.