Vaadin的与引导 [英] Vaadin vs. Bootstrap

查看:114
本文介绍了Vaadin的与引导的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的规划,使这一具有复杂的形式,并在客户端逻辑验证视图的应用程序。我打算使用AJAX的提交并有一定的视觉吸引力。

I am planning to make an application that has views with complex forms and logical validation on the client side. I plan to use AJAX for submits and have some visual appeal.

我想从那些谁拥有的经验,引导和/或CoffeeScript的和Vaadin的发展提出建议。我有两个选择:

I want a recommendation from those who have experience developing with Bootstrap and/or CoffeeScript and Vaadin. I have two options:

  • 使用引导/ CoffeeScript的一些架构服务器站点,如播放框架,导轨或Django的
  • Vaadin的

这与我相关的标准涉及到可能出现的客户端的JavaScript和/或HTML5的验证,以及在CSS和HTML code使用引导要写入的并发症。是否值得在实际的RIA应用程序中使用的CoffeeScript了Vaadin的?我看到有很多谁选择了引导,我敢肯定,他们有他们的理由。

The criterion that concerns me is related to the complications that may arise in the client side JavaScript and/or HTML5 validation as well as in CSS and HTML code to be written using Bootstrap. Is it worth using CoffeeScript over Vaadin in a practically ria app? I see that there are many who have chosen Bootstrap and I'm sure they have their reasons.

帮助我的决定。一些相关文件可能是有帮助的,太。

Help me with the decision. Some relevant documentation could be helpful, too.

推荐答案

Vaadin的在建筑通过普通的网页浏览器开发的纯Java并交付交互式桌面风格的Web应用程序的一个令人惊讶的好工具。

Vaadin

Vaadin in an amazingly good tool for building interactive desktop-style web apps developed in pure Java and delivered via regular web browsers.

Vaadin的 6安培; 7应用程序在服务器端运行完全。

Vaadin 6 & 7 apps run entirely on the server-side. The JavaScript library automatically installed by Vaadin into the user’s browser window simply:

  • 在绘制屏幕上的任何服务器端应用程序告诉它。
  • 订阅用户操作(点击,打字等)回服务器的应用程序,以考虑并作出回应。

因此​​,有或HTML5验证没有在客户端逻辑验证,至少不是从来看Vaadin的应用程序开发者的角度。该Vaadin的框架可在最盖在其内部实现这样做,但就是没有我的问题,因为一个Vaadin的应用程序开发者。这是Vaadin的核心利益:我不在乎Vaadin的是如何得到我的形式到用户的屏幕上。作为一个Vaadin的应用开发者,我不写任何JavaScript,HTML,DOM,CSS,AJAX或。只是纯Java。

So there is no "logical validation on the client side" or "html5 validation", at least not from the Vaadin app developer’s point of view. The Vaadin framework may do so under-the-covers in its internal implementation, but that is none of my concern as a Vaadin app developer. That’s the core benefit of Vaadin: I don't care how Vaadin gets my forms onto the user’s screen. As a Vaadin app developer, I am not writing any JavaScript, HTML, DOM, CSS, or AJAX. Just pure Java.

风格类似于摇摆:实例化的布局(形式),增加的标签,添加的按钮,增加领域中,加入< A HREF =htt​​ps://vaadin.com/demo相对=nofollow>其他部件的。附加需要验证器。巢额外的布局,对于复杂的形式。所有这一切都在内存中的服务器端执行,所有的纯Java。终于说出了布局,以显示自己。噗,像变魔术一样,Vaadin的告诉浏览器显示的形式相似。

The style is similar to Swing: Instantiate a layout (a form), add labels, add buttons, add fields, add other widgets. Attach validators as needed. Nest additional layouts, for complicated forms. All of that executes in memory on the server-side, all in pure Java. Finally tell the layout to show itself. Poof, like magic, Vaadin tells the browser to display a likeness of that form.

如果你想开发这事发生在通过网络浏览器来部署桌面式的经营风格的应用程序,Vaadin是一个奇妙的工具。

If you want to develop desktop-style business-style apps that happen to be deployed through a web browser, Vaadin is a wonderful tool.

权衡包括:

  • 大量的内存和CPU使用率在服务器端。
  • 在放弃控制权,HTML / CSS / JavaScript的。

您的Web应用程序所居住的服务器,而不是在客户端上。你所有的业务逻辑,用户输入的数据,对所有用户的形式,如表中的行项目的内部重新presentation,这一切都住在服务器上。将其乘以用户数。这意味着一个Vaadin的应用程序可能需要很多内存和CPU的使用情况。

Your web app lives on the server, not the client. All your business logic, the users’ entered data, the internal representation of all the users’s forms such as row items in a table, all this lives on the server. Multiply that by number of users. This means a Vaadin app can demand much memory and CPU usage.

这可能会限制扩大。但考虑到64位Java,存储器的多个演出,并在连最低级​​的机器多核如 Mac mini上,扩大规模的可能是一个问题,只为应用程序的最大/最繁忙的。

That may limit scaling up. But given 64-bit Java, multiple gigs of memory, and multiple cores on even the lowliest of machines such as a Mac mini, scaling-up is likely an issue only for the largest/busiest of apps.

而即使在大/繁忙应用这些罕见有可能的方式来处理结垢Vaadin的。所有应用程序的住在一个Servlet会话。有些网络基础架构允许这样的会话状态的服务器之间移动,甚至持续到存储被拾起由其他服务器。

And even in those rarer of large/busy app there may be ways to handle scaling in Vaadin. All of the app lives in a Servlet Session. Some web infrastructure allows such session state to be moved between servers or even persisted out to storage to be picked up by other servers.

或者你的应用程序可以很好地扩展。模拟11000并发客户端已经完成。参见:

Or your app may scale well. Simulations with 11,000 simultaneous clients have been done. See:

  • Vaadin Scalability Study - QuickTickets (company blog post)
  • Scaling with Vaadin and WildFly Webinar with Arun Gupta (video presentation, YouTube)

如果你的团队更舒适,或与传统的Web应用程序架构经历,然后Vaadin的可能不适合你。在Vaadin的你写你的应用程序完全是纯Java和Vaadin的转换,为HTML,CSS和JavaScript自动的。

If your team is more comfortable or experienced with conventional web app architectures, then Vaadin may not be for you. In Vaadin you write your app entirely in pure Java, and Vaadin translates that to HTML, CSS, and JavaScript automagically.

您可以调整的CSS位。即使不接触CSS的不同,Vaadin的主题( Valo的,的驯鹿)给你多少地控制颜色,大小和字体,如果你想覆盖默认值。但是要知道,Vaadin的是在驾驶员的座位生成HTML和放大器; CSS;你是谁允许一个小一点的只是乘客后座驾驶。

You can tweak the CSS a bit. And even without touching CSS, Vaadin’s "themes" (Valo, Reindeer) give you much control over colors, sizes, and fonts if you wish to override the defaults. But know that Vaadin is in the "driver’s seat" in generating the HTML & CSS; you are just passenger who is allowed a small bit of "backseat-driving".

如果你的目标是什么比开发桌面风格的应用程序,如果你的希望其他的完全控制的HTML / CSS的,然后Vaadin的可能不适合你。

If your goal is something other than developing desktop-style apps, if you want to take full control of the HTML/CSS, then Vaadin may not be for you.

更新

Vaadin的7已被释放。

Vaadin 7 has been released.

虽然大致相同的架构Vaadin的6,7比以往任何时候都好。请参阅:新增

While largely the same architecture as Vaadin 6, 7 is better than ever. See: What's New.

这篇关于Vaadin的与引导的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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