VasSonic README

The project's README from github.com/Tencent/VasSonic. As one markdown file: README.md.

VasSonic: A Lightweight And High-performance Hybrid Framework

license PRs Welcome wiki

logo

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform. Not only does VasSonic supports the static or dynamic websites which are rendered by server, but it is also compatible with web offline resource perfectly.

VasSonic uses custom url connection instead of original network connection to request the index html, so it can request resource in advance or parallel to avoid waiting for the view initialization. In this parallel case, VasSonic can read and render partial data by WebKit or Blink kernel without spending too much time waiting for the end of data stream.

VasSonic can cache html cleverly according to VasSonic Specification obeyed by client and server. VasSonic Specification specify template and data by inserting different comment anchor, templates are bigger parts of html which stay the same or changed rarely , in contradiction data, which is the smaller and constantly change part of html. According to this, VasSonic request less data by incremental updating templates and data, the websites are faster and feel more like native application. In conclusion, VasSonic effectively enhance the user experience and increase click rate, retention rate and other indicators.

Sonic is called for short in project.

Before VS After Using VasSonic

Pic 1: Before Using VasSonic Pic 2: After Using VasSonic
default mode VasSonic mode

Getting started

Getting started with Android

Getting started with iOS

Getting started with Java

Getting started with Node.js

Getting started with PHP

Getting started with React

Demo Downloads

  1. Here are the latest sample demo for Android and iOS.

Support

Any problem?

  1. Learn more from the following sample.
    Android sample
    iOS sample
    Java sample
    Node.js sample
    PHP sample
    React sample

  2. Read the following source code
    Android source code
    iOS source code
    Java source code Node.js source code
    PHP source code
    React source code

  3. Read the wiki for help.

  4. Contact us or scan QR code for help.
    QR code

Contributing

For more information about contributing issues or pull requests, see our VasSonic Contributing Guide.

License

VasSonic is under the BSD license. See the LICENSE file for details.

The End

If you are interested in VasSonic, don't forget to STAR it.

VasSonic's mission is MAKING WEB MUCH BETTER!

Thank you for reading ~

VasSonic (Tencent/VasSonic)

Searching Database…

11.8K ·GitHub
What is this?VasSonic (Sonic for short) is a lightweight, high-performance hybrid framework from Tencent's VAS team that speeds up the first screen of websites loaded in hybrid apps on Android and iOS.
Is this something I add to my app, or does it run on the server?Both: it's a client framework for your Android or iOS WebView app, and it works together with a server that follows the VasSonic Specification — getting-started guides cover Android, iOS, Java, Node.js, PHP and React.
How do I add it to my app?Follow the getting-started guide for your platform — Android or iOS on the client, Java, Node.js, PHP or React on the server side — and try the downloadable sample demo apps for Android and iOS.
Does my website need server-side changes for VasSonic to work?Yes — the speed-up relies on smart caching that only works when both the client and the server follow the VasSonic Specification, so an existing site needs some cooperation on the server side.
Does it work with offline resources too?Yes — besides static and dynamic websites rendered by the server, VasSonic is fully compatible with web offline resources.
How does VasSonic make the first screen faster?It swaps the normal network connection for a custom URL connection, so the HTML request starts in advance or in parallel with view initialization instead of waiting for it. The WebKit or Blink kernel then renders partial data as the stream arrives, without waiting for the full response.
How does the caching work?Pages insert comment anchors that split the HTML into a template — the bigger part that stays the same or changes rarely — and data, the small part that changes constantly. Client and server update the two incrementally, so far less data is requested and pages feel more like a native app.
What improvement can I expect?The README claims a clearly better user experience and higher click rate, retention rate and other indicators, and includes before/after pictures comparing default mode with VasSonic mode.
Creator
Tencent
Size
15.8 MB
Stars
11.8K
Age
9y
Commits · 90 Days