Optimization
Overview
On this lesson, we will review how Wayfast can help us to improve our development. If we navigate through “Optimization” section, we can find a code quality tool that identify different elements like Pages, Controls, Datasets and more that are not being used inside the application.
Let’s identify the different options to optimize our application!
Unused Elements
Once we access to the Optimization section, we can observed different tabs where Wayfast identify those elements that are not in use that we need to review in case there are not required anymore. Let’s analyze which elements can be improved by section:
Item | Description |
---|---|
Unused Pages | List the pages that are not associated to any menu item. |
Unused Controls | List the controls that we can remove since they are not visible in pages. |
Unused Dataset | List the datasets not linked to any control and we can remove from the project. |
Unused Cursors | List the cursors that are not connected to any control and we can remove from the project. |
Unused Actions | List the cursors that are not connected to any control and we can remove from the project. |
Unused Stored Procedures | List the cursors that are not associated to any control or dataset and we can remove from the project. In this case, we will have several store procedures that Wayfast generated automatically everytime that we synchronize the database with the project. These SPs are related to Get, Delete or CreateOrUpdate. |
Unused Tables | List the tables that are not connected to any control and we can remove from the project. |
At this point, we have a lot of experience using Wayfast and this “Unused” feature is not only available in “Optimization” section. There’s another place where we can identify if there’s any element unused. This is something that we can find under each page created, for example, when we remove an association between a control and dataset, “Unused” column highlight those elements that may not be useful anymore.
Click on “Project Pages” section and navigate to any page created in our project.
OnDemand Elements
Like we mentioned in other lessons, if we created a dataset using “Ondemand” execution type, application will run every time there is a post back. Post-backs are interactions with the backend / web app. Since we recommend to avoid this constant reloading page, we can modify those elements and select the “Pre” execution type and make the application more efficient.
Let’s click on “Ondemand Elements” tab and focus on the options.
We can pick any page inside our project and analyze which elements are using this “Ondemand” execution type. If we decide to reassign the execution to “PRE” option, we can select the objects and click on “Assign as PRE” button.
Our performance is improved now that all the elements are updated with the recommended execution type.
Stats
This is dashboard page where we can observe different charts to resume all the unused and ondemand elements available in the project.
If we focus on “Project” search field, we can retrieve the elements associated to that specific project depending on our user credentials.
Beside the stats related to this group of elements, we can also observe error logs in our project depending on the database instance that we have connected.
Conditional by Customer
This is a report page that display all those elements that were created using conditional option. Like we learnt in other lessons, we can generate certain rules when creating controls. However, this rules shouldn’t be allocated in the control and associated to specific customers.
Recap
On this lesson, we learnt how we can improve our performance introducing quality over the development process. Sometimes we created elements that are not useful anymore and we forgot to remove them from the code, this tool help us to identify this objects and clean our application.