CloudBase Framework tool recommendation: integrated deployment of front-end and back-end, efficiency improvement, open source "artifact"

CloudBase Framework tool recommendation: integrated deployment of front-end and back-end, efficiency improvement, open source "artifact"

Background and introduction

Cloud Development CloudBase is a cloud-integrated cloud service platform. It adopts a serverless architecture. Developers do not need to care about server construction and management. They only need to write business code and call native cloud capabilities to quickly build complete mini programs/mini games, H5, Web, mobile App and other applications. Cloud development is the leading practice of the domestic serverless concept, serving more than 500,000 developers.

In the process of developers using cloud development, we collected feedback and requirements for the following scenarios:

  1. Existing businesses such as websites and back-end services hope to be hosted on the cloud development platform, but there is a significant cost of transformation
  2. Cannot cover various development languages, frameworks and existing application delivery methods
  3. When there are front-end and back-end applications using multiple cloud development resources , I hope to reduce release costs while achieving continuous delivery
  4. Adding other cloud capabilities to the application requires manual configuration in the console

Based on the above scenarios, we hope to design a tool to solve the above problems, and hope to have the following characteristics:

  1. Supports seamless hosting of applications : users do not need to change development habits or modify code to adapt to cloud resources such as cloud functions, but can directly host applications on the cloud development platform
  2. Introduce the underlying resource layer that supports customization : Introduce a containerized deployment plan to carry various development languages, frameworks and existing application delivery methods
  3. Support declarative description of cloud resources : each part of the application can finally be described into a unified description language, supporting unified deployment of front and back ends
  4. Easy to use : Users don’t need to care about the underlying resources and underlying declaration files, and only need limited business parameters to host the application to the cloud development platform with one click

The core idea is to allow developers to use an integrated approach to develop and deploy applications .

CloudBase Framework is a front-end and back-end integrated deployment tool developed by cloud development based on the above-mentioned integrated ideas . Developers do not need to change the business code. It supports the front-end and back-end one-click hosting and deployment on the cloud development platform, enjoying the advantages of accelerated access and flexible free operation and maintenance. Has the following characteristics:

1. Cloud development products

Developed by the cloud, the core code has been open sourced on Github

https://github.com/TencentCloudBase/cloudbase-framework

(Welcome to order a Star for our project and support us to do better~)

2. Cloud native, integrated

The front-end and back-end are integrated in the cloud environment of the serverless architecture, which is flexible and scalable

3. Reduce costs

Resources are automatically and flexibly expanded and contracted according to usage, and billed according to usage, which greatly saves resource costs

4. Efficient and fast

Simple and easy to use, and built-in a large number of powerful back-end capabilities, only need to develop business logic

The following will introduce in detail the core features of CloudBase Framework and a quick start strategy.

Highlight 1: One-click deployment

The first core highlight of CloudBase Framework is that it can implement one-click deployment. Common applications can be deployed to cloud development with "zero configuration" without changing business code.

For example, the project created based on the Vue CLI tool shown in the figure will automatically detect the project framework and language when executing the deployment command of the CloudBase Framework , interactively confirm and save the project configuration, and realize the one-click release of the application. One command realizes application deployment, automatically configures COS object storage, DNS, domain name, etc., with built-in HTTPS security access, CDN access acceleration and other capabilities.

Support common frameworks and languages

CloudBase Framework currently supports front-end frameworks such as Vue and React, as well as SSR frameworks such as Nuxt. Node-based applications such as Express and Koa can also be hosted with one click. In addition, with the help of the underlying serverless cloud application capabilities, other back-end applications (PHP, Java, Go, etc.) can also be deployed. It is worth mentioning that Dart Server can be deployed, which can cooperate with Flutter to achieve cloud integration of the Dart language. This is also a major supplement to the Dart language and ecology by domestic cloud vendors.

Automatic detection framework

In terms of lowering the threshold for users to use, we have realized the function of automatic detection. There is no need to write configuration for common front-end frameworks, which can automatically identify the construction of the project and release the default configuration.

No need for complicated adaptation

No need to learn complex server configuration and code changes, only need to enter business parameters to deploy

Compatible with CI/CD

It can work perfectly with your existing workflow, and can be used with CI/CD tools to achieve continuous deployment. For example, it only takes a few lines of code to automatically deploy the front and back ends of the application when Github is automatically pushed, and it can also be added in the CI/CD process. Manually confirm the steps to review the publishing process.

    -name: Deploy to CloudBase
      run: |
        npm i @cloudbase/cli
        cloudbase login --apiKeyId ${{secrets.SECRETID}} --apiKey ${{secrets.SECRETKEY}}
        cloudbase framework:deploy

Highlight 2: Integration and easy expansion

Platform integration

Cloud Development (CloudBase) is a cloud-integrated cloud service platform. It adopts a serverless architecture. Developers don't need to care about server construction and management. It provides a lot of cloud capabilities out of the box.

Project integration

The front-end and back-end of projects developed using CloudBase Framework can be developed and maintained in the same project, which is very similar to the development of small programs, and can be developed and released in an integrated manner in the IDE.

Integrated front-end and back-end deployment

As shown in the above example, an integrated application with front-end code, cloud functions, and server-side code only needs to call a command of the CloudBase Framework to deploy the complete application in the cloud for unified management and maintenance.

Cloud native capabilities out of the box

The integrated cloud development platform provides native cloud capabilities out of the box, without the need to learn the underlying resource configuration, and without operation, maintenance and management.

For example, on the cloud development platform, we need to deploy a static website without worrying about object storage and CDN management; we need to deploy HTTP services without worrying about the configuration of the gateway layer and computing resources; when we need to use cloud databases, we don’t need to worry about database instances. Disaster tolerance.

Easily add more back-end capabilities

Easily introduce more back-end capabilities out of the box

  • Login authentication : Realize login authentication through SDK
  • Cloud database : Built-in NoSQL database, which can create collections and indexes in a declarative way
  • Cloud access : Introduce support for HTTP access
  • Cloud call : a few lines of code to call the open capabilities of WeChat
  • Cloud function : lightweight computing power
  • Cloud storage : realize file storage and download
  • Serverless Cloud Application : Use Kubenetes Containers in a Minimalist Way
  • Expansion ability : You can avoid the development and installation of CMS content management system and other expansion capabilities

More technical documents: https://cloudbase.net?from=10004

Reduce costs and increase efficiency

CloudBase Framework can easily migrate applications to an integrated cloud development platform by providing integrated development and deployment functions. Enterprises and individual developers can use this set of solutions to improve business efficiency and save business costs.

Faster development

  • Integrated cloud development multi-terminal SDK
  • Back-end capabilities out of the box

Deploy faster

  • One-click deployment, declarative creation of cloud resources
  • Automatic, fast and flexible expansion and contraction

Faster access

  • More node coverage
  • High performance, high availability

With 500,000 developers and 700 million daily calls, the availability guarantee can achieve 99.90%

Save worry and save money

The cloud development platform has the characteristics of free operation and maintenance, full hosting, and pay-as-you-go. The cost of deploying applications through CloudBase is compared with the cost of deploying applications in the traditional way, saving operation and maintenance costs, idle rental costs, and multi-role communication costs.

For example, the WeChat Reading Team has brought a great performance improvement with the help of "Mini Program·Cloud Development". The WeChat Reading Mini Program has been released 349 versions in 10 months, and the development efficiency is 4 times and 2 times that of the corresponding APP and H5 respectively. .

Cloud development has also brought about significant changes in the division of labor and the capabilities of its members. In the past, his team divided the work according to front-end development, Node.js development and operation and maintenance personnel, and now the front-end is responsible for full-stack development.

Ecology and plugins

CloudBase Framework has the openness characteristics, pass through the micro-kernel, the plug of the way to design this program. At the kernel level, problems such as plug-inization and build life cycle are solved, and specific scenarios are implemented through plug-ins.

For example, for the hosting of websites with different technology stacks, website plugins are designed to deal with this type of problem, which can solve the construction of front-end pages, the deployment of static resources, and the processing of domain names.

Developers can also develop different plug-ins and publish them to NPM according to the plug-in specifications, and only need to specify their npm package name when using them.

Currently, the official plugins provided by CloudBase Framework are:

Plug-in

The latest version of

Plug-in introduction

@cloudbase/framework-plugin-website

One-click deployment of website applications

@cloudbase/framework-plugin-node

One-click deployment of Node applications (supports low-level deployment as functions or serverless cloud applications)

@cloudbase/framework-plugin-nuxt

One-click deployment of Nuxt SSR application

@cloudbase/framework-plugin-function

One-click deployment of function resources

@cloudbase/framework-plugin-container

One-click deployment of cloud application container services

@cloudbase/framework-plugin-dart

One-click deployment of Dart cloud applications

@cloudbase/framework-plugin-database

One-click declarative deployment cloud development NoSQL cloud database

Quick start

1. Install CloudBase CLI

First you need to install the latest version of CloudBase command line tools

npm install -g @cloudbase/cli@latest

2. Log in to the command line tool

Then call the command line to log in, and it will jump to the Tencent Cloud console for account authorization. If you don’t have an account, you can open it on the console

cloudbase login

3. Initialize an application

Through the CloudBase command line tool, we can create an application very conveniently. If it is used in an existing application, it can be executed cloudbase init --without-template

cloudbase init

Initialize the application by interactively creating an environment and selecting a template

You can also directly specify the template id to create the corresponding project, for example

cloudbase init --template nuxt-ssr

The currently supported integrated application templates are as follows:

name

Application example introduction

Template id

Vue application

Vue + cloud functions + static website deployment

vue

React application

React + cloud functions + static website deployment

react-starter

React full stack application

React + cloud functions + static website deployment + cloud database

react-demo

Nuxt SPA application

Nuxt SPA + cloud function + static website deployment

nuxt-spa

Nuxt SSR application

Nuxt SSR + server deployment + static website deployment

nuxt-ssr

Koa application

Koa + server deployment

koa-starter

Express app

Express + server deployment

express-starter

Nest app

Nest + server deployment

nest-starter

Node.js cloud function example

Node.js cloud function

node-starter

PHP cloud function example

PHP cloud functions

php-starter

Java cloud function example

Java cloud functions

java-starter

VuePresss website application

VuePresss + static website deployment

vuepress

Node.js cloud application

Node.js + Serverless cloud application deployment

node

Aqueduct (Dart Server) cloud application

Aqueduct (Dart Server) + Serverless Cloud Application Deployment

dart

4. Deploy the application

Next, just need to enter the project directory and call the command to deploy

cloudbase framework:deploy

After the deployment is successful, you can access it through the address prompted by the command line:

https://framework.service.tcloudbase.com/express-starter/

Vision

CloudBase Framework is committed to creating an integrated framework. Currently, integrated deployment tools have been implemented. In the future, integrated runtime libraries and integrated CI/CD workflows will be introduced to help businesses deploy services in a future-oriented faster and easier. On the cloud development platform, improve efficiency and save costs.

  1. Integrated thinking
  2. unified platform
  3. All-in-one deployment tool
  4. Integrated runtime library : Simplify the development process through the runtime framework, and realize powerful functions with less code
  5. Integrated CI/CD workflow : combined with code warehouse push to realize built-in automated cloud construction and deployment

Open source contribution

We very much welcome all developers to contribute to CloudBase Framework, so that this project can better help developers improve efficiency.

Github address: https://github.com/TencentCloudBase/cloudbase-framework

Participate in contribution

  • Actively participate in Issue discussions, such as answering questions, providing ideas, or reporting unsolvable errors
  • Write and improve project documentation
  • Submit a patch to optimize the code
  • Claim items in to-do tasks

Cloud Development (Tencent CloudBase, TCB) is a cloud-native integrated development environment and tool platform provided by Tencent Cloud. It provides developers with highly available, automatically and elastically scalable back-end cloud services, including serverless capabilities such as computing, storage, and hosting. , Can be used for cloud integration to develop a variety of end applications (small programs, official accounts, web applications, Flutter clients, etc.) to help developers build and manage back-end services and cloud resources in a unified manner, avoiding cumbersome servers in the application development process With construction and operation and maintenance, developers can focus on the realization of business logic, with lower development thresholds and higher efficiency. Product documentation: https://cloud.tencent.com/product/tcb Technical documentation: https://cloudbase.net Technical exchange plus Q group: 601134960 For the latest information, follow the WeChat public account [Tencent Cloud Development]

More exciting

Scan the QR code to learn more

Reference: https://cloud.tencent.com/developer/article/1662309 CloudBase Framework tool recommendation: integrated deployment of front and back ends, performance improvement open source "artifact"-Cloud + Community-Tencent Cloud