Decreasing WorkWithPlus generation time

WorkWithPlus generates a wide set of features that help you to quickly develop powerful applications. These features are always generated by using GeneXus code. A GeneXus developer can develop by its own this kind of features but the effort and cost of doing it for each screen is really high. And you also need to consider the cost and effort of maintaining those screens.

By using WorkWithPlus you can apply these features with zero effort and these features will evolve together with the evolution of the Knowledge Base.

Some of these features are really advanced so they required extensive code and complex web forms to be developed. As the complexity of the features increases, the generated object increases its complexity. In consequence, the GeneXus specification and generation time of the object increases too.  

In this page we'll suggest some ideas and tips you should consider in order to decrease your screens generation time. We'll focus on the "Selection" object. In most cases this implies to analyse the screens and define which features and resources are strongly necessary. You should lead to a compromise between features within the screen and the generation time that you consider reasonable for you.

Dynamic Filters

Dynamic Filters  allows user to decide at runtime which filters to apply, and which operators are associated to that filters.

 

OptimizeImg001

When you include this kind of filters, WorkWithPlus adds in the web form all the necessary variables to create all the possible combinations of filters and operators that the user can include:

 

OptimizeImg002

In addition, it will include all the necessary code and conditions within the Data Selector.

Suggestions

 

1 - Leave only the necessary attributes and operators in the screen

Analyse which attributes and operators are strongly needed in the screen.

When you add a new operator the code is added to manage all the possible combinations. For example, for a Numeric attribute, the default operators are: Lower than, Equals, Higher than but you could leave just two: Lower/Equal e Higher than.

If needed, you can customise the operators and filters applied by default from the WorkWithPlus Settings:

 

OptimizeImg003

Another tip, is to set as "Fixed Filters" those filters that should be always visible in the screen:

 

OptimizeImg009

 

2 - Set the "Max Filter" property

 

OptimizeImg004

With this property you can define how many filters can be included at the same time at runtime. By default this property is set to "3", but you can change the value according to your needs.

This is important because the amount of conditions is multiplied by the amount of filters that can be used to create all the possibilities. So, if you can decrease it to "2" or "1" it will generate a huge impact in the generation time

 

3 - Use "Full Text Filter"

From WorkWithPlus 12 you can use Full Text Search Filter in your screens:

 

OptimizeImg005

In this way, you will be able to have just one filter in the screen where the user can search by all the requested attributes:

 

OptimizeImg006

By using this kind of filters you will have just one variable in the screen and you will avoid the code regarding the possible combinations.

So, if possible we recommend to delete your "Dynamic Filters" from the instance and use "Full Text Search" instead. You will notice a huge impact in the generation time.

Column Filters

Column Filters allows the user to filter records from the title of the grid columns, and also reorder them, both server side:

 

OptimizeImg010

When you include this kind of filters, WorkWithPlus needs to include in the web form, all the necessary user controls to show the drop down menu in each column:

 

OptimizeImg011

 

In addition, it will include the necessary code within the events to manage all the possible actions within the drop down menu and the possible conditions. 

As the filters and orders are server-side, they are developed by using Rest Services, so WorkWithPlus generates a procedure (exposed as Service) with the necessary code:

 

OptimizeImg012

As you can see, this is a complex feature with a complex development behind.

Suggestions

 

1 - Define which attributes really need this resource

In most escenarios, you don't need this resource in each column. So, you can easily define which column will have it: 

 

OptimizeImg013

You should always try to wisely combine "Dynamic Filters" with "Column Filters" in order to avoid repeating them.

 

2 - Define which data types will include Column Filters

You can define which data types will include by default the Column Filters. In this way, you can define that some data types are included in "Full Text Filter" and the others as "Columns Filters":

 

OptimizeImg014

This is done just once, and then every instance will consider this configuration.

 

3 - Define the behaviour of the "Title Sorting"

Title Sorting is developed by adding a drop down menu within the column (the same drop down menu that is included for "Column Filters") so the web form is really complex as it has all the drop down menus. This will imply more generation time needed.

 

OptimizeImg017

If an attribute doesn't have its "Column Filter", a drop down menu will be included anyway for the "Title Sorting". This behaviour can be changed so when the attribute doesn't have "Column Filter", the "Title Sorting" won't include the drop down menu:

 

OptimizeImg016

In this way you will keep the sorting feature but you won't include the drop down menu in the form (and the code regarding it)

Security

If you use Advanced Security or GAM + WorkWithPlus, you can include security for each attribute. This is a really useful feature but it will include the necessary code to validate the permissions for each attribute:

 

OptinizeImg015

You should include this resource when necessary.

Tabs in View

WorkWithPlus generates a tab for each related transaction within the View object. By default it generates at most 10 tabs, but you can decrease this number in order to generate less tabs by default (you can manually add them later if necessary)

 

OptimizeImg018