XPage Osgi插件开发

编程入门 行业动态 更新时间:2024-10-28 06:30:56
本文介绍了XPage Osgi插件开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

背景 过去一年左右,我设计了许多工具,目的是帮助我为XPages编程.这些工具主要包括辅助Java类,扩展的日志记录(利用OpenLogger和我自己的东西)以及其他一些我个人认为无法使用的东西.已经与我的雇主讨论过,我们认为开始将这些项目发布到openNTF可能是一个好主意.由于这些工具大约由3个.nsfs组成,所有工具都设计为使用相同的Java代码,键javascript类,css甚至一个或两个自定义控件,因此我想将键项整合到一个插件中,该插件可以安装在服务器和客户端级别.我想先进行合并,然后再考虑发布到目前为止已完成的任何工作.维护不仅对我自己,而且对潜在用户来说,将花费太多精力.我还没有在Google搜索中找到有关如何执行此操作的任何信息.我还必须确保能够使用ExtLib库,openNTF Domino API和Notes API.

background I have designed many tools in the past year or so that is designed to help me program for XPages. These tools include primarily helper java classes, extended logging (making use of OpenLogger and my own stuff), and a few other things that I personally feel I cannot work without. It has been discussed with my employer, and we feel that it might be a good idea to start publishing these items to openNTF. Since these tools are made up of about 3 .nsfs, all designed to use the same java code, key javascript classes, css, and even a custom control or two, I would like to consolidate key items into a plug-in that can be installed at the server and client level. I want to do this consolidation before I even think about publishing any of the work I've done so far. It would just be far too much work to maintain, not just for me, but for potential users. I have not really found any information on how to do such a thing in google searches. I also have to make sure that I am able to make use of the ExtLib libraries, openNTF Domino API, and the Notes API.

