Web technologies in GUI applications

What is your experience using web technologies (HTML, XML, CSS, JavaScript) to implement part of the functionality of a GUI application? Pros and cons, please.

There are no servers, relational databases, AJAX or session management cookies, or an existing web application, but rather a GUI application that uses web widgets (e.g. Qt WebKit ) to display and process significant parts of the user interface, taking advantage a graphical interface to achieve even richer interoperability and better integration with desktop systems.

I have already confirmed that the approach is possible using PyQt. Content can be displayed from the file system or from strings, and URL requests (images or clicks) can be captured and processed by event handlers of the form. CSS and JavaScript are supported, perhaps with some limitations.

# ... self.webView.page().setLinkDelegationPolicy( QtWebKit.QWebPage.DelegateExternalLinks ) #... class TotiMainWindow(QtGui.QMainWindow): def linkClicked(self, url): pass # events arrive here 

Note. This question is different from this and this one made earlier, by the way, because there is no requirement to use web technologies in the graphical interface, but there is a requirement that the application work without a network connection, and it should integrate well with the default desktop on different platforms without previous infrastructure requirements (no .NET, Java, browsers or database servers).

Note. I posted another version of this question in PMS, but found very little experience with this approach.

Closing note

I just found most of the information I was looking for in a series of blog posts by Andre Pareis .

+4
source share
5 answers

We did just that for the project when Windows XP was new.

This gave my team several advantages:

  • Good interface with relatively little effort.
  • Easily customize your UI style with CSS.
  • Relatively simple integration with C ++ (calling functions from ui and vice versa)

The disadvantages that we saw were:

  • Some not-so-good firewalls treat access to internal resources (i.e. other html pages in ui) as a web request
  • Adding and accessing necessary resources can be a bit cumbersome in some cases.
  • Perhaps the specified properties in Internet Explorer prevented JS from starting in the application

Note that some of the Windows XP: s programs use this approach.

This probably works best with the smaller, more magical parts of ui (which were almost entirely related to our ui).

Since then, I have not been involved in ui projects, so I can’t say if this approach supports ... I know that MFC-based applications will allow you to use HTML-based dialogs.

+2
source

I think the biggest advantage of using web markup like HTML / CSS and other web technologies is that desktop applications can live very well.

As we say, Google engineers are working on the Chromium operating system, which essentially consists of a single GUI application ... browser ...

Now, although none of this actually happens, it’s obvious that the number of applications available through a web browser is available anywhere. It seems to me that this is the future of application development.

Using these technologies, this becomes one lesser headache you have to deal with when or when you determine that your application should be available as a web application.

Update . A few years ago, we developed Agent Desktop for our call center, which is essentially a local application that opens sockets for integration with the telephone system. The user interface used by the agents is built using HTML, CSS and JavaScript, and this experience is overwhelming. When we released our last update in 2010 with professional CSS redesign, our agents were very impressed not only by how easy it was to interact, but also how easy it was to use.

In the future we will transfer this 100% to the browser, but at the moment it should be a local application due to the integration of COM with the telephone system.

+4
source

In a similar situation, in 2005 I created a standalone webapp using XForms, CSS, JavaScript, XML, and XML Schema to search and validate data offline. With a good XForms -> HTML + JS Transformer (Chiba), he completed the task without error correction after the initial version. It was used for 6-12 months (IIRC) by about a dozen engineers for a project collecting test data in the tunnel of the Large Hadron Collider. The biggest surprise for this project was how much you get for free when you go to the web platform, even for offline use. Highly recommended.

+1
source

The main problem is that it reduces the development speed or the quality of your user interface. A lot of. If you are not using Seaside, it is much faster to develop a desktop application.

0
source

There are quite a few applications built on top of the Mozilla platform. This is not 100% web technology, because instead of HTML you use XML XUL , but the rest is really a web stack (JavaScript, CSS). The most successful of these are OpenKomodo and the commercial older brother of Komodo IDE .

On the other hand, with regard to Qt, in the latest version 4.7 you can create a graphical interface using QML . Don't let the title fool you, it's not markup, it's actually JavaScript with application-specific extensions.

0
source

Source: https://habr.com/ru/post/1334446/


All Articles