Web平台对GUI的影响

发布于 2024-09-17 08:14:10 字数 262 浏览 3 评论 0原文

基于 Web 的系统(仅限客户端 GUI)众所周知是独立于平台的,但是,它们也独立于开发平台吗? 据我所知,客户端 GUI 将始终使用所有操作系统和浏览器都支持的 HTML 和 JavaScript/VBScript 或 Java 等构建,以使其独立。我担心如果服务器端平台切换(例如从 ASP.NET 切换到 PHP 或 Java 或从 x 切换到 y),GUI 代码会发生变化? 如果它取决于 GUI 的设计/开发方式,那么不应该使用什么来使这种影响尽可能最小?

问候

阿蒂

Web based systems (Client Side GUI only) are known to be platform independent, But, are they development-platform independent too??
To the best i know, Client Side GUI will always be built using HTML and JavaScript/VBScript or Java or etc which are supported by all OSs and Browsers to make it independent. I am concerned about the change in GUI-code if the server side platform is switched e.g. from ASP.NET to PHP or Java or from x to y?
If it depends upon the way the GUI is designed/developed then What should not be used to make this impact as minimal as possible?

Regards

Atti

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

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

发布评论

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

评论(4

热风软妹 2024-09-24 08:14:11

您需要使用与平台无关的框架,或者自己用纯 html + javascript + css 编写视图。

与平台无关的框架将有助于将 UI 层或视图无缝部署到不同的操作系统上。
如果您还打算更改开发语言,您可能需要自己编写 html、javascript 和 css 来表达您的观点,因为据我所知,没有可以在不同语言上使用的流行框架。
大多数框架旨在与特定语言/运行时配合使用,并为您提供一定程度的抽象,隐藏血腥的 html、javascript 等细节,为您提供更自然的开发体验。
然后框架将代码转换为纯 html、javascript、css...
但如果你想要真正不可知的视图,你将不得不放弃这种抽象并自己编写 html。
这不是一件容易的事,不是因为 html 和 javascript 本身就很困难,而是因为跨浏览器兼容性很糟糕,而且你失去了经过良好测试的组件的好处。

在客户端,最终产品始终是独立于平台的,因为它只不过是所有操作系统都支持的 html、javascript 和 css

You would need to use frameworks that are platform agnostic or write your views in plain html + javascript + css yourself.

Platform agnostic frameworks would help to seamlessy deploy your UI layer, or views, onto different operating systems.
If you also plan to change the development language, you will probably have to write the html, javascript and css for your views yourself because to my knowledge there are no popular frameworks that can be used on different languages.
Most frameworks are designed to work with a specific language/runtime and provide you with a level of abstraction that hides the gory html, javascript, ... details for you for a more natural development experience.
The code is then transformed by the framework into pure html, javascript, css, ...
But in case you want truly agnostic views, you will have to give up that abstraction and write the html yourself.
Not an easy task, not because of the fact that html and javascript are difficult per se, but cross browser compatibility is a bitch, plus you lose the benefit of well tested components.

The end product, on the client side, is always platform independent because it is nothing more then html, javascript and css, which is supported by all operating systems

何处潇湘 2024-09-24 08:14:11

如果客户端 GUI 是用 JavaScript 编写的,并且使用 ajax 和 json 进行所有通信,那么只要它提供相同的 api,您就可以更换您想要的任何后端。

它还取决于您如何构建网站。例如,如果您使用的是基于 java 的 html 小部件,则很难用冷聚变等等效物替换。

但更改后端通常是徒劳的,因为您并没有真正为最终用户提供任何不同的东西。通常是过于热心的程序员无缘无故地想要重写后端。不要那样做。

If the client GUI is written in JavaScript and does all communication with ajax and json, you can swap out whatever back end you want as long as it provides the same api.

It also depends on how you build the site. If you are using, for example, java based html widgets, it will be harder to replace with the equivalent in say cold fusion.

But changing the back end is usually an exercise in futility since you aren't really giving the end users anything different. Often it's overzealous programmers that want to rewrite the back-end for no good reason. Don't do that.

青芜 2024-09-24 08:14:11

通常,HTML 应用程序的服务器端不应影响客户端。这意味着,如果您坚持在客户端仅使用 JavaScript 组件,您将可以随时更改服务器端。

然而,JS 编程的问题不仅仅是浏览器兼容性(这已经是一个大问题)。以下是没有得到充分考虑的问题:

  1. 性能 - JS 是地球上最慢的语言。
  2. 在盒子内部 - JS 仅提供与浏览器 DOM 的互操作,以及其他一些东西。这意味着任何想要成为特定操作系统“原生”的应用程序都不能用 JS 实现。

因此,也许您需要研究具有“本机”客户端 UI 的方法。以Java为例。

Typically the server side of an HTML application should not impact the client side. Meaning that if you stick to JavaScript only components on the client, you will be able to change the server side any time you want.

The problem with JS programming is however deeper than just browsers compatibility (which is already a huge problem). The following are not well considered problems:

  1. Performance - JS is the slowest language on earth.
  2. Inside the box - JS offers interop only with the browser DOM, and a few other things. This means that any application that wants to be "native" for a specific OS must not be implemented in JS.

So maybe you need to investigate approaches that have a "native" client UI. Such as Java for example.

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