使用 Ext JS/Dojo 和 Ext JS/Dojo 开发基于 Web 的应用程序是否更高效?等与 HTML/JQuery 相比

发布于 2025-01-02 12:24:59 字数 613 浏览 3 评论 0原文

服务器端已经设置得差不多了,基本上就是 struts 2 / 弹簧安全 / jpa。

现在我必须决定如何处理客户端(浏览器)。客户端代码库应该是可维护的,并且应该适合自动回归测试。

举个例子,我需要一个具有

  • 可排序/可分页列
  • 等属性的表格组件,对行和列进行重新排序(通过拖放),
  • 表格单元格的内联编辑
  • 会记住客户重新访问页面时的状态,
  • 可以轻松地与 struts 2

集成据我了解,有 4 个替代方案

  1. DIY 使用老式 HTML + JQuery + Ajax
  2. 找到一个 JQuery 插件来完成所有这一切或
  3. 将不同的插件放在一起(例如 Flexigrid + 用于拖放的附加插件)
  4. 使用 JS 工具包

我应该坚持使用 JQuery 吗?或者我应该选择成熟的 JS 工具包?我对 JQuery 和 JS 工具包的经验很少(我不是 Web 开发人员)。

感谢您帮助服务​​器端程序员穿越 Web-UI 编程的混乱世界;)

The server side is pretty much set up, it's basically
struts 2 / spring security / jpa.

Now I have to decide what to do with the client side (the browser). The client side codebase should be maintainable and should lend itself to automatic regression testing.

So as an example lets say I need a table component having properties such as

  • sortable/pageable columns
  • reordering of rows and columns (via drag & drop)
  • inline editing of table cells
  • remembers state when customer re-visits page
  • integrates easily with struts 2

As far as I understand things there're 4 alternatives

  1. DIY using oldschool HTML + JQuery + Ajax
  2. Finding a JQuery plugin that does all this or
  3. plumb together different plug-ins (like Flexigrid + additional plug-in for drag & drop)
  4. Using a JS toolkit

Should I stick with JQuery? Or should I go for fullblown JS toolkits? I have little experience with JQuery and JS toolkits (I'm not a web developer).

Thank you for helping a serverside programmer cross the messy world of web-ui-programmming ;)

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

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

发布评论

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

评论(4

趁年轻赶紧闹 2025-01-09 12:24:59

我的经验是,如果您有一个大型应用程序将受益于构建系统、类系统、小部件系统和集成小部件库,那么 Dojo 对大型编程的支持非常好。当然,它还带来了所有标准的东西,例如跨浏览器支持和事件系统。

如果您只需要一些小部件和动画,那么任何库都可以使用。我会坚持选择您/您的团队最了解的人。 jQuery 无疑拥有最多的具备该技能的人。

My experience is that Dojo's support for programming-in-the-large is great if you have a large-scale app that will benefit from the build system, class system, widgeting system and integrated widgeting library. It also of course brings all the standard stuff with it, like cross-browser support and event system.

If you just need some widgets and animations then any library will work. I'd stick with the one you/your team knows best. jQuery definitely has the greatest number of people with that skillset.

遥远的她 2025-01-09 12:24:59

我们的团队浪费了 6 个月的时间试图通过 JQuery/UI 为客户提供他们想要的东西,然后我们切换到 ExtJS 4,2 个月后客户很满意。这是一个拥有 50 多个模型的应用程序。

JQuery/UI 不是为 Web 应用程序设计的。它是为网站设计的。当然,它有一些很好的插件,但是您将花费无数的时间来学习它们的 API 并在它们之间切换您的思维过程。 JQuery/UI 缺少​​以下内容:

  • 图形设计器(参见 Sencha Designer 2),即图形布局 GUI 程序
  • 复杂的布局(在 ext 中,您可以通过一种设置将容器的布局切换为手风琴、选项卡、向导、锚点)
  • 网格( ext grid 支持分页、排序、过滤、分组、摘要、开箱即用的编辑)
  • 真正的组合框
  • 模型视图控制器系统
  • 模板
  • 良好的 html 编辑器控制
  • 一大堆其他东西

帮自己一个忙,把钱花在ext,并为自己节省无数时间。

关于你提到的网格,ext 远远优于其他任何人。您可以按照大约 20 行格式良好的代码列出的内容进行操作。我不是在开玩笑。

关于客户端单元测试,请使用 jasmine 和 ext.

Our team wasted 6 months trying to give the client what they wanted with JQuery/UI, and we switched to ExtJS 4, and the client is happy after 2 months. This is an app with 50+ models.

JQuery/UI is NOT designed for web applications. It is designed for web SITES. Sure, it has some good plugins, but you'll spend countless hours learning their apis and switching your thought process between them all. JQuery/UI lacks the following:

  • a graphical designer (see Sencha Designer 2), ie graphical layout GUI program
  • complicated layouts (in ext you can switch a layout of a container to accordion, tabs, wizard, anchors with one setting)
  • a grid (ext grid supports paging, sorting, filtering, grouping, summaries, editing out of the box)
  • real comboboxes
  • a model view controller system
  • templating
  • good html editor control
  • a whole ton of other stuff

do yourself a favour and spend the money on ext, and save yourself countless hours.

regarding the grid you mentioned, ext's is far superior to anyone else's. you can do what you listed in about 20 nicely-formatted lines. i am not kidding.

regarding client-side unit testing, use jasmine with ext.

请持续率性 2025-01-09 12:24:59

简短的回答是肯定的。像 Ext.js 这样的框架会处理大量代码,如果您要从头开始编写所有内容,那么这些代码最终将由您自己编写。这些框架负责模型、事件、视图、与服务器/API 的通信等。

The short answer is yes. Frameworks like Ext.js take care of a whole lot code that you would end up writing yourself if you were to write everything from scratch. These frameworks take care of models, events, views, communication with servers/APIs, etc.

情何以堪。 2025-01-09 12:24:59

这实际上不是一个可以回答的问题。这一切都取决于。

ExtJS 非常适合非常具体的事情。如果您想要那些非常具体的东西,这可能是您最有效的选择。

如果 jQuery UI 满足您的需求,那么这就是您的答案。

如果您有 jQuery 开发人员,也许坚持使用 jQuery。

如果您有 ExtJS 人员,请考虑 ExtJS

等。

This isn't really an answerable question. It all depends.

ExtJS is great for very specific things. If you want those very specific things, it's likely the most efficient option for you.

If jQuery UI meets your needs, then that's your answer.

If you have jQuery dev's, maybe stick with jQuery.

If you have ExtJS folks, consider ExtJS

etc, etc.

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