我应该使用Vaadin框架吗? [英] Should I use Vaadin Framework

查看:193
本文介绍了我应该使用Vaadin框架吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是试着玩 Vaadin Framework ,在我看来,它很容易使用。另外我喜欢他的框架的是,它建立在 Google Web Toolkit(GWT)之上。



你认为,我应该继续使用这个框架,还是坚持使用GWT更好?

解决方案

嘿。作为一个免责声明,我为该公司开发Vaadin工作。



Vaadin使用GWT的方式是它有一组预编译在GWT中的组件。当然,如果您愿意,您还可以制作自己的组件。但是,这套组件是相当完整的,并且通常可以根据您自己的需要进行定制。这意味着每次更改应用程序时,都不必将代码从Java重新编译为JavaScript。您只需将已有的组件组合在一起即可。

这个框架是服务器驱动的,所以所有的逻辑都在服务器端处理。组件有两部分,客户端和服务器文件。客户端只是组件的虚拟视图。一旦你与它交互,它就会向服务器发送一条消息,表明这个或那个被按下/写入/等等。服务器然后决定应该做什么。这是为了提高安全性,因为您不能破解逻辑,因为在JavaScript中只有一个用于发送请求的小API。在某些情况下,这可能与应用程序的速度有一定的折衷,但我认为它并不那么糟糕。最糟糕的速度颠簸通常是数据库查询往返等,这与UI框架的选择没有任何关系。建议的演示过慢可能是因为你远离服务器,或者目前用户数量很高。在自己的环境中尝试一下,关闭应用程序的最终应用程序,看看它的表现如何。有一些准备好的应用程序,你可以部署来测试它。



我猜这个选择归结为你想要做的事情。 Vaadin适用于Web应用程序,因为您可以构建普通的Java应用程序并轻松地为其创建动态Web UI。如果您做的更像传统网站,用户只能浏览网页 - 而不是积极地与网页互动,那么Vaadin并不是最好的选择。去一些其他免费的框架,如rails或php框架等。我认为你更多地在做一个应用程序,因为你建议你现在在使用GWT,所以Vaadin应该很好。



提出更多的问题,在这里,在Vaadin论坛或#vaadin @freenode的IRC频道,也许有人可以给你更多的理由为什么或为什么不使用Vaadin。


I just tried to play with Vaadin Framework and it seems to me very easy to use. Plus what I like about his framework is that it is built on top of Google Web Toolkit (GWT).

What do you think, should I continue using this framework or it's better to stick with GWT?

解决方案

Hey. As a disclaimer, I work for the company developing Vaadin.

Vaadin uses GWT in a way that it has a set of components precompiled in GWT. You can, of course, additionally make your own components if you so want to. However, the set of components is quite complete, and can often be customized for your own need. This means that you don't have to recompile your code from Java to JavaScript every time you change your application. You just combine the already available components together.

The framework is server driven, so all logic is handled on the server side. The components has two parts, client and server file. The client side is just a dummy "view" for the component. Once you interact with it, it sends a message to the server that this or that was pressed/written/etc. The server then decides what should be done. This is for increased security, because you can't "hack" the logic as only a small API meant for sending requests is available in the javascript. This may be in some cases a little trade-off with speed of the application, but I don't think it is a so bad. Worst speed bumps are usually db query round-trips and such, which doesn't have anything to do with the choice of the UI framework. Sluggishness of the demos as suggested can be because you're far from the server or there is a high user hit at the moment. Try it in an own environment, close the the final application of your application, to see how well it performs. There are some ready application that you can just deploy to test it out.

I guess the choice boils down to what you are trying to do. Vaadin is good for web applications, as you can build a normal Java application and do the dynamic web UI for it easily. If your doing something more of a traditional web site, where users only views the page - more than actively interacts with it, then Vaadin is not the best way to go. Go with some other free frameworks like rails or a php framework etc. I think that you're more doing an application as you're suggesting that you are using GWT now, so Vaadin should be good.

Ask more questions, here, on the Vaadin forums or at the irc channel #vaadin @freenode and maybe someone can give you more reason to why or why not use Vaadin.

这篇关于我应该使用Vaadin框架吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