架构问题:GWT 还是 Vaadin 创建桌面应用程序?

发布于 2024-10-21 08:54:50 字数 881 浏览 4 评论 0原文

我们计划创建一个提要阅读器作为Windows 桌面和iPad 应用程序。由于我们希望能够在此应用程序中显示网站运行(我们自己的)JavaScript,因此我们考虑以 HTML/CSS/JavaScript 的形式提供该应用程序,只需封装即可通过一些 .NET 控件或 Cocoa Touch Web 浏览器组件。因此,当前的任务是找出使用哪个框架来创建要嵌入到应用程序中的 HTML/CSS/JS 文件。

对于 HTML/CSS/JavaScript 的开发,我们很乐意使用 Vaadin、GWT 或其他一些框架,因为我们使用 Java 比使用 JS 好得多。经过短暂的集思广益后,我们倾向于 Vaadin,因为 UI 组件非常好,但我担心大部分繁重的工作将在服务器上而不是在客户端上(这不会太好)。我们也想要 GWT,但是 Java 到 JS 的编译需要大量时间和额外步骤,并且过去使用它时会减慢开发时间。

问题是:您会选择哪个开发框架(假设您想实现这个项目并且到目前为止您主要使用 Java)以及为什么?如果有更好的框架选项(富客户端框架列表),请告诉我。

编辑:应用程序需要不时与我们的服务器通信(例如同步已读取的内容),但主要应该获取 xml feed 本身。因此,我希望大部分生成的代码可以嵌入到应用程序中,并且不需要我们的服务器进行繁重的活动。

Edit2:我们(实际上,即使您怀疑)期望至少 10000用户。

We're planning on creating a feedreader as a windows desktop- and iPad application. As we want to be able to show Websites AND to run (our own) JavaScript in this application, we thought about delivering the application as HTML/CSS/JavaScript, just wrapped by some .NET control or a Cocoa Touch webbrowser component. So the task at hand is to find out which framework to use to create the HTML/CSS/JS files to embed in the application.

For the development of the HTML/CSS/JavaScript we would be happy to use Vaadin, GWT, or some other framework, as we're a lot better with Java than with JS. We favor Vaadin after a short brainstorming, as the UI components are very nice, but I fear that most of the heavy lifting will be on the server and not in the client (and that wouldn't be too nice). We would also like GWT, but the Java-to-JS compiling takes a lot of time and an extra step, and slowed down development time in the past when using it.

The question is: which development framework would you choose (given you wanted to implement this project and you mostly did Java so far) and why? If there are better framework options (List of Rich Client Frameworks), please let me know.

Edit: The application will need to talk to our server from time to time (sync what has been read for example), but mainly should get the xml feeds itself. Therefore I hope that most of the generated code can be embedded in the application and there doesn't need to be heavy activity with our server.

Edit2: We (realistically even if you doubt) expect at least 10000 users.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

本王不退位尔等都是臣 2024-10-28 08:54:50

根据我在 Vaadin 的经验,我会这样做,但您的要求在某种程度上偏向于纯 GWT。

  • Vaadin 需要服务器和服务器连接。如果主要构建离线桌面应用程序,则可以使用嵌入式 Jetty 等来解决此问题。 (仅在需要时与在线服务同步),但对于 iPad,您需要立即连接在线才能启动 Vaadin 应用程序。
  • GWT 完全在客户端运行,您可以构建一个仅在需要时连接的 JavaScript 浏览器应用程序。

由于 Vaadin 的开发速度要快得多,因此您可以先构建一个小型 Vaadin 版本,然后看看这在 iPad 上是否确实存在问题。

另一方面,如果您可以假设立即上网,则可以完全跳过本地服务器安装。只需在线运行应用程序并使用操作系统默认浏览器控件(即您建议的.NET 控件)实现桌面版本即可。那么瓦丁就更容易了。

Based on my experience with Vaadin, I'd go for that, but your requirements are somewhat favoring pure-GWT instead.

  • Vaadin needs the server and server connection. If building mostly offline desktop application, this can be solved with an embedded Jetty for example. (synchronize with an online service only when needed), but for iPad you would need to connect online right away to start the Vaadin application.
  • GWT runs completely at the client-side and you can build a JavaScript browser application that only connects when needed.

