Code Monkey home page Code Monkey logo

syberh's Introduction

Syberh

简介

Syberh 框架是对 SyberOS(元心操作系统) 中支持 Hybrid 开发解决方案,基于 WebView UI 的方案进行实现。 Syberh 框架主要包括 CLI(开发工具)、JS SDK 和Native SDK 模块。

实现原理

Hybrid App 的本质,其实是在原生的 App 中,使用 WebView 作为容器直接承载 Web 页面。因此,最核心的点就是 Native 端 与 H5 端 之间的双向通讯层,其实这里也可以理解为我们需要一套跨语言通讯方案,来完成 Native(Qt/Java/xxx) 与 JavaScript 的通讯。这个方案就是我们所说的 JSBridge,而实现的关键便是作为容器的 WebView,一切的原理都是基于 WebView 的机制。

开发工具 CLI

App 快速开发的脚手架,提供简洁的的命令,即可从 APP 的创建到发布 APP 到手机中。

创建模板项目

$ syberh init myapp

打包项目

$ syberh build --type device

快速检查用户本地开发环境

$ syberh doctor

JS SDK

JS端的实现,提供常用API接口提供Hybrid开发者调用远程接口。

Native-SDK

原生功能实现,提供标准、可拓展的API提供给JS端进行调用。

由于各种各样的原因,Native 容器确保核心交互以及部分重要 API 实现,关于底层容器优化等机制会一直持续完善。

主要实现了以下功能

  1. 负责和 JS-SDK 的通讯
  2. 通过插件的形式统一管理qml 组件功能
  3. 负责和 C++代码进行通讯

🤝 参与共建 PRs Welcome

请参考贡献指南.

强烈推荐阅读 《提问的智慧》《如何向开源社区提问题》《如何有效地报告 Bug》《如何向开源项目提交无法解答的问题》,更好的问题更容易获得帮助。

贡献者们

感谢以下所有给 syberh 贡献过代码的开发者:

  • 感谢 quickhybrid 作者提供了 jsbridge 的实现逻辑和相关代码
  • 参与者 更多

更新日志

本项目遵从 Angular Style Commit Message Conventions,更新日志由 conventional-changelog 自动生成。完整日志请点击 CHANGELOG.md

syberh's People

Contributors

hanagm avatar abeir avatar xue99999 avatar talicoasdf avatar akcs-a avatar haibo1 avatar wanlgijuan avatar taozi2018 avatar sihaibo avatar taozi201299 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.