Web desktop application Framework 3:web desktop application Development n style

Source: Internet
Author: User

Research Web desktop application development for some time, summed up the Web desktop application development of some mainstream way.

First, the front style

This way is to directly implement a Web program, and then encapsulate a browser display, quite rude and effective. The famous frame is electron and nw.js.

Representing the application is atom.

is typically based on node. js. There are other languages as well.

Fans of a variety of front-end frameworks are avid followers of this style. We're not going to put the demo here. Paste the code can feel its domineering side leakage.

function () {  //  Create browser window.   New Browserwindow ({width:800, height:600});   // load the app's index.html  Mainwindow.loadurl (' file://' + __dirname + '/index.html '); // when the window is closed, the event is sent  function () {    null;  } );

Second, cool style

This approach is to embed multiple Web pages on the application interface, which is generally a cool flash or animation.

On behalf of the application is QQ.

The user of various directui or skin-changing frames is the true love powder of this mode.

The so-called ruler has a short, inch. It's wise to throw a dirty dirty at a Web page. All kinds of unexplained things can be put on the.

Here I implemented a small Code editor demo with Wxpython and Tornado. Yan value play: Ztree.js and Codemirror.js.

classMyhtmlframe (WX. Frame):def __init__(self, Parent, title): WX. Frame.__init__(Self, parent,-1, title, size = (800,600) Self.create_menu () self. Bind (WX. Evt_close, self. OnClose) Self.statusbar= self. Createstatusbar (2) self.statusbar.SetStatusText (U"Status", 0) self.statusbar.SetStatusText (U"Hello", 1) Self.splitter= WX. Splitterwindow (Self, style=WX. sp_live_update) Self.tree=Wx.html2.WebView.New (self.splitter)self.html=Wx.html2.WebView.New (Self.splitter) self.splitter.SetMinimumPaneSize (200) self.splitter.SplitVertically (Self.tree, self.html,300) Self.tree.LoadURL ('http://localhost:8888/tree?v=%d'%time.time ()) Self.html.LoadURL ('http://localhost:8888?v=%d'%time.time ())

Third, embed style

Some people say that all Web projects are open Source: (. The nature of the web determines that its security (for the program itself) is poor. The experience also has some limitations.

Therefore, the embedded style abandons the pure Web program, takes the host language and the JavaScript bidirectional binding way, the direct manipulation Web page, in exchange for the security and the experience promotion.

This style brings the development of difficulty to the promotion, making it less avid enthusiasts, temporarily without discovering purely representative applications. Most of the things that the framework is doing.

Here is a demo that I implemented with Cef-python. Yan value play: Gooflow.js.

defMain (): Check_versions () Sys.excepthook= CEF. Excepthook#To shutdown all CEF processes on ErrorSettings= {         "product_version":"myproduct/10.00",         "user_agent":"myagent/20.00 myproduct/10.00",} CEF. Initialize (Settings=settings) Browser= CEF. Createbrowsersync (url="file:///html/flow.html", Window_title="Tutorial") set_javascript_bindings (browser) CEF. Messageloop () CEF. Shutdown ()

Iv. Component Style

Web Components, is a long-standing technology. The most famous is the. NET Platform WebForm technology, as well as the Java platform JSF, tapestry, and so on.

The advantages of component-type development are simple and intuitive, rapid development. The disadvantage is that the package is serious and the interface is stiff. One word: ugly. In contrast, it is a technology that is considered quite backward and flawed.

But here's the interesting place,

If you are using Web Components to develop a Web desktop app, ignore the intermediate process and see only the components ... Desktop applications, this is a fairly normal and long-standing technical system.

Negative negative positive, spiral rise, the component style suddenly become tall up.

Compared to traditional component-based applications, the advantage of the new component style is that the cost of cross-platform GUI development is greatly reduced. Equivalent to the browser as a GUI Render.

And compared to other style, security, cool degree, experience is greatly enhanced. Development is not too difficult.

But this style has not yet been found to be publicly used.

But I found a very promising Golang framework: Github.com/zserge/webview

You can do some of the component style attempts ...

Five, the ultimate style

The ultimate style is not a way of development, but a scoring standard of five stars per item, total 15 stars.

The ultimate Web application framework must perfectly address the three aspects of interface, cost, and constraints. You can make your own comments.

Interface Cost Limit

Standard Advanced Custom Skin animations

Learn the future of popular development and inheritance

Smooth and secure open source platform volume

Legend

Satisfied with the discrepancy

Source: Cool Style

Finish

Web desktop application Framework 3:web desktop application Development n style

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.