简体   繁体   English

导出/打包 Vaadin 应用程序

[英]Export/Package Vaadin Application

I want to be able to share my application with other people, but can't figure out how to package it / export it so that other people can also use it.我希望能够与其他人共享我的应用程序,但无法弄清楚如何打包/导出它以便其他人也可以使用它。 I know I can use its jar, but that requires some use of Command Prompt.我知道我可以使用它的 jar,但这需要使用一些命令提示符。 How would I export properly to make it run as a desktop app/web app?我将如何正确导出以使其作为桌面应用程序/网络应用程序运行?

Web app framework网络应用程序框架

Vaadin is a framework for building web apps . Vaadin 是一个构建 Web 应用程序框架 Applications created with the framework are supposed to be distributed via Internet (accessible via a web browser).使用该框架创建的应用程序应该通过 Internet 分发(可通过 Web 浏览器访问)。

In brief details, the process can be described as:简而言之,该过程可以描述为:

  1. Once you have developed an application, you should deploy it to a Servlet container , such as Tomcat , Jetty , and so on.一旦开发了应用程序,就应该将其部署到Servlet 容器,例如TomcatJetty等。 Application should be packaged in production mode .应用程序应以生产模式打包。 This ensures minification and bundling of the front-end resources.这确保了前端资源的缩小和捆绑。 You end up with an artifact to deploy, either a WAR file or an EAR file.您最终需要部署一个工件,一个WAR文件或一个EAR文件。
  2. Obtain a server on the network or internet.在网络或 Internet 上获取服务器。 Either:任何一个:
    • Buy space from a hosting provider such as a Heroku or DigitalOcean .从托管服务提供商处购买空间,例如HerokuDigitalOcean
    • Provide your own server hardware.提供您自己的服务器硬件。
  3. Install the Tomcat there if there is not one.如果没有,就在那里安装Tomcat。
  4. Once your web container is started, you users will be available to use your application via the IP address your server has.一旦您的 Web 容器启动,您的用户就可以通过您的服务器拥有的IP 地址使用您的应用程序。 In case you want to have a dedicated name, you can buy a domain name .如果您想拥有一个专用名称,您可以购买一个域名

Progressive web application (PWA)渐进式 Web 应用程序 (PWA)

Another aspect, is that you can develop your web application as a progressive web application (PWA) .另一方面,您可以将 Web 应用程序开发为渐进式 Web 应用程序 (PWA) Still, the application runs in the browser, but an icon prompt for installing software will be added to your main page(in the browser).该应用程序仍然在浏览器中运行,但安装软件的图标提示将添加到您的主页(在浏览器中)。 A user can click it and the application will be installed.用户可以单击它,应用程序将被安装。 But to do that you have to follow the requirements listed here : Application installation requirement但要做到这一点,您必须遵循此处列出的要求: 应用程序安装要求

But, generally, Vaadin is not the right tool, if you want to create applications that are installed locally.但是,通常,如果您想创建本地安装的应用程序,Vaadin 不是正确的工具。 I am also wondering, where you have found information that it can be installed?我也想知道,你在哪里找到可以安装的信息? :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM