威克特 vs 瓦丁

发布于 2024-09-15 21:10:45 字数 683 浏览 9 评论 0原文

我在威克特和瓦丁之间左右为难。我正在启动一个微型 isv,需要选择 Web 框架。我已将选择范围缩小到 Wicket 和 Vaadin。这两个框架我都用过,而且都很喜欢。但我需要做出选择。

如果我选择 Vaadin:

  1. 我不必太担心外观和感觉。它带有漂亮的主题。
  2. 我将用我非常擅长的 Java 进行所有编程,而不必花时间修改不太擅长的 CSS。
  3. 我的业务应用程序所需的大多数组件都是开箱即用的,包括桌面式布局、工具提示、键盘快捷键、带有可拖动和可折叠列的表格等等。

但是,如果我采用 Vaadin 方式:

  1. 我将失去以声明方式创建 UI 的能力。
  2. 如果浏览器不支持 JavaScript(例如大多数非 Webkit 移动浏览器),我将不会使用后备功能。
  3. Vaadin 公司正在销售一些组件 - 例如 JPAContainer,因此我不确定该公司是否会致力于提供完整的开源框架。商业利益永远是第一位的。
  4. Vaadin 应用程序主要用于内部网。它们不太适合具有网络外观和感觉的互联网。

如果我采用 Wicket 方式:

  1. 我将不得不设计我的应用程序的样式,并且我几乎无法为它们提供桌面外观和感觉。

有什么建议吗?任何对这两个框架有经验的人请告诉我其缺点和优点以及您如何做出决定。

I am torn between Wicket and Vaadin. I am starting a micro-isv and need to make a choice of web framework. I have narrowed down my choices to Wicket and Vaadin. I have used both frameworks and I love them both. however I need to make a choice.

If If I choose Vaadin:

  1. I wont have to worry much about the look and feel. It comes with nice themes.
  2. I will do all my programming in Java which am very good at and wont have to spend time hacking CSS which am not very good at.
  3. And most of the components that I will need for a business applications are there OUT OF THE BOX including, desktop like layout, tooltips, Keyboard shortcuts, tables with draggable and collapsible columns to name a few.

However, if I go the Vaadin way:

  1. I will loose the ability to create UI declaratively.
  2. I wont have the fallback feature if the browser doesn't support JavaScript - e.g most non Webkit mobile browsers.
  3. Vaadin company is selling some components - e.g the JPAContainer so am not sure the company will be committed to offering full open-source framework. Business interests will always come first.
  4. Vaadin applications will be mostly for the intranet. They are not very suitable for the internet with a web look and feel.

If I go the Wicket way:

  1. I will have to style my applications and I can hardly give them a desktop look and feel.

Any advice? Anyone with experience on either framework kindly tell me the cons and pros and how you made your decision.

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

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

发布评论

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

评论(8

忆梦 2024-09-22 21:10:45

我想我已经为这两个框架投入了一些时间。我真的很喜欢两者,因为它们将类似 Swing 的编码引入到 Web 开发中。我不知道对我来说更容易的(虽然有点击,但我不喜欢速度模板)

是的,存在差异。

我不必太担心外观和感觉。它有很好的主题

确实有不错的主题,但每个认真的公司都会以不同的方式设计其应用程序(除非您正在制作原型)

我将使用我非常擅长的java进行所有编程,并且不必花时间破解不太擅长的css

然后Vaadin会“更好”。

我将失去以声明方式创建 UI 的能力。

这样做有什么好处呢? (顺便说一句:你可以用 groovy 编写声明性代码;-))

但是没关系。我知道你的意思:如果你能负担得起几个独立的设计师,那么 wicket 会“更好”。

我几乎无法给它们提供桌面外观和感觉。

为什么不呢?或者你在这里是什么意思? Wicket 支持 ajax,并且有一些组件支持很好的“类似桌面”的东西(ajaxlink、lazycomponent、自动完成、进度条、请参阅 wicket stuff + 扩展)。好吧,对于任何更复杂的组件,您都必须使用 javascript 进行编码,但是顺便说一句,您是否知道您甚至可以 在 wicket 中使用 GWT

一些小经验:

