简体   繁体   English

使用Web技术创建桌面应用程序

[英]Using web technologies to create desktop applications

Recently, the pace at which web browsers improved and implemented new technologies (eg HTML5) seemed to have accellerated considerably. 最近,Web浏览器改进和实现新技术(例如HTML5)的速度似乎已经大大加快。 At the same time, the tools for developing web applications, like eg jQuery, or the myriads of web frameworks have also made web development much easier. 与此同时,用于开发Web应用程序的工具(例如jQuery)或无数的Web框架也使Web开发变得更加容易。

Are we now at a point were it makes sense to develop a pure single-user desktop application using web technologies? 我们现在是否有必要使用Web技术开发纯粹的单用户桌面应用程序? Assuming we can just install the latest browser together with our application, we don't have to worry about compatibility with older browsers. 假设我们可以将最新的浏览器与我们的应用程序一起安装,我们不必担心与旧版浏览器的兼容性。

IMHO web based applications are the future. 恕我直言网络应用程序是未来。 Currently there are applications that will take a very long time to get onto the web, like adobe products. 目前,有些应用需要很长时间才能上网,比如adobe产品。 The web will still need to advance a lot more before we get to that point. 在我们达到这一点之前,网络仍然需要更多的进步。

Web browsers sill are behind the times and there is far too much browser share going to the browsers the don't support (or poorly support) such features as HTML5, CSS3, etc. Web浏览器的时间落后于时代,浏览器共享的浏览器份额太多,不支持(或不支持)HTML5,CSS3等功能。

Cloud technologies are the way to go if you don't mind dealing with cross browser headaches. 如果您不介意处理跨浏览器的麻烦,云技术是可行的方法。 The best advantages to a client with cloud apps is that they can access it anywhere without downloading a thing. 云应用程序客户端的最大优势是,他们可以在任何地方访问它而无需下载任何东西。

But if you are referring to have a web based technology downloaded to the users desktop then you can use adobe air :) 但如果您指的是将基于Web的技术下载到用户桌面,那么您可以使用adobe air :)

I personally do everything with web technolgy that I prevously would have done in a desktop application. 我个人在网络技术方面做的一切都是我在桌面应用程序中所做的。 The javascript frameworks take a lot of pain out of browser differences. 浏览器差异带来了很多痛苦。 It definately the way to go for internal applications. 它绝对是内部应用程序的方式。 The possible problem with outward facing applications is that you have to assume that people have not turned javascript off. 外向应用程序可能存在的问题是你必须假设人们没有关闭javascript。

Edit: 编辑:

If you're looking to actually develop desktop applications using web technology like javascript etc the adobe air might be the way to go 如果您希望使用javascript等网络技术实际开发桌面应用程序,那么adobe air可能就是您的选择

No. And that is not a point one can get to , as such. 不,这不是一个人可以达到的目标 Web applications will always be more limited than desktop applications, for the reasons of security and privacy alone, not to mention cross-platform sensibility, implementation quality and straight up visual and design requirements. 出于安全性和隐私的原因,Web应用程序将始终比桌面应用程序更受限制,更不用说跨平台的敏感性,实现质量以及直观的视觉和设计要求。

As such, unless your application can deal with some pretty severe limitations (zero chance of elevated privileges, likely limited access to the file system, if at all, no document exchange, speed limitations, limitations in computing power used,…), it simply isn't a realistic approach. 因此,除非您的应用程序可以处理一些非常严重的限制(提升权限的可能性为零,可能限制访问文件系统,如果有的话,没有文档交换,速度限制,使用计算能力的限制,......),它只是不是一个现实的方法。

Edit: 编辑:

By means of clarification to the "visual and design requirements" bit: Users generally expect a certain look and feel with their desktop applications, conforming to this look and feel over multiple platforms is an absolute pain; 通过澄清“视觉和设计要求”一点:用户通常希望他们的桌面应用程序具有一定的外观和感觉,在多个平台上符合这种外观是一种绝对的痛苦; because everything has different sizes no matter where you go. 因为无论你去哪里,一切都有不同的大小。 If your not planning on supporting multiple platforms anyway, then what is the point in the first place? 如果您还没有计划支持多个平台,那么首先有什么意义呢?