我的问题

  • 如何最好地设计此类插件?必须设计师 使用eclipse,还是可以直接在Notes中执行此操作 设计师?
  • 设计师在设计和更新插件代码时如何最好地保持服务器和客户端的最新状态?这就是为什么经常使用GitHub的原因吗?
  • 从哪个方向开始学习材料的最佳位置是哪里?我有点迷失在树林中,知道我需要往北走,但第一步没有指南针.
  • How does one best go about designing such plug-ins? Must a designer use eclipse, or is this it possible to do this directly in the Notes Designer?
  • How does a designer best go about keeping a server and client up to date while designing and updating the plug-in code? Is this why GitHub is often used?
  • Where is the best place to get material to get started in this direction? I sort of feel lost in the woods, knowing I need to head north, but not having a compass for that first step.
  • 非常感谢您的投入.

    推荐答案

    以我的经验,我发现在不习惯插件开发之前,插入插件开发是一项巨大的PITA,但是从总体上来说,这是绝对值得的.

    In my experience, I found that diving into plug-in development is a huge PITA until you get used to it, but it's definitely worth it overall.

    关于是否可以使用Designer进行插件开发:是的,但是您最终可能不希望这样做.我开始使用Designer处理这种事情一阵子,大概和您一样:为什么当我整天坐在一起时,为什么要麻烦安装另一个Eclipse实例呢?但是,在Designer的年龄(我认为它大致相当于Eclipse 3.4)之间,应用程序"和"Project Explorer"视图之间的工作集之间存在一些奇怪之处,而就我而言,我希望使用Mac应用程序,我最终切换了.

    As for whether you can use Designer for plugin development: yes, but you will likely eventually want to not do so. I started out by using Designer for this sort of thing for a while, presumably with the same sentiment as you: why bother installing another instance of Eclipse when I'm already sitting in one all day? However, between Designer's age (it's roughly equivalent to, I think, Eclipse 3.4), oddities when it comes to working sets between the "Applications" and "Project Explorer" views, and, in my case, my desire to use a Mac app, I ended up switching.

    主要有两个起点:XSP入门工具包( www.openntf/internal/home.nsf/project.xsp?name=XSP%20Starter%20Kit )和Niklas Heidloff的有关设置Eclipse以进行XPages开发的视频( www.openntf/main.nsf/blog.xsp ?permaLink = NHEF-8RVB5H ).后者提到XPages SDK( www.openntf/internal/home.nsf/project.xsp?name=XPages%20SDK%20for%20Eclipse%20RCP ),这也很有用.在我的设置中,我发现该视频非常有用,但是有些方面很难找到(IBM的下载日新月异)或可选(调试,这取决于您是否在Windows上使用Eclipse).

    There are two major starting points: the XSP Starter Kit (www.openntf/internal/home.nsf/project.xsp?name=XSP%20Starter%20Kit) and Niklas Heidloff's video on setting up Eclipse for XPages development (www.openntf/main.nsf/blog.xsp?permaLink=NHEF-8RVB5H). The latter mentions the XPages SDK (www.openntf/internal/home.nsf/project.xsp?name=XPages%20SDK%20for%20Eclipse%20RCP), which is also useful. In my setup, I found the video largely useful, but some aspects either difficult to find (IBM's downloads are shifting sands) or optional (debugging, which will depend on whether or not you're using Eclipse on Windows).

    这些资源通常可以帮助您进行设置.设置Eclipse环境时要担心的主要问题是确保正确执行了Plug-In Execution Environment.如果您遵循SDK的安装说明,那么应该可以带您到需要的地方.

    Those resources should generally get you set up. The main thing to worry about when setting up your Eclipse environment will be making sure your Plug-In Execution Environment is properly done. If you're following the SDK setup instructions, that SHOULD get you where you need to be.

    接下来要了解的是插件的结构方式.您要在Designer或Domino中安装的每个插件还将与一个功能项目(一个功能可以容纳多个插件)配对,并且可能与一个更新站点配对-如果您只想将功能导入更新站点,则最后一个是可选的NSF.这就是我通常进行常规插件开发的方式:将配对的功能导出到目录中,然后将该功能导入服务器的更新站点NSF中,然后使用Application-> Install从那里安装在Designer中.您还可以设置内容,以便将其部署到服务器的plugin/feature目录中,而不是根据需要采取安装至更新站点的步骤. GitHub在这方面并没有真正发挥作用-它更多地是关于与代码共享/协作以及在git存储库中有一个远程存储位置(我强烈建议).

    The next thing to know about is the way plugins are structured. Each plugin you want to install in Designer or Domino will also be paired with a feature project (a feature can house several plugins), and potentially an update site - the last one is optional if you just want to import the features into an Update Site NSF. That's how I often do my normal plugin development: export the paired feature to a directory and then import the feature into the server's Update Site NSF and then install in Designer from there using Application -> Install. You can also set things up so that you deploy into the server's plugin/feature directories instead of taking the step of installing into an update site if you'd prefer. GitHub doesn't really come into play for this aspect - it's more about sharing/collaborating with your code and also having a remote storage location for your git repositories (which I highly advise).

    至于迷失在树林中"的感觉:是的,你会好一会儿.有很多运动部件和深奥的概念可以一次掌握所有内容.如果您主要遵循上述链接,然后从XSP Starter Kit(它本身是一个可以与某个功能配对的插件项目)中的一些基础知识入手,例如,在Activator类中打印文本,并为确保它起作用-这应该有助于弄湿你的脚.

    And as for the "lost in the woods" feeling: yep, you'll have that for a good while. There are lots of moving parts and esoteric concepts to get a hold of all at once. If you mostly follow the above links and then start with some basics from the XSP Starter Kit (which is itself a plugin project that you can pair with a feature) - say, printing text in the Activator class and making an implicit global variable just to make sure it works - that should help get your feet wet.

    更多推荐

    XPage Osgi插件开发

    本文发布于:2023-07-23 09:27:48,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1195948.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:插件   XPage   Osgi

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!