...
...
...
...
...
...
...
...
...
...
...
...
Overview
Previous document go deep on Wayfast Anatomy for In previous lesson we did a deep dive on Skin & Layout concepts. In this documentone, we will explain how the Pages pages that we used on the Application are defined by Controls and how these controls interact with the Project DB depending on the variable conditions that Wayfast allow us to develop.
How
...
pages interact with Project DB?
Wayfast Project as a web application is built by multiple Pages. Under each Page, we assign different Controls. These Controls are the ones that we use for user’s interaction
Pages are the main unit to build User Interfaces within Wayfast. Even if we are building Web Applications or Mobile applications the life of our end users inside our app is going to happen between pages. You can think of page as an applications screen. Pages are made of controls, datasets and actions.
Enter to the Project and you will find all the Pages listed
...
In this section, we will explain how we can make this interaction possible in Wayfast application.
How to create a Stored Procedure in DB and link to Dataset?
A Stored Procedure is an object that we can define and then relate it to the Project. This needs to be created in DB using SQL.
...
This is a simple statement where we indicate 3 input parameters “Ingreso”“Entry”, “Nombre” “Name” and “Puesto”“Role”. In next steps, these parameters are going to be used in Wayfast to connect with Controls. Notice that the executed SP has now 1 row affected and this is the information that are going to use in Page for the Application.
...
Now that we created the Stored Procedure and it’s synchronized, we can continue creating a Dataset and establish a relationship between both objects.
How to create a
...
Dataset in Wayfast?
Info |
---|
Dataset Definition |
On Page detail, click “New Dataset” button
...
Now that we have the information available from DB and connected to the Project, we need to make it visible in the Application’s UI.
How to create and manage Controls to see the Dataset in the Application?
Info |
---|
Controls Definition |
Controls will act as a bridge between the Dataset and the information from DB. To create a Control, first we need to select any option from “Controls” dropdown. In this example, select “Grid Column” control.
...
It’s important to complete the “Field” value with the same parameter created in Stored Procedure. In this example, we are going to use “Ingreso” “Entry” at “Field” that matches with the SP previously added to DB.
...
Note |
---|
NOTE: There are a lot of options to represent the data in UI. Wayfast allow us to include input fields by forms that can be stored in DB. |
Recap
In the first part, we learnt about how to Pages interact with DB by creating Datasets. Then we made a first approach using SQL to create an easy Stored Procedure that was linked to Dataset. In the second part, we explained how the Controls under pages can display in many different ways the information available on DB, assigning the place and source. In the next tutorial, we will learn how to connect the Controls with Actions that user will have in pages to interact with the Application.