34,79 €
Organizations are moving their applications, data, and processes to the cloud to reduce application costs, effort, and maintenance. However, adopting new technology poses challenges for developers, solutions architects, and designers due to a lack of knowledge and appropriate practical training resources. This book helps you get to grips with Oracle Visual Builder (VB) and enables you to quickly develop web and mobile applications and deploy them to production without hassle.
This book will provide you with a solid understanding of VB so that you can adopt it at a faster pace and start building applications right away. After working with real-time examples to learn about VB, you'll discover how to design, develop, and deploy web and mobile applications quickly. You'll cover all the VB components in-depth, including web and mobile application development, business objects, and service connections. In order to use all these components, you'll also explore best practices, security, and recommendations, which are well explained within the chapters. Finally, this book will help you gain the knowledge you need to enhance the performance of an application before deploying it to production.
By the end of this book, you will be able to work independently and deploy your VB applications efficiently and with confidence.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 460
Veröffentlichungsjahr: 2021
Boost productivity by building web and mobile applications efficiently using the drag-and-drop approach
Ankur Jain
BIRMINGHAM—MUMBAI
Copyright © 2021 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Group Product Manager: Aaron Lazar
Publishing Product Manager: Shweta Bairoliya
Senior Editor: Rohit Singh
Content Development Editor: Rosal Colaco
Technical Editor: Gaurav Gala
Copy Editor: Safis Editing
Project Coordinator: Deeksha Thakkar
Proofreader: Safis Editing
Indexer: Tejal Daruwale Soni
Production Designer: Nilesh Mohite
First published: March 2021
Production reference: 2310321
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-80056-980-5
www.packt.com
A special thank you to my mother, Mrs. Sunita Jain, and my father, Mr. Surendra Kumar Jain. Without you, I would not be the person I am today. To my wife, Nancy, thank you for your love and support, and to my little daughter, Aarohi, my lucky charm.
– Ankur Jain
"Even a journey of a thousand miles begins with a single step"
– Laozi
Congratulations! You are about to start your journey of learning a new development platform. This is one of the fun things you get to do as a software developer who likes to keep up with new technologies. Picking up Visual Builder as your next development platform is a smart move - it's the same decision Oracle took for our new Oracle Cloud Applications. With Visual Builder and the information in this book, you'll be able to create cutting-edge web and mobile apps in no time.
Visual Builder, the platform that this book is about, is the latest development platform offered by Oracle. As a cloud-native platform, VB's goal is to help developers be more productive when working with the combination of JavaScript, HTML5, and REST services. Over the past 5 years, VB has evolved to become a complete, advanced platform that is used by thousands of companies as well as by Oracle's own development teams to build enterprise apps faster.
From the get-go, we designed VB to simplify the complex task of building apps by focusing the development on a more visual and declarative approach. Leveraging visual page editors, diagrams for defining business logic flows, and declarative aspects to defining connectivity to data delivered a productive way to create apps.
VB started as a tool for the citizen developer, allowing everyone to create apps without the need for any code. In fact, you can still build such basic apps without the need to code in VB today. But as demands for more complex capabilities kept coming, we added more and more features that allowed professional developers to leverage programming techniques to add advanced functionality. The result is a powerful tool that combines easy development with endless capabilities to extend the platform.
It's great to have this book as your guide to adopt the Visual Builder platform. Ankur Jain has been a very active member of the Oracle community and an early adaptor of the tool. He has shared his knowledge through blogs, videos, and other publications. In this book, he will take your hand and guide you through the various features offered by Visual Builder. You will learn everything you need to get going – from provisioning the environment, through connecting to various data sources, creating advanced web and mobile UIs, and all the way to collaborating with other developers and implementing best practices. This book will take you beyond the wizard and into the inner working of VB and the architecture it uses.
The world of Oracle development tools is always an evolving one, and we - at the Oracle Cloud Development Tools team - are adding many new features into Visual Builder in each new release. With the knowledge you get from this book, adopting these new features will be easier as you continue on your learning journey in the ever-evolving tech world.
Hope you enjoy the learning journey!
Shay Shmeltzer Director of Product Management and Strategy Oracle Cloud Development Tools (March 2021)
Ankur Jain is passionate about learning new technologies and exploring new things on his own. He has worked on a number of different technology stacks, including Oracle OIC, VB, API PCS, Oracle SOA, OSB, WebCenter Content, and Java. He has implemented various projects on Oracle Integration and the Visual Builder.
He has earned various prestigious awards and recognition from different groups and communities, including Oracle's elite Oracle ACE program. He has become a spotlight member of the Oracle Cloud community: UKOUG has published an article in PTK issue number 73, the tech edition; he is OIC certified, and has been selected as a speaker to present a paper at the Groundbreakers Yatra, organized by AIOUG.
He is a prolific blogger and YouTuber, helping thousands of users to learn.
I wish to thank the people who have been close to me and supported me, especially my wife Nancy, my parents, and my friends.
Prasad Puttachar is a senior IT professional with more than 20 years of experience in various industry-leading CRM applications, including Oracle CX (sales and service, CPQ, and commerce) and Siebel CRM industry applications (call center, Telco, automobile, and financial services). He has worked on solution designs for a variety of software package products, as well as in development, architecture, implementation, and presales, possessing a broad set of skills applicable across different industries and roles.
His core competencies are Oracle SaaS applications (sales and service, CPQ, and commerce), Oracle IaaS, and Oracle PaaS (Integration Cloud, Process Cloud, and Visual Builder Cloud).
In this section, we'll start with the Visual Builder (VB) basics. This part will help you to understand VB, its benefits, and its features. You will become familiar with all the tools that are required to start VB, what technologies are used in VB, and what you should know in advance.
This section explains the VB architecture, which helps to understand different components of VB and how they communicate with each other in order to build web and mobile applications. In further chapters, you will learn about the creation of a VB instance, how to log in to it, and the directory structure of the web application. The purposes of different navigations are also explained. We will explain various building blocks of VB with examples.
This section comprises the following chapters:
Chapter 1, What, Why, and How (WWH) of Visual BuilderChapter 2, Provisioning and Understanding the Visual Builder InstanceChapter 3, Exploring Visual Builder IngredientsThe first chapter of every book is one of the most important chapters as it mainly focuses on the introduction of the technology covered in the book. So, the first chapter of this book will help you to know more about Visual Builder (VB), why you need to use it, and how to use it.
At a high level, the VB is the cloud offering by Oracle that helps you to build engaging web and mobile applications by dragging and dropping the UI components. VB is a declarative approach for building cross-platform applications.
In this chapter, we will cover the following topics:
Introducing VBReviewing the features and benefits of VBKnowing the tools required to use VBKnowing the technologies used in VBUnderstanding the VB architectureAfter completing this chapter, you will be familiar with Visual Builder, its features, and the benefits of using VB. In this chapter, we have explained what tools are required to start the VB, and what technologies you should know or you should learn. Along with this, we have drawn out the VB architecture, which explains how different VB components work together in order to develop web or mobile applications.
You don't require any software or hardware to follow this chapter.
VB is an Oracle Cloud Platform as a Service (PaaS) offering that enables us to build web and mobile applications declaratively by dragging and dropping a wide variety of built-in User Interface (UI) components. VB helps you to build enterprise-grade applications that can be developed and deployed quickly and can be accessed from anywhere at any time. You don't need to install any additional software on the local machine to use VB. The complete development life cycle is managed by the browser interface. From development to testing to deployment, everything is managed by a single unified tool called Visual Builder.
VB allows developers to access the source code of visual development, which makes it easy to write custom code (HTML, JavaScript, JSON) to enhance the functionality of applications. You don't require any programming experience to develop applications using Visual Builder. The VB uses the open source Oracle technology called Oracle JavaScript Extension Toolkit (JET) for visual development. All the visual UI components belong to the JET family; however, you have the option to use HTML tags and/or the code editor when required.
VB provides a way to store and manage data into the embedded database and a mechanism to call any type of external REST API to interact with a wide variety of external applications. VB provides a declarative way to call any REST API without any coding. VB allows us to call REST-based integrations developed in the integration cloud seamlessly. A VB application interacts with an embedded database or external REST APIs to interact with data.
Having understood what VB really is, next we will have a look at its features and advantages.
It is worthwhile knowing the benefits VB offers. In this fast-growing world, organizations are looking for a development tool that can help to deliver responsive web and mobile applications quickly and efficiently. VB allows quick development, requires no additional software cost, is a drag and drop tool, has a user-friendly interface to develop UIs, and more. It's a browser-based tool that helps to deliver engaging web and mobile applications.
VB is best suited for situations when you need to extend Oracle and non-Oracle SaaS applications quickly. Using the inbuilt catalog of the Oracle SaaS application, you can extend the Oracle SaaS application very easily.
Let's try to understand with an example. Let's say there is a set of external users who want to access the Oracle SaaS procurement module in order to create Purchase Orders (POs), approve POs, list POs, and so on, but the organization is not willing to accord access to the Oracle SaaS application to the external users.
If the organization has VB, then as a solution, the organization can plan to build a web or mobile application in VB and create different flows and pages. Developers can use the built-in catalog of Oracle SaaS to communicate with the Oracle SaaS application in VB and create/approve/list POs and so on in real time from the VB application directly instead of logging into the Oracle SaaS application.
Once the VB application is developed, you can deploy it with a single click and provide access to the external users so that external users can use SaaS application functionality using the VB application as required.
The features that VB offers are as follows:
Embedded database: Oracle VB comes with an embedded database that helps you to manage transactional data. Using the data manager of the embedded database, you can import and export bulk data quickly from .csv or .xlsx files. This database has a set of features that makes it easy to maintain the data in the database.Important Note:
An embedded database has a limit of 5 GB storage space.
Connect to different database: Oracle VB is provisioned with a local database automatically, but VB gives you the option to switch the local database to another Oracle database such as Database as a Service (DBaaS) or Autonomous Transaction Processing (ATP). Once you connect to a different database, all the data can be managed by the corresponding database.Connect to external REST APIs: Oracle VB allows you to communicate with external REST APIs using a declarative approach without a single line of code. You can connect to any type of REST API and interact with external applications in real time.Integration with Oracle SaaS application: VB allows out-of-the-box connectivity with Oracle SaaS that helps to extend Oracle SaaS application functionality. With the help of an built-in catalog, VB streamlines the process of communicating with Oracle SaaS applications in real time without any extra effort.Connect to Processes: VB allows you to interact with the Processes Cloud Service (PCS), which helps you to fetch lists of tasks and take necessary action (approve or reject) from the VB application directly.Web application development: VB allows you to deploy responsive web applications that run on the VB server engine without the need for any additional servers. However, VB web applications can be deployed on any external server but the VB features will be limited.The following screenshot shows one of the pages of a VB web application:
Figure 1.1 – Web application
Mobile application development: VB also allows you to develop a mobile application and build it for Android and iOS. You can build Progressive Web Apps (PWAs) from mobile applications too with just a single click.The following screenshot shows one of the pages of a mobile application:
Figure 1.2 – Mobile application
Custom code: In addition to dragging and dropping out-of-the-box components, you have the choice to extend your VB app's functionality using HTML5 and JavaScript.Inbuilt security framework: Security is one of the top priorities of web and mobile applications, especially when the application is exposed over the internet. VB comes with an embedded security framework that allows you to secure data as well as applications. Application security alone is not enough as anyone can spoof requests in between, change roles, and steal data. So, along with application security, data security is also required.With the previously listed features, VB is one of the strongest cloud platforms and allows you to build cross-platform applications and solve all the organization's problems.
The benefits of VB are as follows:
Unified platform: The complete life cycle of application development is managed by a single unified platform. Every stage of the application is managed by a single browser-based tool.Quick development: Web and mobile applications can be developed and deployed in a single day using VB as the entire development is just drag and drop. VB provides a user-friendly wizard and other browser-based tools that allow fast development.No additional software: To develop and deploy web and mobile applications, you don't require any additional software to be installed on your local machine. You just require a browser, good internet connectivity, and a VB subscription, and then you can start your application development.No additional cost: Apart from VB's cost, you don't need to pay anything to build web and mobile applications.Easy access to cloud app data and OIC integrations via the catalog: VB provides an built-in catalog to provide access to Oracle SaaS data and integrations developed in Oracle Integration Cloud.Single-click deployment: Using the unified platform, you can bring the application to the world with just a single click.Rich set of UI components: There is a big list of UI components that allow you to create interactive web and mobile applications.Easy creation/packaging of mobile appsHaving discussed the features and benefits of VB, next we'll explain what tools are required to start development on VB.
Oracle VB is a pure browser-based development tool that makes it easy for developers to manage the complete life cycle of the development process. To start development in VB, you should be equipped with the following tools:
Oracle VB subscription: First and foremost, you must have a VB subscription. A VB instance can be created separately from Oracle Cloud, but VB is also a part of Oracle Integration Cloud (OIC). If you already have an OIC instance, you can leverage the VB feature of OIC without creating a separate VB instance.Browser: Since VB development and deployment is purely browser based, you only need to install a browser to start development. Having a browser-based tool simplifies the development process. You can view the list of supported browsers in the Oracle official documentation at https://docs.oracle.com/en/cloud/paas/app-builder-cloud/abcrn/supported-browsers.html.Good quality internet: Since VB is a cloud-based tool, you should have good quality internet to speed up your application development process.Having discussed the tools required to develop with VB, next we'll explain what technologies you should know about before you start developing.
You don't require any programming skills to work with on VB as it provides a drag and drop feature with which you can build an enterprise-grade application. But it's really worth knowing what technologies are used in VB development:
JET: JET stands for Java Extension Toolkit, which is Oracle open source technology that is used to build interactive UIs. VB uses JET to design UIs using a rich set of UI components for web and mobile applications. To find out more about JET, you can visit http://oraclejet.org. You can also refer to the JET cookbook for working with UI components at https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html.The following screenshot shows various JET components in the VB component palette:
Figure 1.3 – JET components
HTML5: HTML stands for Hypertext Markup Language, which is used to build responsive web user interfaces. In combination with JET, VB allows us to use HTML5 to extend your UI's functionality in order to make interactive web and mobile applications. To learn more about HTML5, refer to https://www.w3schools.com/html/.JavaScript: JavaScript is a web scripting language that's used to develop and control dynamic content. It is also used for client-side validation of web pages. In VB, JavaScript can be used extensively to extend web page functionalities such as client-side validation, filtering records at the client side, and so on. To learn more about JavaScript, refer to https://www.javascript.com/.CSS: CSS stands for Cascading Style Sheets, and is used in web applications to make UIs interactive. With the help of CSS, you can completely change the design of web applications. VB also allows you to write custom CSS to make your web and mobile application interactive. To learn more about CSS, refer to https://www.javatpoint.com/css-tutorial.Having understood what technologies you should know for VB, next we'll explain the VB architecture.
It's important to understand how different VB components are placed and communicate with each other in order to develop web or mobile applications. You also need to understand that VB is not just a development platform, but it also allows you to host the applications, so you don't require a separate hosting environment to run applications developed in VB.
The following screenshot shows how different components communicate with each other:
Figure 1.4 – VB architecture
VB uses industry standards such as Oracle JET, HTML5, CSS, and REST. VB uses REST technology for data communication when the UI needs to push/pull data from an embedded database or external applications.
Let's take a look at the different VB components:
Oracle JavaScript Extension Toolkit (JET): JET is the open source technology used to develop web and mobile interfaces in VB. A rich set of components is available in the VB component list that help us to develop a user-friendly UI.HTTP/REST: The communication between the frontend and backend happens via HTTPS or REST calls.Frondend: VB mainly uses Oracle JET to develop the UI using drag and drop features. However, in order to extend the VB application, you have the option to use HTML and JavaScript. Mobile applications that you build in VB use Apache Cordova to access device features such as the camera or location.Backend: The backend of VB web or mobile applications is the embedded or external database (Oracle SaaS, non-Oracle SaaS, third-party integrations, Processes, and so on). All the communication between the frontend and backend happens using REST APIs. This is the only mechanism available to communicate with the data in VB. However, you also have the option to use SOAP APIs, but this is not straightforward and you have to use JavaScript to communicate with SOAP APIs. Whenever you create objects (Business Objects) in an embedded database, VB exposes the REST APIs for those objects and interactions happen using only those APIs.Instead of using an embedded database, you can switch to use other Oracle database services, such as DBaaS or ATP. After you switch database, all the database objects (Business Objects) that you create in the database will be created in the destination database. In this case, the communication will also happen via REST APIs.
In order to communicate with external applications, you have to build a connection (Service Connection) in VB and consume the REST interfaces of those applications. The VB Service Connection can also be used to interact with Oracle SaaS, Processes, and OIC seamlessly.
Now you know how the different components fit in VB, which will make it easier for you to develop applications in VB.
In this chapter, we took a look at a lot of topics that will help you start your journey with VB. With this chapter, you learned about Visual Builder, how it works, and its features and benefits. This will help you adopt VB quickly and easily.
We also covered various tools that are required to start development on VB. This will prepare you for the next chapters. You have also learned what technologies will be used in VB, and we have provided a few references that help you to learn all of them easily. Although you are not required to know them all in detail, having an understanding of all those technologies will help to adopt VB quickly.
You have seen how different VB components communicate with each other with a good architecture image. We have explained all the components in detail to aid your understanding.
In the next chapter, you will learn how to provision a VB instance, create users, and assign roles to the application. We will also explain the various ways to navigate around VB.
In the previous chapter, you learned what VB is and its benefits and features. That gave you a good start in knowing about Visual Builder.
In this chapter, you will get started with VB instance creation using the Oracle Cloud portal and learn what you should have before you create an instance. This is really important to know how much you need to pay to use VB, and in this chapter, we will focus on the cost derivation of using VB. Once an instance is created, you will learn how you can access the VB instance.
We will also go through the various navigations provided by Visual Builder.
In this chapter, we will cover the following topics:
Provisioning a VB instanceCreating users and assigning rolesDeriving the cost of using VBAccessing the VB instanceExploring various navigations of VBThe main objective of this chapter is to give you an understanding of how to create and manage a Visual Builder instance along with how to access Visual Builder. With that, you will be able to manage your Visual Builder instance independently.
To complete this chapter, you should have the following:
A valid email addressA valid phone numberA valid credit cardIn order to get started with VB, a VB instance needs to be provisioned that will be used to develop and deploy web and mobile applications. In order to create a VB instance, you must have an Oracle Cloud account in place. Don't worry if you don't have one; you can create one to practice for 30 days.
To create an Oracle Cloud account, you must have a credit card; Oracle will hold the nominal amount for verification purposes, which will be reversed immediately.
Copy and paste the link https://signup.oraclecloud.com/ into a browser to sign up for an Oracle Cloud account. Skip this step if you already have an Oracle Cloud account.
Important Note:
VB is also part of the Oracle Integration Cloud (OIC) service, so if you already have an OIC instance, then you don't need to create a VB instance separately.
Once the free Oracle Cloud account is created successfully, you will get the following:
A 30-day free trialUS $300 in free creditA few services that are always free and can be used foreverRefer to https://www.oracle.com/cloud/free/ to find out what services are free forever.
Important Note:
Oracle will not charge anything unless you choose to upgrade the account.
The 30-day free services will be terminated after 30 days but the Oracle Cloud account will remain active as you can use other free services forever.
Important Note:
To set up a VB instance, you must have admin privileges. If you don't have admin privileges, ask your Oracle Cloud administrator to create a VB instance for you.
There are two ways to create an Oracle VB instance:
Quick StartCustom instanceOnce the Oracle Cloud account is created successfully and all Oracle cloud services are available, then you can create the VB instance using either approach.
Important Note:
Sometimes, the Oracle Cloud account takes time to bring up all the Oracle Cloud services. So, you might not see all the services under the Cloud dashboard for the first few hours.
In the next sections, we will discuss each approach in detail.
This option uses default settings while creating a VB instance. To create the VB instance, you must log in to the Oracle Cloud dashboard with admin privileges. The Quick Start option creates the instance with the following features:
An Oracle-managed Visual Builder instanceA cluster with two nodesAn embedded databaseTo create a new VB instance, perform the following steps:
Log in to the Oracle Cloud dashboard using your unique cloud account name and enter the credentials on the login page. Upon successful login, you will land on the Oracle Cloud Infrastructure (OCI) dashboard.From the dashboard, click on the hamburger menu at the top left of the screen. Expand Platform Services and click on Visual Builder.Important Note:
Don't select Visual BuilderClassic (if you see this as one of the options) as this is for old customers who are using old VB versions.
The following screenshot shows us these menu selections:
Figure 2.1 – Visual Builder
This action will take you to a new tab and will open the Visual Builder instance management page.
Click on QuickStarts near the Welcome link. This will open the Create Instance page. The Quick Start option only allows you to enter the instance name.Enter the information for *Instance Name. This is a unique name across all the VB instances and will be used to identify the instance. The name must start with a letter, must contain only letters and numbers, and can contain up to 24 characters. Enter vbcs01 for the time being and click on the Create button.The following screenshot shows the QuickStarts page under Create Instance:
Figure 2.2 – Quick Start option to create a Visual Builder instance
The instance creation process will start once you click on the Create button. The instance creation will take 2–5 minutes and even longer, sometimes.You will be returned back to the Visual Builder page where you will see Status as Creating service… and the Submitted On label, as shown in the following screenshot:Figure 2.3 – Visual Builder instance creation status
While the instance is in the creation state, you cannot take any actions (stop, start, or delete) on the VB instance. Once the instance is created successfully, the status will be removed and the Submitted On label will be changed to Created On.
Custom instance creation allows you to choose more information and is the recommended approach when you prepare the VB instance for production. Perform the following steps to create a VB instance:
Log in to the Oracle Cloud dashboard.Click on the hamburger menu at the top left of the screen, expand Platform Services, and click on Visual Builder.Click on the Create Instance button, which will open the instance creation page.Specify the following details and click on the Next button:Table 2.1 – Details for the instance creation page to create a VB instance
Enter the preceding instance creation details, as shown in the following screenshot:Figure 2.4 – Custom instance option to create a Visual Builder instance
Click on the download icon on the next page, which will download the JSON file, as shown:Figure 2.5 – Create Visual Builder Instance Confirmation
This JSON file contains a payload that will allow you to provision a VB instance using the REST API. A snippet of the JSON file is as follows:
{"serviceVersion":"1.0","specialInstructions":"false","managedSystemType":"oracle","edition":"SUITE","enableNotification":"true","serviceDescription":"This is custom VBCS instance ","serviceName":"vbcs02","serviceLevel":"PAAS","subscriptionId":"1145011","notificationEmail":"[email protected]","isBYOL":"false"}
Click on the Create button. This will initiate the instance creation process. Once the instance is created successfully, you can use it to start development.The following screenshot shows the VB instances:
Figure 2.6 – Visual Builder instance page
Once a VB instance is created successfully, you can perform the following actions from the VB instance name. Click on the action icon (on the right side) of the VB instance name to view the available actions, which are as follows:
Start: This action will allow you to start the VB instance if already stopped.Stop