“门户"多应用程序 [英] "Portal" with multi-apps

查看:35
本文介绍了“门户"多应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过 Openui5 开发一个门户.我的门户有 2 个应用程序.我已将代码组织在文件夹中:

I'm developing by Openui5 a portal. My portal have 2 apps. I I have organized the code in folders:

root
  |
  |____app1
  |____app2
  |
  |____appN

在每个应用程序文件夹中,我都有master"文件夹、detail"文件夹……等等.组织代码的最佳方式是什么?

In each app folder I have "master" folder, "detail" folder...etc.. What is the best way to organize the code?

现在我有一个 SplitView 的外部结构,我从中调用子应用程序(简单地说,当我从主列中的列表中选择应用名称时,我将常规主从页面 - 或当前应用主从页面 - 替换为所选应用的主数据页面)

Now I have an external structure of SplitView from which I call the sub-apps (simply, when I select the app name from the list in the master column I replace the general master-detail pages - or the current app master-detail pages - with master-datail pages of the app selected)

这是开发多应用门户"的正确方法吗?

Thi is the right way to develop a multi-app "portal"?

推荐答案

绝对不是最糟糕的方法 :)

Definitely not the worst approach :)

您可能还想考虑使用 UI5s 组件概念.通过为每个组件提供专用的路由器和事件总线,它可以更好地分离应用程序.它还将子应用程序模型彼此隔离,以便您可以在每个组件中使用相同名称的模型(对于 i18n/ResourceModel 很方便).组件甚至不必位于同一位置.

You might also want to think about using UI5s Component concept. It allows for a better separation of apps by providing dedicated Router and EventBus for every component. It also isolates the sub-apps models from each other so that you can have models with same name in every component (handy for i18n/ResourceModel). A component does not even have to live within the same location.

与您计划做的事情完美匹配,但可能有点过大,因为将不同的子视图(主视图/细节视图)从一个组件放置到父组件中可能会有点棘手.

The perfect match for what you plan to do but might be a little oversized though since placing different subviews (master/detail) from a component into the parent component can get a bit tricky.

GL克里斯

这篇关于“门户"多应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