In other words, you end up in a situation where you can use 90% of development time maintaining style sheets that make it look sane on each platform; 换句话说,最终你可以使用90%的开发时间来维护样式表,使每个平台看起来都很清晰; or make it ugly on all platforms (ref: Java ) 或者在所有平台上使它变丑(参考:Java)

Yes, we are now at that point where it can be done, except for the always problematic IE. 是的,我们现在正处于可以完成的阶段,除了总是有问题的IE。 This has been possible for quite some time in Firefox with XUL and Prism. 在使用XUL和Prism的Firefox中已经有一段时间了。 I have seen a couple of applications showing the capabilities you speak of. 我看过几个应用程序展示了你所说的功能。 They worked in all the modern browsers. 他们在所有现代浏览器中工作。 Of course, none of them can work in IE. 当然,他们都不能在IE中工作。 IE always holds back the web. IE总是阻止网络。

No - there are three specific experiences that you can offer the user, and there's reasons in many apps not to muddle them up 不 - 您可以为用户提供三种特定的体验,并且许多应用程序的理由不会混淆它们

Lightweight - pure web, client just needs to be able to run a browser - this can be further broken down into mobile clients, clients running in challenged environments (low cpu, low bandwidth,etc) 轻量级 - 纯网络,客户端只需要能够运行浏览器 - 这可以进一步细分为移动客户端,在受挑战的环境中运行的客户端(低CPU,低带宽等)

Rich Internet Applications - Much heavier weight web applications - not so much traditional asp.net anymore (I hope) because the apps beat the hell out of the comms channel (viewstate) and the host server (often postbacks cause scads of code to run on the server just for 3 lines of 'real' functionality) - I'd propose jQuery for it's wide playing field, Silverlight for the more limited playground but the undeniably rich experience, and wonder when the promises of HTML 5 will really be in the market 丰富的互联网应用程序 - 更重的Web应用程序 - 不再是传统的asp.net(我希望),因为应用程序击败了通信渠道(viewstate)和主机服务器(通常回发导致大量代码运行在服务器仅用于3行'真实'功能) - 我建议jQuery用于它的广阔竞争环境,Silverlight用于更有限的游乐场,但无可否认的丰富经验,并且想知道什么时候HTML 5的承诺将真正进入市场

Thick Client Applications - custom code, access to the file system, 3D rendering, all the bits that really need local code with access to local resources 胖客户端应用程序 - 自定义代码,对文件系统的访问,3D渲染,真正需要本地代码以及访问本地资源的所有位

Now that that is said, the positive spin on your question relates to factoring your applications well - pay attention to the separation between your tiers, especially with respect to the separation between your presentation tier and the logic tiers it talks to - 既然如此,你问题上的积极旋转与你的应用程序的分解有关 - 注意你的层之间的分离,特别是关于你的表示层和它所讨论的逻辑层之间的分离 -

1) Use a global communications mechanism - errr, that means REST, cause anyone can speak it - all your clients can use it - SOAP isn't so globally usable 1)使用全局通信机制 - 错误,这意味着REST,因为任何人都可以说它 - 所有客户端都可以使用它 - SOAP不是全局可用的

2) Don't be monolithic, be service oriented - break your functionality up so specific bits can be accessed directly - this means its easy for jQuery and rich clients to easily access the bits they need when they need them - you want to be in the position that you don't care who/what the client is (for lightweight you, for all else them) you create the service once and everybody uses it in more or less the same fashion 2)不要单片,面向服务 - 打破你的功能,以便可以直接访问特定的位 - 这意味着jQuery和富客户端可以轻松地在需要时轻松访问他们需要的位 - 你想要在你不关心客户是谁/什么的位置(对于轻量级的你,对所有其他人来说)你创建服务一次,每个人都以大致相同的方式使用它

3) Make presentation unique for the different media/delivery types/ make services uniform - (that said, with rich clients it sometimes pays to offload service processing onto the client to spare your server and increase your scalability) 3)使演示文稿对于不同的媒体/交付类型/使服务统一是唯一的 - (也就是说,对于富客户端,有时需要将服务处理卸载到客户端以节省服务器并提高可扩展性)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM