1
头图

Why do Rubick

In fact Rubick 1.x was to solve our own problems: in particular, we need a desktop application that supports custom plug-ins to simplify the bloat of users installing huge desktop applications. And when it comes to data security, plug-ins can only contribute to the company’s intranet and cannot be made public.

At the stage of Rubick 2.0 npm to make it more convenient for developers to join the development of plug-ins. The boundaries and types of plug-ins have been expanded. Developers can develop Rubick system plug-ins. At this time, Rubick becomes a electron advanced package. Developers can realize system capabilities with high freedom without limitation. openAPI is not limited to search and call. Use, as long as Rubick is running, the plug-in is running.

Rubick's self-introduction

Rubick is based electron open source toolkit, based on npm plug-in management of freely integrated rich plug-ins. origin of dota is one of the heroes in 061cd35db8354d. Its core skill is the plug-in use of the skills of other heroes. It is very in line with the design concept of this tool, so it is named Rubick .

Core skills display

1. Manage plugins based on npm

At the beginning, the way to design the plug-in management was to package the plug-in into .zip , and then upload the compressed package to CDN , click install and then download to decompress. But this has several disadvantages

  1. A data storage server is needed to store these compressed files, so this requires a fee, which is difficult for an open source developer to maintain.
  2. The packaging mechanism and decompression mechanism are cumbersome and unfriendly to developers

Until I read the PicGo author’s article on PicGo plug-in design ideas, I suddenly felt that npm was exactly what I wanted, and it was lightweight and saved a sum of server storage overhead: PicGo plug-in design but In fact, there is another problem, because it is based on npm , so developers need to install the node environment in advance before they can use npm . But this is currently acceptable, because Rubick is currently positioned as an open source toolbox for developers.

When you click to install the plug-in, what actually executes is npm install xxx .

QQ20211222-153720.gif

2. System plug-in capabilities

Rubick is to support system plug-ins. With system plug-ins, we can use plug-ins without having to search for them. As long as rubick is running, the plug-ins are running. This is a very valuable thing for some special scenarios. For example, I want to implement a plug-in that reminds me to drink water regularly. If I exit the plug-in interface, it may not be possible. But to become a system plug-in, even if you exit the plug-in, rubick hooks provided by the plug-in in the background. This inspiration also comes from the plug-in life cycle design of PicGo Let's demonstrate the system plug-in below:

QQ20211224-164014.gif

With plug-in system, we can achieve Check color screen plug-in, regularly reminded plug super panel insert ... In addition, because rubick system plug-in is running main process, so we can be done with plug-in system More capabilities, for example, rubick can be seen as the secondary packaging electron electron , based on the system plug-in, we can realize another desktop application!

At last

The biggest motivation for open source is because of love. It is completely non-profit. I hope that what I do can provide some help and direction to the small partners in need. The programmers are the most simple and lovely. I hope that malicious attacks will not break the last share of Cheng Kaiyuan’s power. Keen.

Attached:

rubick github warehouse

rubick user documentation


muwoo
1.6k 声望260 粉丝

不想当猴子的程序猿