DZone
Database Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Database Zone > Relational Data and Custom Codeless APIs App Blueprint

Relational Data and Custom Codeless APIs App Blueprint

Explore a shipping and logistics app blueprint that utilizes relational data models to improve database performance and uses custom codeless APIs to access data.

Chris Fanchi user avatar by
Chris Fanchi
·
Dec. 23, 21 · Database Zone · Tutorial
Like (1)
Save
Tweet
5.96K Views

Join the DZone community and get the full member experience.

Join For Free

We utilize relational data models to improve database performance and allow users to recreate real-world relationships. The shipping and tracking app blueprint showcases these capabilities in action, with the help of custom codeless APIs.

App blueprints are more than just templates from which to build a specific type of application. We design all of our free App Blueprints to provide one or more key functions that a developer would want to add to their application, regardless of the app’s business use.

The free shipping and tracking app blueprint showcases how to present data from multiple related tables using custom APIs. The entirety of this app blueprint was built without code using Backendless’ UI Builder.

The app heavily relies on relational data to connect table objects in a way that best represents the real world. To access the data, the app utilizes several custom APIs to present this data to users and administrators.

In this article, we will explore the basics of this functionality. Additionally, all app blueprints include thorough instructions to guide you through how to make your own modifications and customizations.

The web app, which functions identically to a website, can be purchased for free when creating a new app in the Backendless console. It features a beautiful, responsive design that will look great on any size screen.

Click here to view the live demo and follow along (opens in a new tab).

Utilizing Data Relations To Connect a Wide Range of Objects in Different Tables

Utilizing Data Relations To Connect a Wide Range of Objects in Different Tables 

At first glance, the database of this application can appear very complex. For example, when we look at the delivery table tree, each table has at least one relation connecting it to another table in the data model.

When we dig down into the structure, however, we can understand the logic behind this design. Let’s break down each step:

  • Each Delivery has a Dispatcher assigned and order in the Delivery2Order table.
    Screenshot: Step 1
  • Delivery2Order contains the OrderShipment information.
    Screenshot: Step 2
  • OrderShipment information includes the User that created the order, the OrderSender and OrderReceiver, and the Rate paid for the shipment.
    Screenshot: Step 3
  • The OrderSender and OrderReceiver both have a Country and may have a State related as well.
    Screenshot: Step 4

Each table contains pieces of information that, when combined, form the whole of the shipment details.

In order to ensure data integrity across all shipments, relations are used. One reason is that the admin can change information in one table – for example, updating shipping rates – and automatically update all relevant orders. Similarly, individual elements of an order cannot be modified or deleted without impacting the entire record tree.

Finally, using relational data tables allows for easier indexing of data objects. This means that your database will query faster than a NoSQL-style database, such as a product like Google’s Firebase.

Building Custom Codeless APIs To Interact With Related Data Tables

Custom codeless API services

The shipping and tracking app utilizes six custom API services and 24 custom functions in UI builder. All of these are built without code.

The custom codeless API services can be found by navigating to the Backend -> Business Logic -> Codeless, as pictured above. When using a custom API with codeless, you can see all available API blocks by scrolling to the bottom (lower left-hand corner, pictured above).

In this app, the custom APIs and their related methods are designed to allow the developer to quickly access important data within the data model. Once built, these APIs can be easily inserted into other functions or even new APIs using automatically-generated Codeless blocks.

Displaying Related Data on the Frontend Using UI Builder

Once you understand the data model and how it is being utilized by the custom API services, you will be able to put these elements into action on the front-end.

Note: The name of the page you are viewing can be found in the URL you are on. For instance, if you are navigating through the demo of the app and want to dive deeper into a page in your Backendless Console, you can find the page name here:

https://nimblepunishment.backendless.app/app/index.html?page=adminNavRates&data=%7B%7D

Admin Dashboard

Admin Dashboard

The admin dashboard provides three sections: Orders, Dispatches, and Rates. Each of these sections contains functionality for the administrator.

  • In the Orders section, the admin can view order details or select one or more items to schedule for delivery or pickup.
  • In the Dispatches section, the admin can mark items as completed, complete with date and time delivered, or add new dispatchers.
  • In the Rates section, the admin can add new rates, including the origin and destination locations, and modify existing rates.

Functionalities For Administrator

By visiting the page in UI Builder, you can see the logic that is used to achieve each function. If you have additional questions about how a page or function works, feel free to ask on our support forum and we’ll be happy to help.

Shipment Tracker

The Shipment Tracking Page

The shipment tracking page (TrackPage) is where all of your data is brought together to be displayed for the end-user. This page shows how each shipment is compiled into a single data record and then populated on the screen using Dynamic List Behaviour.

User Portal and Shipment Creator

User Portal

The user portal serves two primary functions:

  1. Listing all shipments the user has made, which each link to the shipment tracker for the order
  2. Enabling the user to schedule a new shipment

For reference, the tracking ID for each shipment is the objectId found in the OrderShipment table.

Shipment creator

Note: This application does not include payment processing. However, you can easily add payment processing to the order page using our free Stripe plugin.


Closing

The shipping and tracking app is a beautiful example of logistics functionality in an ordering and shipping environment. More importantly, it provides our users with a template to follow for a variety of key Backendless functions.

Using this template, you can see first-hand how to:

  • Utilize data relations to connect objects in different tables
  • Build custom Codeless APIs to interact with related data tables
  • Utilize custom functions to display related data on the frontend using UI Builder

Happy Codeless Coding!

app Data integrity Database Relational database

Published at DZone with permission of Chris Fanchi. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • A Complete Guide About Scaled Agile Framework (SAFe)?
  • Three Mantras for Effective Standup Meetings
  • What Is SSO and Why Do You Need It?
  • Data Lakes, Warehouses and Lakehouses. Which is Best?

Comments

Database Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo