2

我有一个遗留的 Lotus Domino Web 应用程序——当然还有数据的数据库,还有 JavaScript、资源——包括 png 和 jpg 图像、HTML 和 CSS 等子表单。

我想导出应用程序本身——不是数据,只是应用程序结构——这样我就可以在其他使用 HTML 模板的更现代的 Web 框架(例如 Rails 或 NodeJS 或 PHP 或 Python 或其他)中重用图像、HTML 和 CSS和 CSS 和 JS 作为文件。

如何按原样导出 HTML、CSS、JS、png、jpg 等?我很高兴采用 Designer 中显示的整个文件结构,只是想获得实际的 HTML/CSS/JS/images/etc。在那里。

我尝试使用“源代码控制磁盘同步”选项,但文件以某种奇怪的 Domino 特定 XML 格式保存,底层 HTML/CSS/etc 存储为十六进制。不是很有帮助。

例如,我的应用程序Shared Elements\subforms\main.login.subform(以及许多其他应用程序)中可能看起来像:

<style>
#service-content {
    background-color: #fff;
}

label, input {
    width: 100px;
    display: inline-block;
    padding: 3px 5px;
    margin-bottom: 10px;
}

input {
    width: 300px;
}

#login-message, h1 {
    text-align: center;
}   
</style>
<div style="width: 450px; margin: 0 auto">
    <input type="hidden" value="/<Computed Value>/page?readform" name="RedirectTo" />

    <h1>Login</h1>
        <!-- lots of html here -->
</div>
<!--// NAVIGATION -->

我想提取它(以及其他人喜欢它)。

编辑:

正如@AndrewB 在下面的评论中指出的那样,这值得更好的解释。

有问题的 Domino 应用程序(主要)使用静态 html 和 JS 通过 Ajax 从代理检索数据。因此,用户界面(html/css/js)对于任何支持都非常可重用,并且工作量适中。

但它只有在我能得到原始静态页面的情况下才有效。这些静力学存储在Resources\Files\Shared Elements\subforms\

编辑2:

当我按照@sjcaged 关闭二进制 DXL 导出时,我得到上述原始 HTML 的输出,如下所示(这只是结束):

<font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='#4200ff'/>"submit"</run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30'/> </run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='purple'/>value</run>    
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30'/>=</run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='#4200ff'/>"Login"</run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30'/> </run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='teal'/>&gt;&lt;/</run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='#3f8080'/>div</run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='teal'/>&gt;</run></par>
<par def='3'><run><font name='Courier New' pitch='fixed' truetype='true' familyid='30'/></run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='teal'/>&lt;/</run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='#3f8080'/>form</run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='teal'/>&gt;</run></par>
<par def='3'>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='teal'/>&lt;/</run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='#3f8080'/>div</run>
<run><font name='Courier New' pitch='fixed' truetype='true' familyid='30' color='teal'/>&gt;
</run></par>
<par def='2'><run><font name='monospace'/>&lt;!--// NAVIGATION --&gt;</run></par></richtext>    
</body>
<item name='$$ScriptName' summary='false' sign='true'><text>main.nav</text></item></subform>
4

2 回答 2

1

The simple answer: There is no way to do this.

The webcode shown in the browser is generated dynamically by the domino http- task from forms, views, pages, subforms, script- libraries, formulas, etc.

There is no simple html- representation anywhere in the database.

To get what you want you would need a leacher, that grabs and downloads the generated source as a browser would do. But as a lot of functionality is server- side (field validations, agents, sending mail, whatever...), you will not get anything sufficient from that approach.

Of course you could manually export the image- ressources, the css- files and probably JavaScript- Libaries (if there are any), but that will not get you any step further to what you want to achieve.

If you want to "migrate" the nsf to another platform, then you will have to rewrite the whole stuff...

于 2014-06-03T12:37:22.410 回答
1

@deitch,你快到了:你确实想要启用源代码控制。它的工作原理是将数据库的内容(自动或手动)与标准文件系统目录同步。有关更多信息,请参阅帮助主题“设置源代码管理启用功能”。

但是,要使其真正发挥作用,需要更改偏好。在 Designer 中,首先转到文件 | 偏好 | 设计师 | 源代码控制。确保未设置“使用二进制 DXL”。有关差异的更多信息,请参阅帮助主题“选择在磁盘上表示设计元素的方式”——基本上,使用常规 DXL 将设计元素数据 [即代码] 与设计元素具有的 DXL 格式的元数据包装分开数据库,其中二进制 DXL 将它们都放入二进制 blob 中,并阻止外部应用程序编辑它们。这里还有其他选项,有关更多信息,请参阅帮助主题“设置源代码管理启用功能首选项”。

完成后,然后(仍在 Designer 中)右键单击项目,选择“团队开发”,然后选择“设置此应用程序的源代码控制”。它可能会或可能不会显示启动屏幕并让您选择下一步,但最终它会显示一个对话框,要求您输入磁盘项目的名称。确保第二行指向一个尚不存在的目录(默认情况下,选中“使用默认位置”复选框,它将指向 Notes 数据目录并附加到该目录作为 on -disk 项目作为新目录名称)。当您选择 Finish 时,它将使用该目录作为根目录将 NSF 中的 Eclipse 虚拟文件系统导出到文件系统。

(并非所有透视图都显示“团队开发”条目。值得注意的是,Java 透视图没有。但是,Domino Designer 透视图会显示。要更改透视图,请选择 Window | Open Perspective 并选择要使用的透视图。)

完成此操作后,您可以使用外部工具将目录添加到源代码控制 [这始终是一个好主意];只要取消选择“使用二进制 DXL”,您还可以使用外部工具来操作被认为是应用程序一部分的代码和数据。

于 2014-06-04T19:59:51.760 回答