RIA 的 ExtJS 与 Sencha Touch

发布于 2024-12-14 19:43:42 字数 615 浏览 1 评论 0原文

我正在尝试引导一个富互联网应用程序,它将有一个复杂的画布(想想:Visio),并且应该根据以下原则工作:

  • 它将在浏览器中运行
  • 它将在平板电脑(Android或其他)上运行
  • 支持复杂的绘图、拖动和drop 等
  • 自行运行(例如,没有服务器组件),
  • 可以愉快地利用传统的 &根据需要触摸 UI - 用户可以用鼠标或使用触摸屏画一条线

我正在考虑使用 Javascript 框架并找到了 ExtJS,我非常喜欢它的演示并检查 API 文档,它似乎支持我所有的低级 GUI 东西需要(想想:Ext.draw包,特别是Ext.draw.Sprite)。

但后来我还发现了 Sencha Touch,它似乎利用了相同的技术堆栈,但仅适用于移动设备。然而,据我所知,API 的限制要大得多(没有 Ext.draw 可用),并且只能在 Webkit 浏览器中运行。但它支持基于触摸的交互。

有没有办法创建一个可以在浏览器中运行但也可以“编译”为本机移动/平板电脑代码(例如使用 PhoneGap)的应用程序?或者这只是一个梦,两者目前无法融合?

附言。检查了其他类似的问题,但它们似乎已经过时了。

I'm trying to bootstrap a Rich Internet Application, which will have a complex canvas (think: Visio), and should work according to these principles:

  • it would run in a browser
  • it would run on a tablet (Android or other)
  • supports complex drawing, drag & drop etc.
  • runs on its own (eg. without a server component) happily
  • can leverage conventional & touch UI as needed - user can draw a line with a mouse or using the touchscreen

I was thinking about using a Javascript framework and found ExtJS, whose demos I quite like and checking the API docs it seems it supports all the low level GUI stuff I need (think: Ext.draw package, especially Ext.draw.Sprite).

But then I also found Sencha Touch, which seems to be leveraging the same technology stack, only for the mobile. However the API is much more limited (no Ext.draw available), and only runs in Webkit browsers, as far as I can understand. But it supports touch-based interaction.

Is there a way to create an app that works in a browser but can also be "compiled" to native mobile/tablet code (eg. with PhoneGap)? Or is this just a dream and these two cannot mix at the moment?

PS. checked the other similar questions but they seem to be quite out of date.

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

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

发布评论

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

评论(2

从来不烧饼 2024-12-21 19:43:42

简短回答:恐怕目前这只是一个梦想。

长答案: Sencha Touch 和 ExtJS 共享很多底层逻辑并且有些相似,但我想说,在尝试移植时,最多只能重用 50% 的代码一个对另一个。

jQuery Mobile 和 jQuery UI 目前存在类似的问题 - 它们都创建了漂亮的移动 UI 框架,但仅支持 webkit 浏览器,这意味着没有简单的方法来开发在桌面和移动平台上运行的丰富应用程序。希望这些项目能够在未来的某个时候合并它们的移动和桌面框架,以便我们能够创建可以跨移动和桌面部署的应用程序,而无需进行大规模重写。鼠标和触摸屏事件的工作方式总是存在差异,但我希望这是我们唯一需要考虑的事情。

Short answer: it is currently just a dream I'm afraid.

Long answer: Sencha Touch and ExtJS share a lot of underlying logic and are somewhat similar, but I would say you'd only be able to reuse 50% of your code, at most, when trying to port one to the other.

jQuery Mobile and jQuery UI share similar issues at the moment - they have both created nice mobile UI frameworks, which only support webkit browsers, meaning there's no easy way of developing rich apps that run in desktops and on mobile platforms. Hopefully these projects will merge their mobile and desktop frameworks at some point in the future to allow us to create apps that can be deployed across both without a massive rewrite. There will always be differences in the way mouse and touch screen events work but I wish that was the only thing we had to consider.

薔薇婲 2024-12-21 19:43:42

Extjs 适用于桌面应用程序,而 Sencha touch 和 Sencha touch 则适用于桌面应用程序。触摸图表适用于移动设备,例如。平板电脑或安卓系统。

@JunkMyFunk 是对的,你最多只能重用 50% 的代码。

Extjs 和 sencha touch 之间的类定义不一样,这意味着目前你不能将 Extjs 和 sencha touch 混合使用,如果这样做,命名空间会发生冲突。

Extjs is for desktop application, while Sencha touch & touch charts are for mobile, eg. tablet or Android.

@JunkMyFunk is right, you'd only be able to reuse 50% of your code at most.

The definition of class is not the same between Extjs and sencha touch which means currently you can't mix Extjs with sencha touch, the namespace will conflict if you do that way.

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