Because Vaadin is much quicker to develop, you could build a small Vaadin version first and see if that is actually problem on the iPad.

On the other hand, if you can assume going online right away, you can skip the local server installation altogether. Just run the application online and implement the desktop version using operating systems default browser control (i.e. the .NET control you suggested). Then Vaadin is easier.

绿萝 2024-10-28 08:54:50

Vaadin只是基于GWT的框架,但有两个非常重要的特性:

  • 不需要运行GWT编译器。它是纯java的。当然,如果不添加插件,因为 gwt 编译器必须运行。
  • 您不需要编写通信代码。因此,您不需要解决 DTO 问题、不可序列化对象映射,也不需要编写 servlet。

我在工作中使用 Vaadin 一年了,我们还没有出现性能问题(类似桌面的应用程序,约有 500 个用户)。 IMO 非常好的解决方案是仅将 Vaadin 用于 UI,逻辑移动到独立的 beans 并使用 Spring 或 Guice 连接这两个元素。

在这种情况下,您应该使用 MVP 模式和领域驱动开发。

  • 业务 bean 是使用视图接口发送响应的域对象和逻辑。
  • 自定义 Vaadin 组件(可以扩展标准组件)实现视图接口。

如果 Vaadin 不适合您,当您决定更改 UI 引擎时,这种方法很好。只需重写 guice/spring 映射并编写视图接口的新实现即可。

Vaadin is just framework base on GWT but have two very important features:

  • don't need to run GWT compiler. It is pure java. Of course if not add addons because then gwt compiler must run.
  • you don't need to write communication code. So you don't need to solve DTO problems, non-serializable object mappings and dont need to write servlets.

I use Vaadin in my work for one year and we haven't performance problems yet (desktop like application with ~500 users). IMO very good solution is to use Vaadin just for UI, logic move to independent beans and connect this two elements using Spring or Guice.

In this case you should use MVP pattern and Domain Driven Development.

  • Bussines beans is domain objects and logic that use view interfaces to send responses.
  • Custom Vaadin components (could extends standard components) implements view interfaces.

That way is good when you decide to change UI engine if Vaadin is not for you. Just rewrite guice/spring mappings and write new implementations of view interfaces.

天邊彩虹 2024-10-28 08:54:50

我的 3 美分:

如果您决定使用 vaadin,您将从已经很好看的组件中受益。由于您不想编写(大量)CSS,因此 vaadin 开箱即用就已经很漂亮了。然而,Vaadin 是一个服务器端框架。即使用户界面交互不涉及获取任何数据(例如从一个选项卡移动到另一选项卡),也会影响后端。

如果您决定使用 GWT,您至少必须设计应用程序的样式(这并不难)。还有编译时间长的问题(但是您可以在托管模式下进行测试和调试,该模式允许您无需编译即可运行应用程序,然后仅在部署时进行编译)。 gwt 的主要优点是您可以控制发送到线路的内容,对于不需要从后端获取数据的 UI 交互,它将纯粹在客户端工作。开发人员将决定何时向后端发送请求。 (在 GWT 中执行 RPC 请求非常简单)

希望这会帮助您做出决定。

My 3 cents:

If you decide to use vaadin, You will benefit from already GOOD LOOKING components. Since you dont want to write (alot of) CSS , vaadin is already good looking out of the box. How ever, Vaadin is a SERVERSIDE framework. User interface interactions will hit the back end even if they dont involve getting any data (e.g moving from one tab to the other) .

If you decide to use GWT, you will have to atleast style the application (this is not hard) . There is also the problem of long compilation time (but you can test and debug on hosted mode which allows you to run the application without compiling , then you compile only when deploying). The main advantage of gwt is that you control what gets sent to the wire, For UI interactions that dont require getting data from the backend, it will work purely on the client side. You the developer will determine when to send a request to the back end. (Doing RPC requests in GWT is very easy)

Hope this will help you make the decision.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文