Vaadin 在编码时肯定更快(没有 css、html 的东西)。但是,如果您进行生产,请记住,编程的简便性可能会影响客户端的性能成本:例如,如果您使用“错误”的布局(例如 Horizo​​ntal/VerticalLayout),...大量使用 javascript 可能会减慢速度关闭旧浏览器。

但瓦丁并不慢!使用适当的布局,例如 CssLayout 或 FastLayout,旧的浏览器也可以使用它。 (尽管如果您使用 CssLayout,您的编码风格确实与 wicket 类似。)

Vaadin 的一个问题是分析起来有点困难,因为您不容易看到客户端需要所有 CPU 和嵌套 div 的位置获取神秘的 ID 名称。

Wicket 的一大优点是它的 warp persist 集成

(Guice 可以集成到 Vaadin 和 Wicket 中)

使用 Vaadin 测试 UI 应该很容易(尽管我没有找到单元测试的东西),而且非常简单 与 wicket

最后但并非最不重要的一点是,与 wicket 相比,在 Vaadin 中创建列表/表格非常容易。

I think I've invested some time for both frameworks. I really like both because they bring the Swing-alike coding to web development. And I don't know easier ones for me (although there is click but I don't like the velocity templating thing)

And yes, there are differences.

I wont have to worry much about the look and feel.It comes with nice themes

true, but every serious company will style its app differently (unless you are prototyping)

I will do all my programming in java which am very good at and wont have to spend time hacking css which am not very good at

Then Vaadin would be 'better'.

i will loose the ability to create UI declaratively.

What are the advantages of that? (BTW: you could code declarative in groovy ;-))

But ok. I know what you mean: if you can afford a few separate designers then wicket is 'better'.

i can hardly give them a desktop look and feel.

Why not? Or what do you mean here? Wicket supports ajax and there are components which supports nice 'desktop-alike' things (ajaxlink, lazycomponent, autocompletion, progressbar, see wicket stuff + extensions). ok, for any more complex component you'll have to code in javascript BUT BTW did you know that you could even use GWT within wicket

Some minor experiences:

Vaadin is surely faster while coding (no css, html stuff). But if you go production keep in mind that the ease of programming can come to the cost of performance on the client side: e.g. if you use the 'wrong' layouts such as Horizontal/VerticalLayout, ... the massive use of javascript could slow down old browser.

But Vaadin is not slow! Use appropriate layouts such as CssLayout or FastLayout and also old browser can serve it. (Although if you would use CssLayout your coding-style is really wicket-alike.)

One issue with Vaadin is that it is a bit harder to profile, because you don't see easily where the client needs all the CPU and the nested divs gets cryptic id-names.

One great thing about Wicket is its warp persist integration

(Guice can be integrated in Vaadin and Wicket)

