Home  >  Q&A  >  body text

javascript - 如何用最快的速度C#或Python开发一个桌面应用程序来访问我的网站?

需求

最近在给做一个项目,用了Django开发了一个网站,然后甲方说要有一个windows桌面应用程序。

问题

现在的情况是,网站已经开发完毕,而且使用了websocket,因此C#直接用winform自带的浏览器控件不能正常工作,我想咨询一下,怎样才能最快速度开发一个桌面程序来展示我的网站?只要可以正常打开我的网站,如果有那种合适的浏览器控件也行。

ringa_leeringa_lee2741 days ago837

reply all(6)I'll reply

  • 黄舟

    黄舟2017-04-18 10:36:36

    Try using electron, which is essentially a desktop program with a chrome shell installed.

    reply
    0
  • 阿神

    阿神2017-04-18 10:36:36

    Winform is the fastest way to develop desktop programs. If the built-in browser control cannot meet the needs, you can use CEF components.

    There is an open source implementation of C# cefSharp on github

    reply
    0
  • 黄舟

    黄舟2017-04-18 10:36:36

    Abandon c#, the built-in browser components are not good, they are all based on IE core and do not support websocket.

    Nowadays, electron and other nodejs technology-related tools are generally used to develop clients, because some tools such as electron are based on chrome. If you know web pages, you can develop clients.

    If you use python, then choose py-qt5. The current browser core of qt5 is chrome, so the speed is also very fast.

    Remember that QT5 has canceled QWBVIEW and qwebview is very slow. QT5’s browser control is called qwebengineview

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 10:36:36

    If you just want to use display, you can use PyQt's QWebView, which supports websocket and is based on Webkit. But let’s see if Party A has any requirements for the installation and packaging of this desktop program.

    reply
    0
  • 阿神

    阿神2017-04-18 10:36:36

    Well, it’s okay to embed a static page in hta. For modern pages, let’s use the ones from downstairs

    http://stackoverflow.com/ques...

    There is also discussion here

    <html>
    <head>
    <title>test</title>
    <HTA:APPLICATION
      APPLICATIONNAME="test"
      ID="test"
      VERSION="1.0"
      NAVIGABLE="yes"/>
    </head>
    
    <script language="VBScript">
    
    Sub Window_OnLoad
        document.location.href = "http://www.baidu.com"
    End Sub
    
    </script>
    
    <body bgcolor="white">
    
    </body>
    </html>

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:36:36

    electron + 1

    reply
    0
  • Cancelreply