After supporting small program development, cloud development also supports Web use! Developers can use the cloud capabilities provided by cloud development to directly develop web applications, such as PC web pages, public pages and so on. Therefore, developers can use cloud functions to realize business logic in website applications. Through linkage with cloud database, object storage, CDN and other products, products can be quickly launched and iterated. Come and experience it!
First of all, I have to introduce you to the powerful cloud development is where in the end!
Tencent CloudBase is a one-stop back-end cloud service provided by Tencent Cloud for mobile developers, making it easy to use cloud capabilities without setting up servers. Based on cloud development, developers no longer need to care about server and underlying infrastructure operation and maintenance, only need to focus on the code logic and business itself.
Cloud development currently supports applets and Web development.
Three basic functions of cloud development
Cloud development currently provides three basic capabilities: cloud databases, cloud storage, and cloud functions. These three capabilities make up a more complete back-end development capability.
Cloud function
For code that runs in the cloud, developers simply write their own business logic code.
-
Cloud operation: no need to purchase, deploy, operate and maintain traditional hardware, saving manpower and cost.
-
Efficient development: Each function is run and deployed independently, and can be automatically deployed after uploading the code, which improves the speed of independent development and iteration.
-
Elastic scaling: Real-time elastic scaling at the millisecond level is implemented based on the number of requests. No charge is incurred if the function is not executed.
Cloud database
Document databases contain collections that resemble JSON arrays of records in the form of JSON documents.
-
Easy to use: database API contains add, delete, change and check, simple operation; Triggers are supported for special scenarios.
-
Authority control: Data operation is carried out in client and cloud functions through API, which is safe and reliable.
Cloud storage
Upload or download cloud files directly in the front of the website application, and manage them visually in the cloud development console.
-
Fast upload: Provides file storage space that can be used by clients and cloud functions through apis.
-
Permission management: cloud download with permission management based on user identity security control.
-
CDN acceleration: Natural CDN acceleration for stored files to improve user experience.
Advantages of Cloud Development
Easier development
When using cloud functions, users only need to write the most important core business code, no longer need to care about load balancing, automatic scaling, gateway and other components, and no need to build back-end services of the application, which greatly reduces the complexity of back-end development and construction. No manual configuration is required. Cloud functions can be automatically scaled horizontally based on the number of requests, and reasonable computing resources are automatically arranged to meet service requirements.
Development is faster and more efficient
Cloud functions do not require specific frameworks or dependencies, and developers can focus on core code development. At the same time, developers can form multiple small teams, and a single module can be developed without knowing the details of other teams’ code.
The speed of independent development and iteration has never been faster, helping users to grasp the prime time of launch. Development can use cloud functions to write some single purpose, logically independent business modules, so can fully reuse the mature third party code implementation.
Operation and maintenance is easier
Each cloud function runs, deploys, and scales independently, and can be automatically deployed after the user uploads the code, eliminating the difficulty of deploying and upgrading individual applications.
Users no longer need to do complex configuration and management of OS intrusion, login risk, file system security, network security and port monitoring. All tasks are handled by the platform. The platform ensures the isolation of each user through a customized container.
A lower cost
Charge according to the number of requests and resource side operation, greatly saving time and cost, but also provide a certain amount of free end.
How to open the Web service for cloud development?
The cloud development Web service is used on Tencent cloud official website. At present, the Web side of cloud development only supports server access authorization through wechat public account login. Therefore, if developers want to develop website applications, they need to register and open applications on wechat public platform/wechat open platform first.
↓ For details about the commissioning process, see the following ↓
The cloud development home page is displayed
Select “wechat official account” to log in
Click on the authorization
Go to the cloud Development console and create an environment
Fill in the environment information, open successfully!
Quick Start – Quickly develop Web applications using the Cloud Development Web SDK
Initialize cloud development capabilities
Login authorization
Cloud development currently supports server access authorization through wechat login on the Web, so if developers want to develop website applications, they need to register and open applications on wechat public platform/wechat open platform first.
In addition to wechat public platform and wechat open platform login methods, cloud development will support mailbox, QQ, anonymous login, custom login and other login methods, please look forward to.
Application associated
To use the cloud functions, cloud storage, and cloud databases provided by cloud development, you need to add cloud development to your web application, called application association. Associate the Web SDK provided by cloud development with your website application so that the client can operate background resources through the SDK. Copy the code snippet below and paste it at the bottom of your HTML code (before any other script tags) to add cloud development to your web application.
Domain name authorization
In order to increase security, cloud developed authentication services need to first verify the source of the website application, that is, domain name authorization. Only pages under authorized domain names can use the SDK to initiate access to cloud development services. Authorization is completed by adding the full domain name of the site to the security verification whitelist.
Operating database
Quickly complete the use of CRUD and serverDate, regExp, geo and other special data structures based on the database.
Operating file storage
You can quickly upload files, obtain download links, or delete files.
Operating cloud functions
Quickly implement secure calls to cloud functions.
If you have any questions about the new open Web cloud development service, please leave a comment below and we will reply as soon as possible