Testing the UI should be easy with Vaadin (although I didn't found unit testing stuff) and is very easy with wicket.

Last but not least creating lists/tables is VERY easy in Vaadin compared to wicket.

≈。彩虹 2024-09-22 21:10:45

我与 Wicket 进行了广泛的合作,但我没有与 Vaadin 合作过,所以这可能(有点)有偏见。

我推荐 Wicket 的原因显而易见,但您可能感兴趣的是 Wicket 的开放性。正如 Gweebz 正确指出的那样,Wicket 使用基本的 HTML 标记作为其基础,因此任何结构或外观上的更改通常都很容易实现。

就我个人而言,我真正喜欢检票口工作的事情之一是前端演示和数据后端之间的流程,我们已经实现了 Spring 和 Spring 。 JPA/Hibernate,这意味着借助基于 Wickets 模型的架构,前端的任何更改都可以通过一行代码转换回数据库。

再次强调,对于 Vaadin 从未使用过它,我不能说太多,但如果您正在寻找开始的架构,我还建议您看看 GWT。

I've worked extensively with Wicket but I've not had any experience with Vaadin so this might be (a little) biased.

I'd recommend Wicket for obvious reasons, but what's probably of interest to you is Wickets openness. As Gweebz rightly pointed out, Wicket uses basic HTML markup as its foundation, so any structural or cosmetic changes are often trivial to implement.

Personally one of the things I really enjoy about out wicket work is the flow between front end presentation and the data backend, we've implemented Spring & JPA/Hibernate which means that any changes in the front end can be translated back into the data base with a single line of code thanks to Wickets model based architecture.

Again I can't say much for Vaadin having never worked with it, but if you're looking for architectures to start off with, I'd also recommend you have a look at GWT.

夜灵血窟げ 2024-09-22 21:10:45

(接第一个 Wicket 相关答案中的评论)

Vaadin 和 Wicket 之间的主要区别在于 UI 组合和客户端代码的编写方式。使用 Vaadin,您通常无需任何模板或 HTML 即可编写 UI,并且可以立即获得时尚、完全 Ajax 的 UI。但是,如果您更喜欢模板方法,只需使用 CustomLayout 即可。

很少需要客户端编码,但当需要时,您可以使用基于 Java 的 GWT 来完成,在我看来,这比手动编写 Javascript 好得多。此外,使用 GWT,您可以自动获得跨浏览器兼容的解决方案,而不必自己处理这些问题。

在比较框架时,您还应该查看社区活动和文档。 Vaadin 的这两点都非常出色。另请注意 Vaadin 目录,其中当前包含 100 多个非常有用的 UI 组件和其他插件。

(continued from the comment in the first Wicket-related answer)

The major difference between Vaadin and Wicket is with how UI composition and client side code is written. With Vaadin you usually compose your UI without any templates or HTML at all and you get a sleek, fully Ajax'ed UI out of the box. However, if you prefer the templating approach just use CustomLayout which does exactly that.

Client side coding is rarely needed, but when it is you do it with the Java-based GWT which is IMO a lot more nicer than writing Javascript by hand. Besides, with GWT you automatically get cross-browser compliant solution instead of having to deal with those issues yourself.

When comparing frameworks you also should take a look at community activity and documentation. With Vaadin both of those are excellent. Also note the Vaadin Directory which currently contains 100+ very useful UI components and other addons.

零度℉ 2024-09-22 21:10:45

我对每种产品的经验都有限,但我更喜欢 Vaadin。它让我对正在开发的 Web 应用程序有了更丰富的体验。不过,给我们带来的主要好处是围绕 UI 类编写单元测试是多么容易,确保组件在以预期方式交互时正常运行。这对于 Wicket 也是可能的,但根据我的经验,这更困难。

我还将提到,任一框架都需要一些样式。 Wicket 以普通的旧 HTML 开始,而 Vaadin 默认以类似 MacOSX 的主题开始,但几乎您编写的任何 Web 应用程序都需要至少进行一些自定义。考虑到这一点,自定义 Wicket 应用程序的 CSS 比 Vaadin 容易得多,原因很简单,您可以控制标记。 Vaadin 向您隐藏标记并生成具有奇怪 ID 和结构的元素,因此很难自定义外观。做出决定时请记住这一点。

I have a limited amount of experience with each but I prefer Vaadin. It allowed a richer experience with the web application I was developing. The main benefit that sold us though was how easy it was to write unit tests around our UI classes, ensuring the components functioned correctly when interacted with in the expected ways. This is also possible with Wicket however it was more difficult in my experience.

I will also mention that either framework will require some styling. Wicket starts off as plain old HTML and Vaadin starts off with a MacOSX-like theme by default but almost any web-app you write will require at least SOME customization. With this in mind, customizing the CSS of a Wicket app is SIGNIFICANTLY easier than Vaadin for the simple reason that you control the markup. Vaadin hides the markup from you and generates elements with weird IDs and structures so it is harder to customize the look. Just remember this when making your decision.

篱下浅笙歌 2024-09-22 21:10:45

我目前在 Wicket 工作,并在 Vaadin 工作过。我的观察很简短:

  • 瓦丁有权获得自由,但在我看来,并不是那么美丽。如果您需要支持、帮助、文档来解决您遇到的痛苦和棘手的问题,那么您就完蛋了,因为与 Apache Wicket 相比,您没有那么好的文档/社区。 Vaadin 有人帮助你,但你必须付费。
  • 要在检票口编程,您需要成为一名强大的程序员。 Vaadin 还需要良好的 Java 知识,但如果您愿意,您可以轻松地编写一些意大利面条代码(只是说,不做......);
  • Apache Wicket 真正将 Web 技术(Javascript、HTML 等)与框架技术(Java)分开。 Vaadin 也尝试这样做,但 IMO 对此并不那么优雅和透明。

除此之外,我们正在讨论两种不同类型的框架,两种不同的方法,它们各有利弊,我建议您搜索和比较,看看什么真正适合您的需求。

编辑:哦,关于外观和感觉,例如你总是有 Wicket Bootstrap

I am currently working with Wicket and I have worked in the pass with Vaadin. I wil be short in my observations:

  • Vaadin is entitled to be free but IMO, is not so beautiful like that. If you need support, help, documentation for that painful and tricky problems that you encounter, then you are screwed because you do not have so good documentation/community when compared with Apache Wicket. Vaadin have guys to help you, but you have to pay for it.;
  • To program in wicket you need to be a strong programmer. Vaadin also requires good Java knowledge but you can easily do some spaghetti code if you want (just saying, not doing..);
  • Apache Wicket really separate the web technologies (Javascript, HTML, etc.) from the framework technology (Java). Vaadin also try to do it, but IMO is not so elegant and transparent on that.

Appart from that, we are talking about two different types of frameworks, two different approach, which have pros and cons that I advice you to search and compare and see what really fits your needs.

Edit: Oh, and about the look and feel, for instance you always have Wicket Bootstrap

丢了幸福的猪 2024-09-22 21:10:45

另请注意,尽管 Vaadin 基础框架是免费的,但对于某些附加功能,您可能需要购买扩展。

例如 - 如果您需要集成一个好的图表解决方案,例如 Highcharts,您必须付费购买 vaadin 图表扩展(尽管 highcharts 可免费用于 FOSS 应用程序,但基于其构建的 vaadin 图表插件并不是免费提供的)自由软件应用程序)。

Also do notice that even though Vaadin base framework is free, for some additional functionality you might need to buy extensions.

Ex - If you need to integrate a good charting solution such as Highcharts, you'd have to pay and buy the vaadin charts extension (even though highcharts is available free for FOSS apps, the vaadin charts plugin built on that is not given free for FOSS apps).

趴在窗边数星星i 2024-09-22 21:10:45

谢谢你的提问。
答案很简短

Vaadin 对于需要开发 Web 应用程序的 Java 开发人员来说是一个很棒的工具,但如果您具有一定的 javascript 知识和一些基本的 css 技能,那么它就是一个强大的 WAR Machine。

Vaadin 并不慢,甚至比 React 和 Angular 还要快。
如果您的应用程序速度很慢,那是因为您设计错误,对于您使用的任何框架都是如此。
请记住这一点,Vaadin 使用 Web 组件,因此大部分 UI 都是在客户端上构建的,在服务器上没有大量渲染

在您的情况下,您说您没有 css 知识,有两个选择:
使用 Vaadin,或雇用前端开发人员。

我从事 Web 开发人员已有 10 多年,我是从 php 开发人员和 javascript 开发人员开始的。
我可以告诉你,一旦我进入了Vaadin,我就无法再发展其他的方式了。

Thank you for your question.
The answer is short and simple

Vaadin is a great tool for java developers who needs to develop web apps, but it is a powerful WAR Machine if you have moderate javascript knowledge, and some basic css skils.

Vaadin is not slow, it is even faster than React and Angular.
If your app is slow, it's because you designed it wrong, and that's true to any framework you use.
Keep in mind this, Vaadin uses web components, so most of the UI is built on the client, no heavy rendering on the server

In your case you said you don't have css knowledge, two options:
Use Vaadin, or hire frontend developer.

I am a web developer for more than 10 years, and I have started as a php developer and a javascript developer.
I can tell you that once I've got into Vaadin, I can not develop another way.

时光匆匆的小流年 2024-09-22 21:10:45

选择什么主要取决于业务需求(请参阅问题的第 2 点和第 4 点)

但是,如果我走 Vaadin 的路:

我将失去以声明方式创建 UI 的能力。

您可以尝试使用 ZK 框架 - 类似于具有声明式的 Vaadin XML 中的用户界面

What to choose depends primarily on the business requirements (see points 2 and 4 of your question)

However, if I go the Vaadin way:

I will loose the ability to create UI declaratively.

You can try using the ZK framework - similar to Vaadin with a declarative user interface in XML

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